This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/26782] New: reject [valid?] template specialization.
- From: "pluto at agmk dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 21 Mar 2006 15:41:01 -0000
- Subject: [Bug c++/26782] New: reject [valid?] template specialization.
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
namespace A { namespace B {
template < typename T > void foo();
} }
struct S1;
struct S2;
namespace A { namespace B {
template <> void foo< S1 >(); // accepted
} }
template <> void A::B::foo< S2 >(); // rejected
$ g++ bug.cpp -c -Wall
error: specialization of ‘template<class T> void A::B::foo()’
in different namespace
error: from definition of ‘template<class T> void A::B::foo()’
this testcase works with g++ 3.3.6 and vs-2003.
--
Summary: reject [valid?] template specialization.
Product: gcc
Version: 4.1.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: pluto at agmk dot net
GCC build triplet: *
GCC host triplet: *
GCC target triplet: *
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26782