prog.cpp: In instantiation of ‘void execute(F, T) [with F = std::_Bind<std::_Mem_fn<bool (Foo::*)(const Foo&)>(std::_Placeholder<1>, Bar)>; T = Foo*]’:
prog.cpp:42:78: required from here
prog.cpp:26:34: error: no match for call to ‘(std::_Bind<std::_Mem_fn<bool (Foo::*)(const Foo&)>(std::_Placeholder<1>, Bar)>) (Foo*&)’
std::cout << "Result: " << f (a) << std::endl;
~~^~~
In file included from prog.cpp:1:0:
/usr/include/c++/6/functional:989:2: note: candidate: template<class ... _Args, class _Result> _Result std::_Bind<_Functor(_Bound_args ...)>::operator()(_Args&& ...) [with _Args = {_Args ...}; _Result = _Result; _Functor = std::_Mem_fn<bool (Foo::*)(const Foo&)>; _Bound_args = {std::_Placeholder<1>, Bar}]
operator()(_Args&&... __args)
^~~~~~~~
/usr/include/c++/6/functional:989:2: note: template argument deduction/substitution failed:
/usr/include/c++/6/functional:985:39: error: no match for call to ‘(std::_Mem_fn<bool (Foo::*)(const Foo&)>) (Foo*&, Bar&)’
= decltype( std::declval<_Functor&>()(
~~~~~~~~~~~~~~~~~~~~~~~~~^
_Mu<_Bound_args>()( std::declval<_Bound_args&>(),
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
std::declval<tuple<_Args...>&>() )... ) )>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/6/functional:600:2: note: candidate: template<class ... _Args> decltype (std::__invoke(((const std::_Mem_fn_base<_MemFunPtr, __is_mem_fn>*)this)->std::_Mem_fn_base<_MemFunPtr, __is_mem_fn>::_M_pmf, (forward<_Args>)(std::_Mem_fn_base::operator()::__args)...)) std::_Mem_fn_base<_MemFunPtr, __is_mem_fn>::operator()(_Args&& ...) const [with _Args = {_Args ...}; _MemFunPtr = bool (Foo::*)(const Foo&); bool __is_mem_fn = true]
operator()(_Args&&... __args) const
^~~~~~~~
/usr/include/c++/6/functional:600:2: note: template argument deduction/substitution failed:
/usr/include/c++/6/functional: In substitution of ‘template<class ... _Args> decltype (std::__invoke(((const std::_Mem_fn_base<_MemFunPtr, __is_mem_fn>*)this)->std::_Mem_fn_base<_MemFunPtr, __is_mem_fn>::_M_pmf, (forward<_Args>)(std::_Mem_fn_base::operator()::__args)...)) std::_Mem_fn_base<_MemFunPtr, __is_mem_fn>::operator()(_Args&& ...) const [with _Args = {Foo*&, Bar&}]’:
/usr/include/c++/6/functional:985:39: required from ‘void execute(F, T) [with F = std::_Bind<std::_Mem_fn<bool (Foo::*)(const Foo&)>(std::_Placeholder<1>, Bar)>; T = Foo*]’
prog.cpp:42:78: required from here
/usr/include/c++/6/functional:603:27: error: no matching function for call to ‘__invoke(bool (Foo::* const&)(const Foo&), Foo*&, Bar&)’
-> decltype(std::__invoke(_M_pmf, std::forward<_Args>(__args)...))
~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/6/functional:245:5: note: candidate: template<class _Callable, class ... _Args> typename std::result_of<_Callable&&(_Args&& ...)>::type std::__invoke(_Callable&&, _Args&& ...)
__invoke(_Callable&& __fn, _Args&&... __args)
^~~~~~~~
/usr/include/c++/6/functional:245:5: note: template argument deduction/substitution failed:
/usr/include/c++/6/functional: In substitution of ‘template<class _Callable, class ... _Args> typename std::result_of<_Callable&&(_Args&& ...)>::type std::__invoke(_Callable&&, _Args&& ...) [with _Callable = bool (Foo::* const&)(const Foo&); _Args = {Foo*&, Bar&}]’:
/usr/include/c++/6/functional:603:27: required by substitution of ‘template<class ... _Args> decltype (std::__invoke(((const std::_Mem_fn_base<_MemFunPtr, __is_mem_fn>*)this)->std::_Mem_fn_base<_MemFunPtr, __is_mem_fn>::_M_pmf, (forward<_Args>)(std::_Mem_fn_base::operator()::__args)...)) std::_Mem_fn_base<_MemFunPtr, __is_mem_fn>::operator()(_Args&& ...) const [with _Args = {Foo*&, Bar&}]’
/usr/include/c++/6/functional:985:39: required from ‘void execute(F, T) [with F = std::_Bind<std::_Mem_fn<bool (Foo::*)(const Foo&)>(std::_Placeholder<1>, Bar)>; T = Foo*]’
prog.cpp:42:78: required from here
/usr/include/c++/6/functional:245:5: error: no type named ‘type’ in ‘class std::result_of<bool (Foo::* const&(Foo*&, Bar&))(const Foo&)>’
prog.cpp: In instantiation of ‘void execute(F, T) [with F = std::_Bind<std::_Mem_fn<bool (Foo::*)(const Foo&)>(std::_Placeholder<1>, Bar)>; T = Foo*]’:
prog.cpp:42:78: required from here
/usr/include/c++/6/functional:1003:2: note: candidate: template<class ... _Args, class _Result> _Result std::_Bind<_Functor(_Bound_args ...)>::operator()(_Args&& ...) const [with _Args = {_Args ...}; _Result = _Result; _Functor = std::_Mem_fn<bool (Foo::*)(const Foo&)>; _Bound_args = {std::_Placeholder<1>, Bar}]
operator()(_Args&&... __args) const
^~~~~~~~
/usr/include/c++/6/functional:1003:2: note: template argument deduction/substitution failed:
/usr/include/c++/6/functional:999:53: error: no match for call to ‘(const std::_Mem_fn<bool (Foo::*)(const Foo&)>) (Foo*&, const Bar&)’
= decltype( std::declval<typename enable_if<(sizeof...(_Args) >= 0),
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
typename add_const<_Functor>::type&>::type>()(
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
/usr/include/c++/6/functional:600:2: note: candidate: template<class ... _Args> decltype (std::__invoke(((const std::_Mem_fn_base<_MemFunPtr, __is_mem_fn>*)this)->std::_Mem_fn_base<_MemFunPtr, __is_mem_fn>::_M_pmf, (forward<_Args>)(std::_Mem_fn_base::operator()::__args)...)) std::_Mem_fn_base<_MemFunPtr, __is_mem_fn>::operator()(_Args&& ...) const [with _Args = {_Args ...}; _MemFunPtr = bool (Foo::*)(const Foo&); bool __is_mem_fn = true]
operator()(_Args&&... __args) const
^~~~~~~~
/usr/include/c++/6/functional:600:2: note: template argument deduction/substitution failed:
/usr/include/c++/6/functional: In substitution of ‘template<class ... _Args> decltype (std::__invoke(((const std::_Mem_fn_base<_MemFunPtr, __is_mem_fn>*)this)->std::_Mem_fn_base<_MemFunPtr, __is_mem_fn>::_M_pmf, (forward<_Args>)(std::_Mem_fn_base::operator()::__args)...)) std::_Mem_fn_base<_MemFunPtr, __is_mem_fn>::operator()(_Args&& ...) const [with _Args = {Foo*&, const Bar&}]’:
/usr/include/c++/6/functional:999:53: required from ‘void execute(F, T) [with F = std::_Bind<std::_Mem_fn<bool (Foo::*)(const Foo&)>(std::_Placeholder<1>, Bar)>; T = Foo*]’
prog.cpp:42:78: required from here
/usr/include/c++/6/functional:603:27: error: no matching function for call to ‘__invoke(bool (Foo::* const&)(const Foo&), Foo*&, const Bar&)’
-> decltype(std::__invoke(_M_pmf, std::forward<_Args>(__args)...))
~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/6/functional:245:5: note: candidate: template<class _Callable, class ... _Args> typename std::result_of<_Callable&&(_Args&& ...)>::type std::__invoke(_Callable&&, _Args&& ...)
__invoke(_Callable&& __fn, _Args&&... __args)
^~~~~~~~
/usr/include/c++/6/functional:245:5: note: template argument deduction/substitution failed:
/usr/include/c++/6/functional: In substitution of ‘template<class _Callable, class ... _Args> typename std::result_of<_Callable&&(_Args&& ...)>::type std::__invoke(_Callable&&, _Args&& ...) [with _Callable = bool (Foo::* const&)(const Foo&); _Args = {Foo*&, const Bar&}]’:
/usr/include/c++/6/functional:603:27: required by substitution of ‘template<class ... _Args> decltype (std::__invoke(((const std::_Mem_fn_base<_MemFunPtr, __is_mem_fn>*)this)->std::_Mem_fn_base<_MemFunPtr, __is_mem_fn>::_M_pmf, (forward<_Args>)(std::_Mem_fn_base::operator()::__args)...)) std::_Mem_fn_base<_MemFunPtr, __is_mem_fn>::operator()(_Args&& ...) const [with _Args = {Foo*&, const Bar&}]’
/usr/include/c++/6/functional:999:53: required from ‘void execute(F, T) [with F = std::_Bind<std::_Mem_fn<bool (Foo::*)(const Foo&)>(std::_Placeholder<1>, Bar)>; T = Foo*]’
prog.cpp:42:78: required from here
/usr/include/c++/6/functional:245:5: error: no type named ‘type’ in ‘class std::result_of<bool (Foo::* const&(Foo*&, const Bar&))(const Foo&)>’
prog.cpp: In instantiation of ‘void execute(F, T) [with F = std::_Bind<std::_Mem_fn<bool (Foo::*)(const Foo&)>(std::_Placeholder<1>, Bar)>; T = Foo*]’:
prog.cpp:42:78: required from here
/usr/include/c++/6/functional:1017:2: note: candidate: template<class ... _Args, class _Result> _Result std::_Bind<_Functor(_Bound_args ...)>::operator()(_Args&& ...) volatile [with _Args = {_Args ...}; _Result = _Result; _Functor = std::_Mem_fn<bool (Foo::*)(const Foo&)>; _Bound_args = {std::_Placeholder<1>, Bar}]
operator()(_Args&&... __args) volatile
^~~~~~~~
/usr/include/c++/6/functional:1017:2: note: template argument deduction/substitution failed:
/usr/include/c++/6/functional:1013:70: error: no match for call to ‘(volatile std::_Mem_fn<bool (Foo::*)(const Foo&)>) (Foo*&, volatile Bar&)’
= decltype( std::declval<typename enable_if<(sizeof...(_Args) >= 0),
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
typename add_volatile<_Functor>::type&>::type>()(
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
/usr/include/c++/6/functional:600:2: note: candidate: template<class ... _Args> decltype (std::__invoke(((const std::_Mem_fn_base<_MemFunPtr, __is_mem_fn>*)this)->std::_Mem_fn_base<_MemFunPtr, __is_mem_fn>::_M_pmf, (forward<_Args>)(std::_Mem_fn_base::operator()::__args)...)) std::_Mem_fn_base<_MemFunPtr, __is_mem_fn>::operator()(_Args&& ...) const [with _Args = {_Args ...}; _MemFunPtr = bool (Foo::*)(const Foo&); bool __is_mem_fn = true]
operator()(_Args&&... __args) const
^~~~~~~~
/usr/include/c++/6/functional:600:2: note: template argument deduction/substitution failed:
/usr/include/c++/6/functional: In substitution of ‘template<class ... _Args> decltype (std::__invoke(((const std::_Mem_fn_base<_MemFunPtr, __is_mem_fn>*)this)->std::_Mem_fn_base<_MemFunPtr, __is_mem_fn>::_M_pmf, (forward<_Args>)(std::_Mem_fn_base::operator()::__args)...)) std::_Mem_fn_base<_MemFunPtr, __is_mem_fn>::operator()(_Args&& ...) const [with _Args = {Foo*&, volatile Bar&}]’:
/usr/include/c++/6/functional:1013:70: required from ‘void execute(F, T) [with F = std::_Bind<std::_Mem_fn<bool (Foo::*)(const Foo&)>(std::_Placeholder<1>, Bar)>; T = Foo*]’
prog.cpp:42:78: required from here
/usr/include/c++/6/functional:603:27: error: no matching function for call to ‘__invoke(bool (Foo::* const&)(const Foo&), Foo*&, volatile Bar&)’
-> decltype(std::__invoke(_M_pmf, std::forward<_Args>(__args)...))
~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/6/functional:245:5: note: candidate: template<class _Callable, class ... _Args> typename std::result_of<_Callable&&(_Args&& ...)>::type std::__invoke(_Callable&&, _Args&& ...)
__invoke(_Callable&& __fn, _Args&&... __args)
^~~~~~~~
/usr/include/c++/6/functional:245:5: note: template argument deduction/substitution failed:
/usr/include/c++/6/functional: In substitution of ‘template<class _Callable, class ... _Args> typename std::result_of<_Callable&&(_Args&& ...)>::type std::__invoke(_Callable&&, _Args&& ...) [with _Callable = bool (Foo::* const&)(const Foo&); _Args = {Foo*&, volatile Bar&}]’:
/usr/include/c++/6/functional:603:27: required by substitution of ‘template<class ... _Args> decltype (std::__invoke(((const std::_Mem_fn_base<_MemFunPtr, __is_mem_fn>*)this)->std::_Mem_fn_base<_MemFunPtr, __is_mem_fn>::_M_pmf, (forward<_Args>)(std::_Mem_fn_base::operator()::__args)...)) std::_Mem_fn_base<_MemFunPtr, __is_mem_fn>::operator()(_Args&& ...) const [with _Args = {Foo*&, volatile Bar&}]’
/usr/include/c++/6/functional:1013:70: required from ‘void execute(F, T) [with F = std::_Bind<std::_Mem_fn<bool (Foo::*)(const Foo&)>(std::_Placeholder<1>, Bar)>; T = Foo*]’
prog.cpp:42:78: required from here
/usr/include/c++/6/functional:245:5: error: no type named ‘type’ in ‘class std::result_of<bool (Foo::* const&(Foo*&, volatile Bar&))(const Foo&)>’
prog.cpp: In instantiation of ‘void execute(F, T) [with F = std::_Bind<std::_Mem_fn<bool (Foo::*)(const Foo&)>(std::_Placeholder<1>, Bar)>; T = Foo*]’:
prog.cpp:42:78: required from here
/usr/include/c++/6/functional:1031:2: note: candidate: template<class ... _Args, class _Result> _Result std::_Bind<_Functor(_Bound_args ...)>::operator()(_Args&& ...) const volatile [with _Args = {_Args ...}; _Result = _Result; _Functor = std::_Mem_fn<bool (Foo::*)(const Foo&)>; _Bound_args = {std::_Placeholder<1>, Bar}]
operator()(_Args&&... __args) const volatile
^~~~~~~~
/usr/include/c++/6/functional:1031:2: note: template argument deduction/substitution failed:
/usr/include/c++/6/functional:1027:64: error: no match for call to ‘(const volatile std::_Mem_fn<bool (Foo::*)(const Foo&)>) (Foo*&, const volatile Bar&)’
= decltype( std::declval<typename enable_if<(sizeof...(_Args) >= 0),
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
typename add_cv<_Functor>::type&>::type>()(
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
/usr/include/c++/6/functional:600:2: note: candidate: template<class ... _Args> decltype (std::__invoke(((const std::_Mem_fn_base<_MemFunPtr, __is_mem_fn>*)this)->std::_Mem_fn_base<_MemFunPtr, __is_mem_fn>::_M_pmf, (forward<_Args>)(std::_Mem_fn_base::operator()::__args)...)) std::_Mem_fn_base<_MemFunPtr, __is_mem_fn>::operator()(_Args&& ...) const [with _Args = {_Args ...}; _MemFunPtr = bool (Foo::*)(const Foo&); bool __is_mem_fn = true]
operator()(_Args&&... __args) const
^~~~~~~~
/usr/include/c++/6/functional:600:2: note: template argument deduction/substitution failed:
/usr/include/c++/6/functional: In substitution of ‘template<class ... _Args> decltype (std::__invoke(((const std::_Mem_fn_base<_MemFunPtr, __is_mem_fn>*)this)->std::_Mem_fn_base<_MemFunPtr, __is_mem_fn>::_M_pmf, (forward<_Args>)(std::_Mem_fn_base::operator()::__args)...)) std::_Mem_fn_base<_MemFunPtr, __is_mem_fn>::operator()(_Args&& ...) const [with _Args = {Foo*&, const volatile Bar&}]’:
/usr/include/c++/6/functional:1027:64: required from ‘void execute(F, T) [with F = std::_Bind<std::_Mem_fn<bool (Foo::*)(const Foo&)>(std::_Placeholder<1>, Bar)>; T = Foo*]’
prog.cpp:42:78: required from here
/usr/include/c++/6/functional:603:27: error: no matching function for call to ‘__invoke(bool (Foo::* const&)(const Foo&), Foo*&, const volatile Bar&)’
-> decltype(std::__invoke(_M_pmf, std::forward<_Args>(__args)...))
~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/6/functional:245:5: note: candidate: template<class _Callable, class ... _Args> typename std::result_of<_Callable&&(_Args&& ...)>::type std::__invoke(_Callable&&, _Args&& ...)
__invoke(_Callable&& __fn, _Args&&... __args)
^~~~~~~~
/usr/include/c++/6/functional:245:5: note: template argument deduction/substitution failed:
/usr/include/c++/6/functional: In substitution of ‘template<class _Callable, class ... _Args> typename std::result_of<_Callable&&(_Args&& ...)>::type std::__invoke(_Callable&&, _Args&& ...) [with _Callable = bool (Foo::* const&)(const Foo&); _Args = {Foo*&, const volatile Bar&}]’:
/usr/include/c++/6/functional:603:27: required by substitution of ‘template<class ... _Args> decltype (std::__invoke(((const std::_Mem_fn_base<_MemFunPtr, __is_mem_fn>*)this)->std::_Mem_fn_base<_MemFunPtr, __is_mem_fn>::_M_pmf, (forward<_Args>)(std::_Mem_fn_base::operator()::__args)...)) std::_Mem_fn_base<_MemFunPtr, __is_mem_fn>::operator()(_Args&& ...) const [with _Args = {Foo*&, const volatile Bar&}]’
/usr/include/c++/6/functional:1027:64: required from ‘void execute(F, T) [with F = std::_Bind<std::_Mem_fn<bool (Foo::*)(const Foo&)>(std::_Placeholder<1>, Bar)>; T = Foo*]’
prog.cpp:42:78: required from here
/usr/include/c++/6/functional:245:5: error: no type named ‘type’ in ‘class std::result_of<bool (Foo::* const&(Foo*&, const volatile Bar&))(const Foo&)>’