>> [&](const sf::String& item) {
>> if (item == "Exit")
>> mWindow.close();
>> }
I did try that but I could not get the code to compile.
1> Game.cpp
1>d:\programs\visual studio\vc\include\type_traits(1441): error C2672: 'std::invoke': no matching overloaded function found
1> d:\programs\visual studio\vc\include\functional(792): note: see reference to function template instantiation '_Rx std::_Invoke_ret<std::_Unforced,_Cv_FD&>(std::_Forced<_Rx,false>,_Cv_FD &)' being compiled
1> with
1> [
1> _Rx=std::_Unforced,
1> _Cv_FD=Game::{ctor}::<lambda_8d0a58af01f3e7092cc3ce1902335683>
1> ]
1> d:\programs\visual studio\vc\include\functional(847): note: see reference to function template instantiation '_Rx std::_Call_binder<std::_Unforced,,_Ty1,_Ty2,std::tuple<>>(std::_Forced<_Rx,false>,std::integer_sequence<_Ty>,_Cv_FD &,_Cv_tuple_TiD &,_Untuple &&)' being compiled
1> with
1> [
1> _Rx=std::_Unforced,
1> _Ty1=Game::{ctor}::<lambda_8d0a58af01f3e7092cc3ce1902335683>,
1> _Ty2=std::tuple<>,
1> _Ty=size_t,
1> _Cv_FD=Game::{ctor}::<lambda_8d0a58af01f3e7092cc3ce1902335683>,
1> _Cv_tuple_TiD=std::tuple<>,
1> _Untuple=std::tuple<>
1> ]
1> d:\programs\visual studio\vc\include\type_traits(1349): note: see reference to function template instantiation '_Rx std::_Binder<std::_Unforced,Func &>::operator ()<>(void)' being compiled
1> with
1> [
1> _Rx=std::_Unforced,
1> Func=Game::{ctor}::<lambda_8d0a58af01f3e7092cc3ce1902335683>
1> ]
1> d:\programs\visual studio\vc\include\type_traits(1348): note: see reference to function template instantiation '_Rx std::_Binder<std::_Unforced,Func &>::operator ()<>(void)' being compiled
1> with
1> [
1> _Rx=std::_Unforced,
1> Func=Game::{ctor}::<lambda_8d0a58af01f3e7092cc3ce1902335683>
1> ]
1> d:\programs\visual studio\vc\include\type_traits(1417): note: see reference to function template instantiation '_Rx std::_Invoker_functor::_Call<_Callable&,>(std::_Binder<std::_Unforced,Func &>)' being compiled
1> with
1> [
1> _Rx=std::_Unforced,
1> _Callable=_Decayed,
1> Func=Game::{ctor}::<lambda_8d0a58af01f3e7092cc3ce1902335683>
1> ]
1> d:\programs\visual studio\vc\include\type_traits(1434): note: see reference to function template instantiation '_Rx std::invoke<_Callable&,>(std::_Binder<std::_Unforced,Func &>)' being compiled
1> with
1> [
1> _Rx=std::_Unforced,
1> _Callable=_Decayed,
1> Func=Game::{ctor}::<lambda_8d0a58af01f3e7092cc3ce1902335683>
1> ]
1> d:\programs\visual studio\vc\include\functional(208): note: see reference to function template instantiation 'void std::_Invoke_ret<_Rx,_Callable&>(std::_Forced<_Rx,true>,_Callable &)' being compiled
1> with
1> [
1> _Rx=void,
1> _Callable=_Decayed
1> ]
1> d:\programs\visual studio\vc\include\functional(206): note: while compiling class template member function 'void std::_Func_impl<_Decayed,_Alloc,_Ret>::_Do_call(void)'
1> with
1> [
1> _Alloc=std::allocator<int>,
1> _Ret=void
1> ]
1> d:\programs\visual studio\vc\include\functional(134): note: see reference to class template instantiation 'std::_Func_impl<_Decayed,_Alloc,_Ret>' being compiled
1> with
1> [
1> _Alloc=std::allocator<int>,
1> _Ret=void
1> ]
1> d:\programs\visual studio\vc\include\functional(337): note: see reference to class template instantiation 'std::_Is_large<_Myimpl>' being compiled
1> d:\programs\visual studio\vc\include\functional(316): note: see reference to function template instantiation 'void std::_Func_class<_Ret>::_Reset_alloc<_Ty,std::allocator<int>>(_Fx &&,const _Alloc &)' being compiled
1> with
1> [
1> _Ret=void,
1> _Ty=std::_Binder<std::_Unforced,Game::{ctor}::<lambda_8d0a58af01f3e7092cc3ce1902335683> &>,
1> _Fx=std::_Binder<std::_Unforced,Game::{ctor}::<lambda_8d0a58af01f3e7092cc3ce1902335683> &>,
1> _Alloc=std::allocator<int>
1> ]
1> d:\programs\visual studio\vc\include\functional(316): note: see reference to function template instantiation 'void std::_Func_class<_Ret>::_Reset_alloc<_Ty,std::allocator<int>>(_Fx &&,const _Alloc &)' being compiled
1> with
1> [
1> _Ret=void,
1> _Ty=std::_Binder<std::_Unforced,Game::{ctor}::<lambda_8d0a58af01f3e7092cc3ce1902335683> &>,
1> _Fx=std::_Binder<std::_Unforced,Game::{ctor}::<lambda_8d0a58af01f3e7092cc3ce1902335683> &>,
1> _Alloc=std::allocator<int>
1> ]
1> d:\programs\visual studio\vc\include\functional(482): note: see reference to function template instantiation 'void std::_Func_class<_Ret>::_Reset<std::_Binder<std::_Unforced,Func &>>(_Fx &&)' being compiled
1> with
1> [
1> _Ret=void,
1> Func=Game::{ctor}::<lambda_8d0a58af01f3e7092cc3ce1902335683>,
1> _Fx=std::_Binder<std::_Unforced,Game::{ctor}::<lambda_8d0a58af01f3e7092cc3ce1902335683> &>
1> ]
1> d:\programs\visual studio\vc\include\functional(482): note: see reference to function template instantiation 'void std::_Func_class<_Ret>::_Reset<std::_Binder<std::_Unforced,Func &>>(_Fx &&)' being compiled
1> with
1> [
1> _Ret=void,
1> Func=Game::{ctor}::<lambda_8d0a58af01f3e7092cc3ce1902335683>,
1> _Fx=std::_Binder<std::_Unforced,Game::{ctor}::<lambda_8d0a58af01f3e7092cc3ce1902335683> &>
1> ]
1> d:\tgui\tgui-0.7.2-vc14-32bit-for-sfml-2.4.1\tgui-0.7\include\tgui\signal.hpp(160): note: see reference to function template instantiation 'std::function<void (void)>::function<std::_Binder<std::_Unforced,Func &>>(_Fx)' being compiled
1> with
1> [
1> Func=Game::{ctor}::<lambda_8d0a58af01f3e7092cc3ce1902335683>,
1> _Fx=std::_Binder<std::_Unforced,Game::{ctor}::<lambda_8d0a58af01f3e7092cc3ce1902335683> &>
1> ]
1> d:\tgui\tgui-0.7.2-vc14-32bit-for-sfml-2.4.1\tgui-0.7\include\tgui\signal.hpp(160): note: see reference to function template instantiation 'std::function<void (void)>::function<std::_Binder<std::_Unforced,Func &>>(_Fx)' being compiled
1> with
1> [
1> Func=Game::{ctor}::<lambda_8d0a58af01f3e7092cc3ce1902335683>,
1> _Fx=std::_Binder<std::_Unforced,Game::{ctor}::<lambda_8d0a58af01f3e7092cc3ce1902335683> &>
1> ]
1> d:\tgui\tgui-0.7.2-vc14-32bit-for-sfml-2.4.1\tgui-0.7\include\tgui\signal.hpp(159): note: while compiling class template member function 'std::function<void (void)> tgui::priv::connector<type,Func>::connect(Func,size_t)'
1> with
1> [
1> Func=Game::{ctor}::<lambda_8d0a58af01f3e7092cc3ce1902335683>
1> ]
1> d:\tgui\tgui-0.7.2-vc14-32bit-for-sfml-2.4.1\tgui-0.7\include\tgui\signal.hpp(251): note: see reference to function template instantiation 'std::function<void (void)> tgui::priv::connector<type,Func>::connect(Func,size_t)' being compiled
1> with
1> [
1> Func=Game::{ctor}::<lambda_8d0a58af01f3e7092cc3ce1902335683>
1> ]
1> d:\tgui\tgui-0.7.2-vc14-32bit-for-sfml-2.4.1\tgui-0.7\include\tgui\signal.hpp(251): note: see reference to class template instantiation 'tgui::priv::connector<type,Func>' being compiled
1> with
1> [
1> Func=Game::{ctor}::<lambda_8d0a58af01f3e7092cc3ce1902335683>
1> ]
1> d:\tgui\tgui-0.7.2-vc14-32bit-for-sfml-2.4.1\tgui-0.7\include\tgui\signal.hpp(365): note: see reference to function template instantiation 'void tgui::Signal::connect<Func,>(unsigned int,Func)' being compiled
1> with
1> [
1> Func=Game::{ctor}::<lambda_8d0a58af01f3e7092cc3ce1902335683>
1> ]
1> d:\slip\projects\slipboard\game.cpp(99): note: see reference to function template instantiation 'unsigned int tgui::SignalWidgetBase::connect<Game::{ctor}::<lambda_8d0a58af01f3e7092cc3ce1902335683>,>(const std::string &,Func)' being compiled
1> with
1> [
1> Func=Game::{ctor}::<lambda_8d0a58af01f3e7092cc3ce1902335683>
1> ]
1>d:\programs\visual studio\vc\include\type_traits(1441): error C2893: Failed to specialize function template 'unknown-type std::invoke(_Callable &&,_Types &&...)'
1> d:\programs\visual studio\vc\include\type_traits(1441): note: With the following template arguments:
1> d:\programs\visual studio\vc\include\type_traits(1441): note: '_Callable=Game::{ctor}::<lambda_8d0a58af01f3e7092cc3ce1902335683> &'
1> d:\programs\visual studio\vc\include\type_traits(1441): note: '_Types={}'
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========