[Bug c++/42018] New: Accepts definition for non-anonymous specialized template method within anonymous namespace
Simon dot Richter at hogyros dot de
gcc-bugzilla@gcc.gnu.org
Thu Nov 12 12:37:00 GMT 2009
The following code should fail to compile due to ambiguity (the non-template
case properly fails):
template<typename>
void foo(void);
template<>
void foo<int>(void);
namespace {
template<>
void foo<int>(void) { return; }
}
int main(int, char **) { foo<int>(); }
--
Summary: Accepts definition for non-anonymous specialized
template method within anonymous namespace
Product: gcc
Version: 4.3.4
Status: UNCONFIRMED
Severity: minor
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: Simon dot Richter at hogyros dot de
GCC build triplet: x86_64-unknown-linux-gnu
GCC host triplet: x86_64-unknown-linux-gnu
GCC target triplet: x86_64-unknown-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42018
More information about the Gcc-bugs
mailing list