This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/56760] namespaces, templates and forwarding declarations.
- From: "pinskia at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 28 Mar 2013 07:14:14 +0000
- Subject: [Bug c++/56760] namespaces, templates and forwarding declarations.
- Auto-submitted: auto-generated
- References: <bug-56760-4 at http dot gcc dot gnu dot org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56760
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> 2013-03-28 07:14:14 UTC ---
Note I think this undefined code at compile time due to specializations happen
after their use though the reason why it fails are a different reason.
This is expected behavior for the following reason:
In the second case, we have an argument dependent lookup that happens in the
global namespace so the overloaded set includes all of them at instantiation
time too. So it picks the one which is specialized for seco::holder<T>.
But in the first case the overload set only includes the first two and does not
know about one for seco::holder<T> and never looks for it as argument depend
lookup only happens in seco and nam as the two argument types are located in
those namespaces.