Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Author

anonymous

over 7 years ago

Language

Compiler

Options

Author

anonymous

over 7 years ago

$
prog.cc: In function 'int main()':
prog.cc:8:19: error: no match for call to '(main()::<lambda(auto:1)>) (tag<int>)'
     foo(tag<int>{});
                   ^
prog.cc:5:30: note: candidate: 'template<class auto:1> constexpr main()::<lambda(auto:1)>::operator decltype (bar(x)) (*)(auto:1)() const'
     auto foo = [](auto x) -> decltype(bar(x)) { return {}; };
                              ^~~~~~~~
prog.cc:5:30: note:   template argument deduction/substitution failed:
prog.cc: In substitution of 'template<class auto:1> constexpr main()::<lambda(auto:1)>::operator decltype (bar(x)) (*)(auto:1)() const [with auto:1 = tag<int>]':
prog.cc:8:19:   required from here
prog.cc:5:42: error: 'bar' was not declared in this scope
     auto foo = [](auto x) -> decltype(bar(x)) { return {}; };
                                       ~~~^~~
prog.cc:5:30: note: candidate: 'template<class auto:1> main()::<lambda(auto:1)>'
     auto foo = [](auto x) -> decltype(bar(x)) { return {}; };
                              ^~~~~~~~
prog.cc:5:30: note:   template argument deduction/substitution failed:
prog.cc: In substitution of 'template<class auto:1> main()::<lambda(auto:1)> [with auto:1 = tag<int>]':
prog.cc:8:19:   required from here
prog.cc:5:42: error: 'bar' was not declared in this scope
     auto foo = [](auto x) -> decltype(bar(x)) { return {}; };
                                       ~~~^~~
Exit Code:
1