Created
February 16, 2016 06:52
-
-
Save xaxxon/bec702f3ed3698066442 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/tmp/gcc-explorer-compiler116116-74-1kmjlf1/example.cpp: In function 'int main()': | |
18 : error: no match for call to '(std::_Bind<std::_Mem_fn<void (foo::*)(int)>(std::_Placeholder<1>, int)>) (std::reference_wrapper<foo>&)' | |
b2(rw); | |
^ | |
In file included from /tmp/gcc-explorer-compiler116116-74-1kmjlf1/example.cpp:1:0: | |
/opt/gcc-5.3.0/include/c++/5.3.0/functional:1129: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<void (foo::*)(int)>; _Bound_args = {std::_Placeholder<1>, int}] | |
operator()(_Args&&... __args) | |
^ | |
/opt/gcc-5.3.0/include/c++/5.3.0/functional:1129:2: note: template argument deduction/substitution failed: | |
/opt/gcc-5.3.0/include/c++/5.3.0/functional:1125:38: error: call of '(std::_Mem_fn<void (foo::*)(int)>) (std::reference_wrapper<foo>&, int&)' is ambiguous | |
= decltype( std::declval<_Functor>()( | |
^ | |
/opt/gcc-5.3.0/include/c++/5.3.0/functional:582:2: note: candidate: std::_Mem_fn_base<_MemFunPtr, __is_mem_fn>::result_type std::_Mem_fn_base<_MemFunPtr, __is_mem_fn>::operator()(std::_Mem_fn_base<_MemFunPtr, __is_mem_fn>::_Class&, _Args&& ...) const [with _Args = {int&}; _Req = void; _MemFunPtr = void (foo::*)(int); bool __is_mem_fn = true; std::_Mem_fn_base<_MemFunPtr, __is_mem_fn>::result_type = void; std::_Mem_fn_base<_MemFunPtr, __is_mem_fn>::_Class = foo] | |
operator()(_Class& __object, _Args&&... __args) const | |
^ | |
/opt/gcc-5.3.0/include/c++/5.3.0/functional:607:2: note: candidate: std::_Mem_fn_base<_MemFunPtr, __is_mem_fn>::result_type std::_Mem_fn_base<_MemFunPtr, __is_mem_fn>::operator()(_Tp&&, _Args&& ...) const [with _Tp = std::reference_wrapper<foo>&; _Args = {int&}; _Req = void; _MemFunPtr = void (foo::*)(int); bool __is_mem_fn = true; std::_Mem_fn_base<_MemFunPtr, __is_mem_fn>::result_type = void] | |
operator()(_Tp&& __object, _Args&&... __args) const | |
^ | |
/opt/gcc-5.3.0/include/c++/5.3.0/functional:618:2: note: candidate: std::_Mem_fn_base<_MemFunPtr, __is_mem_fn>::result_type std::_Mem_fn_base<_MemFunPtr, __is_mem_fn>::operator()(std::reference_wrapper<_Tp>, _Args&& ...) const [with _Tp = foo; _Args = {int&}; _Req = void; _MemFunPtr = void (foo::*)(int); bool __is_mem_fn = true; std::_Mem_fn_base<_MemFunPtr, __is_mem_fn>::result_type = void] | |
operator()(reference_wrapper<_Tp> __ref, _Args&&... __args) const | |
^ | |
/opt/gcc-5.3.0/include/c++/5.3.0/functional:1143: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<void (foo::*)(int)>; _Bound_args = {std::_Placeholder<1>, int}] | |
operator()(_Args&&... __args) const | |
^ | |
/opt/gcc-5.3.0/include/c++/5.3.0/functional:1143:2: note: template argument deduction/substitution failed: | |
/opt/gcc-5.3.0/include/c++/5.3.0/functional:1139:52: error: call of '(const std::_Mem_fn<void (foo::*)(int)>) (std::reference_wrapper<foo>&, const int&)' is ambiguous | |
typename add_const<_Functor>::type>::type>()( | |
^ | |
/opt/gcc-5.3.0/include/c++/5.3.0/functional:582:2: note: candidate: std::_Mem_fn_base<_MemFunPtr, __is_mem_fn>::result_type std::_Mem_fn_base<_MemFunPtr, __is_mem_fn>::operator()(std::_Mem_fn_base<_MemFunPtr, __is_mem_fn>::_Class&, _Args&& ...) const [with _Args = {const int&}; _Req = void; _MemFunPtr = void (foo::*)(int); bool __is_mem_fn = true; std::_Mem_fn_base<_MemFunPtr, __is_mem_fn>::result_type = void; std::_Mem_fn_base<_MemFunPtr, __is_mem_fn>::_Class = foo] | |
operator()(_Class& __object, _Args&&... __args) const | |
^ | |
/opt/gcc-5.3.0/include/c++/5.3.0/functional:607:2: note: candidate: std::_Mem_fn_base<_MemFunPtr, __is_mem_fn>::result_type std::_Mem_fn_base<_MemFunPtr, __is_mem_fn>::operator()(_Tp&&, _Args&& ...) const [with _Tp = std::reference_wrapper<foo>&; _Args = {const int&}; _Req = void; _MemFunPtr = void (foo::*)(int); bool __is_mem_fn = true; std::_Mem_fn_base<_MemFunPtr, __is_mem_fn>::result_type = void] | |
operator()(_Tp&& __object, _Args&&... __args) const | |
^ | |
/opt/gcc-5.3.0/include/c++/5.3.0/functional:618:2: note: candidate: std::_Mem_fn_base<_MemFunPtr, __is_mem_fn>::result_type std::_Mem_fn_base<_MemFunPtr, __is_mem_fn>::operator()(std::reference_wrapper<_Tp>, _Args&& ...) const [with _Tp = foo; _Args = {const int&}; _Req = void; _MemFunPtr = void (foo::*)(int); bool __is_mem_fn = true; std::_Mem_fn_base<_MemFunPtr, __is_mem_fn>::result_type = void] | |
operator()(reference_wrapper<_Tp> __ref, _Args&&... __args) const | |
^ | |
/opt/gcc-5.3.0/include/c++/5.3.0/functional:1157: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<void (foo::*)(int)>; _Bound_args = {std::_Placeholder<1>, int}] | |
operator()(_Args&&... __args) volatile | |
^ | |
/opt/gcc-5.3.0/include/c++/5.3.0/functional:1157:2: note: template argument deduction/substitution failed: | |
[Truncated] | |
Compilation failed |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment