Run Code  | API  | Code Wall  | Users  | Misc  | Feedback  | Login  | Theme  | Privacy  | Patreon 

non-deduced context

Language: Layout:
+ ] Compiler args + ] Show input
Compilation time: 1.39 sec, absolute service time: 1,51 sec 
fork mode |  history  | discussion
Error(s):
source_file.cpp:34:18: error: no matching function for call to 'adapter2'
    std::cout << adapter2(t, u, l); // fails everywhere
                 ^~~~~~~~
source_file.cpp:12:5: note: candidate template ignored: could not match 'function<int (type-parameter-0-0, type-parameter-0-1)>' against '(lambda at source_file.cpp:26:14)'
int adapter2(T t, U u, std::function<int(T,U)> f) {
    ^
1 error generated.