Author
anonymous
almost 8 years ago
Language
Compiler
Options
Author
anonymous
almost 8 years ago
$
prog.cc: In instantiation of 'main()::<lambda(int, auto:1)> [with auto:1 = any_type]':
/opt/wandbox/gcc-head/include/c++/8.0.0/type_traits:2431:26: required by substitution of 'template<class _Fn, class ... _Args> static std::__result_of_success<decltype (declval<_Fn>()((declval<_Args>)()...)), std::__invoke_other> std::__result_of_other_impl::_S_test(int) [with _Fn = main()::<lambda(int, auto:1)>; _Args = {any_type, any_type}]'
/opt/wandbox/gcc-head/include/c++/8.0.0/type_traits:2442:55: required from 'struct std::__result_of_impl<false, false, main()::<lambda(int, auto:1)>, any_type, any_type>'
/opt/wandbox/gcc-head/include/c++/8.0.0/type_traits:2843:12: recursively required by substitution of 'template<class _Result, class _Ret> struct std::__is_invocable_impl<_Result, _Ret, std::__void_t<typename _Result::type> > [with _Result = std::__invoke_result<main()::<lambda(int, auto:1)>, any_type, any_type>; _Ret = void]'
/opt/wandbox/gcc-head/include/c++/8.0.0/type_traits:2843:12: required from 'struct std::is_invocable<main()::<lambda(int, auto:1)>, any_type, any_type>'
prog.cc:19:41: required from here
prog.cc:17:33: error: 'struct any_type' has no member named 'foo'
auto l = [](int, auto x){ x.foo(); };
~~^~~
Exit Code:
1