This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/58091] New: Non-ambiguous member lookup rejected
- From: "fimbul77 at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 06 Aug 2013 04:01:04 +0000
- Subject: [Bug c++/58091] New: Non-ambiguous member lookup rejected
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58091
Bug ID: 58091
Summary: Non-ambiguous member lookup rejected
Product: gcc
Version: 4.9.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: fimbul77 at gmail dot com
The following code is rejected:
namespace NS
{
template < int N >
struct NS
{
constexpr static int value = N ;
} ;
}
int main()
{
using namespace NS ;
NS<0>::value ;
// gcc says a name 'NS' is ambiguous.
// clang says 'NS' is class template name NS::NS ;
}
I think NS<0>::value is not ambiguous.
Because namespace is uncomparable and can not be template.