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

            Bug ID: 23844
           Summary: clang accepts invalid declaration of member template
                    in local class
           Product: new-bugs
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    Classification: Unclassified

markus@x4 /tmp % cat foo.ii
int main() {
  struct A {
    template <typename...> using nested = void;
  };
}
markus@x4 /tmp % clang++ -c -std=c++11 foo.ii
markus@x4 /tmp % g++ -c -std=c++11 foo.ii
foo.ii: In function ‘int main()’:
foo.ii:3:5: error: invalid declaration of member template in local class
     template <typename...> using nested = void;
     ^
markus@x4 /tmp % icpc -c -std=c++11 foo.ii
foo.ii(3): error: a template declaration is not allowed here
      template <typename...> using nested = void;
      ^

compilation aborted for foo.ii (code 2)

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to