This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/58091] New: Non-ambiguous member lookup rejected


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]