https://bugs.llvm.org/show_bug.cgi?id=35012
Bug ID: 35012
Summary: Deleted template inline friend function in template
class causes redefinition error
Product: clang
Version: 5.0
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: C++
Assignee: unassignedclangb...@nondot.org
Reporter: s...@quanttec.com
CC: dgre...@apple.com, llvm-bugs@lists.llvm.org
When compiling the following code with `clang++ -std=c++17 Test.cpp`
template <typename T>
struct Test {
template <typename U>
friend bool operator==(Test, U) = delete;
};
Test<int> 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<int>' requested
here
Test<int> 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.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs