Open llvmbot opened 6 years ago
When compiling the following code with clang++ -std=c++17 Test.cpp
clang++ -std=c++17 Test.cpp
template struct Test { template friend bool operator==(Test, U) = delete; }; Test test;
I get the following unexpected error:
clang++ -std=c++17 Test.cpp Test.cpp:4:15: error: redefinition of 'operator==' friend bool operator==(Test, U) = delete; ^ Test.cpp:6:11: note: in instantiation of template class 'Test' requested here Test test; ^ Test.cpp:4:15: note: previous definition is here friend bool operator==(Test, U) = delete; ^ 1 error generated.
GCC 7.2 produces no error.
mentioned in issue llvm/llvm-bugzilla-archive#43400
mentioned in issue llvm/llvm-bugzilla-archive#40150
@llvm/issue-subscribers-c-11
@llvm/issue-subscribers-clang-frontend
Extended Description
When compiling the following code with
clang++ -std=c++17 Test.cpp
template
struct Test {
template
friend bool operator==(Test, U) = delete;
};
Test test;
I get the following unexpected error:
GCC 7.2 produces no error.