https://bugs.llvm.org/show_bug.cgi?id=40150
Bug ID: 40150
Summary: deleted friend of template class conflicts with its
own definition
Product: clang
Version: trunk
Hardware: PC
OS: Windows NT
Status: NEW
Severity: enhancement
Priority: P
Component: C++
Assignee: unassignedclangb...@nondot.org
Reporter: ca...@carter.net
CC: blitzrak...@gmail.com, dgre...@apple.com,
erik.pilking...@gmail.com, llvm-bugs@lists.llvm.org,
richard-l...@metafoo.co.uk
This correct TU:
template<class>
struct S {
friend void operator|(int, const S&) = delete;
};
S<void> s;
is rejected by "clang++ -std=c++2a" (https://godbolt.org/z/Du4mGf) with
diagnostics:
<source>:3:17: error: redefinition of 'operator|'
friend void operator|(int, const S&) = delete;
^
<source>:6:9: note: in instantiation of template class 'S<void>' requested
here
S<void> s;
^
<source>:3:17: note: previous definition is here
friend void operator|(int, const S&) = delete;
^
1 error generated.
--
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