https://bugs.llvm.org/show_bug.cgi?id=41360
Bug ID: 41360
Summary: Set of pointer to incomplete type gives wrong warning
message.
Product: libc++
Version: unspecified
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P
Component: All Bugs
Assignee: unassignedclangb...@nondot.org
Reporter: mclow.li...@gmail.com
CC: llvm-bugs@lists.llvm.org, mclow.li...@gmail.com
The following two bits of code give very odd error messages
(code/report from Jonathan Wakely via IRC)
#include <set>
struct Base { };
struct Derived; // derives from Base, but incomplete at this point
int main()
{
std::set<Derived*, std::less<Base*>> s;
};
== and ==
#include <set>
struct Base { };
struct Derived; // derives from Base, but incomplete at this point
template<typename T>
struct X
{
std::set<Derived*, std::less<Base*>> s;
};
The error message is:
/Sources/LLVM/llvm-project/libcxx/include/set:453:26: warning: the specified
comparator type does not provide a const
call operator [-Wuser-defined-warnings]
This is also https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85965
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs