https://bugs.llvm.org/show_bug.cgi?id=37867

            Bug ID: 37867
           Summary: declaration conflicts with target of using declaration
                    already in scope
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected]

The code is as follow:

namespace Name {
 template <class T> class Point;
}

using Name::Point;

template <class T> class Point {
 public:
 Point() {}
 protected:
 T member;
};

int main(void) {
 Name::Point<double> d;
 return(0);
}

clang++ rejects the code with error messages:
error: declaration conflicts with target of using declaration already in scope
    template <class T> class Point {
error: implicit instantiation of undefined template 'Name::Point<double>'
     Name::Point<double> d;

g++ accepts the code. The code comes from a gcc bug report:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=1876

Is this a bug in clang++?

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to