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)
no pedantic

Author

anonymous

over 5 years ago

$ clang++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.64.0/clang-head/include -std=gnu++2a
prog.cc:5:20: error: expected expression
concept Iterator = requires(It it) {
                   ^
prog.cc:13:20: error: use of undeclared identifier 'Iterator'; did you mean 'operator'?
concept Iterable = Iterator<typename T::iterator> && requires(T ctr) {
                   ^~~~~~~~
                   operator
prog.cc:13:20: error: use of undeclared 'operator&&'
prog.cc:18:10: error: unknown type name 'Iterable'
template<Iterable Ctr, class T>
         ^
prog.cc:19:21: error: 'T' does not refer to a value
auto myfind(Ctr& c, T value) -> typename Ctr::iterator
                    ^
prog.cc:18:30: note: declared here
template<Iterable Ctr, class T>
                             ^
prog.cc:19:18: error: use of undeclared identifier 'c'
auto myfind(Ctr& c, T value) -> typename Ctr::iterator
                 ^
prog.cc:19:29: error: expected ';' at end of declaration
auto myfind(Ctr& c, T value) -> typename Ctr::iterator
                            ^
                            ;
prog.cc:19:30: error: cannot use arrow operator on a type
auto myfind(Ctr& c, T value) -> typename Ctr::iterator
                             ^
prog.cc:32:15: error: use of variable template 'myfind' requires template arguments
    auto it = myfind(v, 42);
              ^
prog.cc:19:6: note: template is declared here
auto myfind(Ctr& c, T value) -> typename Ctr::iterator
     ^
9 errors generated.
Exit Code:
1