Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Author

anonymous

over 5 years ago

Language

C++

Compiler

clang HEAD 10.0.0 (https://github.com/llvm-mirror/clang.git 3441aaff8506ac0252f9bba9d1ce117cf35906ce) (https://github.com/llvm-mirror/llvm.git ae7ce179222e4d642717fbf814ef60ffb12bb3c1)

Options
Warnings
Boost 1.64.0
C++2a(GNU)
-pedantic
Raw compiler options
-W

Author

anonymous

over 5 years ago

Person.h
PersonLessThan.h

$ clang++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.64.0/clang-head/include -std=gnu++2a -pedantic -W
prog.cc:17:14: error: no matching member function for call to 'count'
    assert(s.count("Alice Adams") == 1);
           ~~^~~~~
/usr/include/assert.h:89:5: note: expanded from macro 'assert'
  ((expr)                                                               \
    ^~~~
/opt/wandbox/clang-head/include/c++/v1/set:784:20: note: candidate function not viable: no known conversion from 'const char [12]' to 'const std::__1::set<my::Person, PersonLessThan, std::__1::allocator<my::Person> >::key_type' (aka 'const my::Person') for 1st argument
    size_type      count(const key_type& __k) const
                   ^
/opt/wandbox/clang-head/include/c++/v1/set:790:5: note: candidate template ignored: requirement '__is_transparent<PersonLessThan, char [12], void>::value' was not satisfied [with _K2 = char [12]]
    count(const _K2& __k) const                    {return __tree_.__count_multi(__k);}
    ^
1 error generated.
Exit Code:
1