https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64791

--- Comment #1 from Tomalak Geret'kal <tom at kera dot name> ---
Build error:

/////////////////////////////
main.cpp: In instantiation of 'main()::<lambda(auto:1)> [with auto:1 = int]':
/usr/local/include/c++/4.9.2/functional:2149:71:   required by substitution of
'template<class _Res, class ... _ArgTypes> template<class _Functor> using
_Invoke = decltype
(std::__callable_functor(declval<_Functor&>())((declval<_ArgTypes>)()...))
[with _Functor = main()::<lambda(auto:1)> _Res = void; _ArgTypes = {int}]'
/usr/local/include/c++/4.9.2/functional:2225:9:   required by substitution of
'template<class _Functor, class> std::function<_Res(_ArgTypes
...)>::function(_Functor) [with _Functor = main()::<lambda(auto:1)>
<template-parameter-1-2> = <missing>]'
main.cpp:7:90:   required from here
main.cpp:7:58: error: 'a' was not declared in this scope
     std::function<void(int)> f = [&](auto b) { std::cout << a << ", " << b <<
std::endl; };
                                                          ^
/////////////////////////////

Reply via email to