#include <functional>
#include <iostream>
template <typename Function, typename... Args>
auto f(Function func, Args... args) -> decltype(func(args...))
{
auto f11 = std::bind(func, args...);
f11();
}
int sum(int a, int b)
{
return a + b;
}
void print(const char* string)
{
std::cout << string << std::endl;
}
int main(int argc, char ** argv)
{
std::cout << f(sum, 1, 2) << std::endl;
f([] (const char* additional, const char* more) {
std::cout << "hello ( " << additional << ", " << more << " )" << std::endl;
}, "additional text", "and one more");
auto printFunction = std::bind(&print, std::placeholders::_1);
printFunction("hello from print bind");
f(print, "hello from print directly");
f([&printFunction] (std::function<void(const char*)> printParamFunc) {
printParamFunc("hello from print from std::function");
}, printFunction);
}
I2luY2x1ZGUgPGZ1bmN0aW9uYWw+CiNpbmNsdWRlIDxpb3N0cmVhbT4KCnRlbXBsYXRlIDx0eXBlbmFtZSBGdW5jdGlvbiwgdHlwZW5hbWUuLi4gQXJncz4KYXV0byBmKEZ1bmN0aW9uIGZ1bmMsIEFyZ3MuLi4gYXJncykgLT4gZGVjbHR5cGUoZnVuYyhhcmdzLi4uKSkKewoJYXV0byBmMTEgPSBzdGQ6OmJpbmQoZnVuYywgYXJncy4uLik7CglmMTEoKTsKfQoKaW50IHN1bShpbnQgYSwgaW50IGIpCnsKCXJldHVybiBhICsgYjsgCn0KCnZvaWQgcHJpbnQoY29uc3QgY2hhciogc3RyaW5nKQp7CglzdGQ6OmNvdXQgPDwgc3RyaW5nIDw8IHN0ZDo6ZW5kbDsKfQoKaW50IG1haW4oaW50IGFyZ2MsIGNoYXIgKiogYXJndikKewoJc3RkOjpjb3V0IDw8IGYoc3VtLCAxLCAyKSA8PCBzdGQ6OmVuZGw7CgoJZihbXSAoY29uc3QgY2hhciogYWRkaXRpb25hbCwgY29uc3QgY2hhciogbW9yZSkgewoJCXN0ZDo6Y291dCA8PCAiaGVsbG8gKCAiIDw8IGFkZGl0aW9uYWwgPDwgIiwgIiA8PCBtb3JlIDw8ICIgKSIgPDwgc3RkOjplbmRsOwoJfSwgImFkZGl0aW9uYWwgdGV4dCIsICJhbmQgb25lIG1vcmUiKTsKCglhdXRvIHByaW50RnVuY3Rpb24gPSBzdGQ6OmJpbmQoJnByaW50LCBzdGQ6OnBsYWNlaG9sZGVyczo6XzEpOwoJCglwcmludEZ1bmN0aW9uKCJoZWxsbyBmcm9tIHByaW50IGJpbmQiKTsKCQoJZihwcmludCwgImhlbGxvIGZyb20gcHJpbnQgZGlyZWN0bHkiKTsKCglmKFsmcHJpbnRGdW5jdGlvbl0gKHN0ZDo6ZnVuY3Rpb248dm9pZChjb25zdCBjaGFyKik+IHByaW50UGFyYW1GdW5jKSB7CgkJIHByaW50UGFyYW1GdW5jKCJoZWxsbyBmcm9tIHByaW50IGZyb20gc3RkOjpmdW5jdGlvbiIpOwoJfSwgcHJpbnRGdW5jdGlvbik7Cn0=
prog.cpp: In instantiation of ‘decltype (func(f::args ...)) f(Function, Args ...) [with Function = int (*)(int, int); Args = {int, int}; decltype (func(f::args ...)) = int]’:
prog.cpp:23:26: required from here
prog.cpp:9:1: warning: no return statement in function returning non-void [-Wreturn-type]
}
^
prog.cpp: In instantiation of ‘decltype (func(f::args ...)) f(Function, Args ...) [with Function = main(int, char**)::__lambda1; Args = {std::_Bind<void (*(std::_Placeholder<1>))(const char*)>}; decltype (func(f::args ...)) = void]’:
prog.cpp:37:18: required from here
prog.cpp:8:6: error: no match for call to ‘(std::_Bind<main(int, char**)::__lambda1(std::_Bind<void (*(std::_Placeholder<1>))(const char*)>)>) ()’
f11();
^
In file included from prog.cpp:1:0:
/usr/include/c++/4.8/functional:1280:11: note: candidates are:
class _Bind<_Functor(_Bound_args...)>
^
/usr/include/c++/4.8/functional:1351:2: note: template<class ... _Args, class _Result> _Result std::_Bind<_Functor(_Bound_args ...)>::operator()(_Args&& ...) [with _Args = {_Args ...}; _Result = _Result; _Functor = main(int, char**)::__lambda1; _Bound_args = {std::_Bind<void (*(std::_Placeholder<1>))(const char*)>}]
operator()(_Args&&... __args)
^
/usr/include/c++/4.8/functional:1351:2: note: template argument deduction/substitution failed:
/usr/include/c++/4.8/functional:1349:40: error: no match for call to ‘(std::_Mu<std::_Bind<void (*(std::_Placeholder<1>))(const char*)>, true, false>) (std::_Bind<void (*(std::_Placeholder<1>))(const char*)>&, std::tuple<>&)’
std::declval<tuple<_Args...>&>() )... ) )>
^
/usr/include/c++/4.8/functional:1131:11: note: candidate is:
class _Mu<_Arg, true, false>
^
/usr/include/c++/4.8/functional:1136:2: note: template<class _CVArg, class ... _Args> decltype (__arg((declval<_Args>)()...)) std::_Mu<_Arg, true, false>::operator()(_CVArg&, std::tuple<_Args2 ...>&) const volatile [with _CVArg = _CVArg; _Args = {_Args ...}; _Arg = std::_Bind<void (*(std::_Placeholder<1>))(const char*)>]
operator()(_CVArg& __arg,
^
/usr/include/c++/4.8/functional:1136:2: note: template argument deduction/substitution failed:
/usr/include/c++/4.8/functional: In substitution of ‘template<class _CVArg, class ... _Args> decltype (__arg((declval<_Args>)()...)) std::_Mu<_Arg, true, false>::operator()(_CVArg&, std::tuple<_Args2 ...>&) const volatile [with _CVArg = _CVArg; _Args = {_Args ...}; _Arg = std::_Bind<void (*(std::_Placeholder<1>))(const char*)>] [with _CVArg = std::_Bind<void (*(std::_Placeholder<1>))(const char*)>; _Args = {}]’:
/usr/include/c++/4.8/functional:1349:40: required from ‘decltype (func(f::args ...)) f(Function, Args ...) [with Function = main(int, char**)::__lambda1; Args = {std::_Bind<void (*(std::_Placeholder<1>))(const char*)>}; decltype (func(f::args ...)) = void]’
prog.cpp:37:18: required from here
/usr/include/c++/4.8/functional:1138:39: error: no match for call to ‘(std::_Bind<void (*(std::_Placeholder<1>))(const char*)>) ()’
-> decltype(__arg(declval<_Args>()...))
^
/usr/include/c++/4.8/functional:1280:11: note: candidates are:
class _Bind<_Functor(_Bound_args...)>
^
/usr/include/c++/4.8/functional:1351:2: note: template<class ... _Args, class _Result> _Result std::_Bind<_Functor(_Bound_args ...)>::operator()(_Args&& ...) [with _Args = {_Args ...}; _Result = _Result; _Functor = void (*)(const char*); _Bound_args = {std::_Placeholder<1>}]
operator()(_Args&&... __args)
^
/usr/include/c++/4.8/functional:1351:2: note: template argument deduction/substitution failed:
/usr/include/c++/4.8/functional:1347:37: error: cannot convert ‘std::_No_tuple_element’ to ‘const char*’ in argument passing
= decltype( std::declval<_Functor>()(
^
/usr/include/c++/4.8/functional:1365:2: note: template<class ... _Args, class _Result> _Result std::_Bind<_Functor(_Bound_args ...)>::operator()(_Args&& ...) const [with _Args = {_Args ...}; _Result = _Result; _Functor = void (*)(const char*); _Bound_args = {std::_Placeholder<1>}]
operator()(_Args&&... __args) const
^
/usr/include/c++/4.8/functional:1365:2: note: template argument deduction/substitution failed:
/usr/include/c++/4.8/functional:1361:53: error: cannot convert ‘std::_No_tuple_element’ to ‘const char*’ in argument passing
typename add_const<_Functor>::type>::type>()(
^
/usr/include/c++/4.8/functional:1379:2: note: template<class ... _Args, class _Result> _Result std::_Bind<_Functor(_Bound_args ...)>::operator()(_Args&& ...) volatile [with _Args = {_Args ...}; _Result = _Result; _Functor = void (*)(const char*); _Bound_args = {std::_Placeholder<1>}]
operator()(_Args&&... __args) volatile
^
/usr/include/c++/4.8/functional:1379:2: note: template argument deduction/substitution failed:
/usr/include/c++/4.8/functional:1375:70: error: cannot convert ‘std::_No_tuple_element’ to ‘const char*’ in argument passing
typename add_volatile<_Functor>::type>::type>()(
^
/usr/include/c++/4.8/functional:1393:2: note: template<class ... _Args, class _Result> _Result std::_Bind<_Functor(_Bound_args ...)>::operator()(_Args&& ...) const volatile [with _Args = {_Args ...}; _Result = _Result; _Functor = void (*)(const char*); _Bound_args = {std::_Placeholder<1>}]
operator()(_Args&&... __args) const volatile
^
/usr/include/c++/4.8/functional:1393:2: note: template argument deduction/substitution failed:
/usr/include/c++/4.8/functional:1389:64: error: cannot convert ‘std::_No_tuple_element’ to ‘const char*’ in argument passing
typename add_cv<_Functor>::type>::type>()(
^
prog.cpp: In instantiation of ‘decltype (func(f::args ...)) f(Function, Args ...) [with Function = main(int, char**)::__lambda1; Args = {std::_Bind<void (*(std::_Placeholder<1>))(const char*)>}; decltype (func(f::args ...)) = void]’:
prog.cpp:37:18: required from here
/usr/include/c++/4.8/functional:1365:2: note: template<class ... _Args, class _Result> _Result std::_Bind<_Functor(_Bound_args ...)>::operator()(_Args&& ...) const [with _Args = {_Args ...}; _Result = _Result; _Functor = main(int, char**)::__lambda1; _Bound_args = {std::_Bind<void (*(std::_Placeholder<1>))(const char*)>}]
operator()(_Args&&... __args) const
^
/usr/include/c++/4.8/functional:1365:2: note: template argument deduction/substitution failed:
/usr/include/c++/4.8/functional:1363:40: error: no match for call to ‘(std::_Mu<std::_Bind<void (*(std::_Placeholder<1>))(const char*)>, true, false>) (const std::_Bind<void (*(std::_Placeholder<1>))(const char*)>&, std::tuple<>&)’
std::declval<tuple<_Args...>&>() )... ) )>
^
/usr/include/c++/4.8/functional:1131:11: note: candidate is:
class _Mu<_Arg, true, false>
^
/usr/include/c++/4.8/functional:1136:2: note: template<class _CVArg, class ... _Args> decltype (__arg((declval<_Args>)()...)) std::_Mu<_Arg, true, false>::operator()(_CVArg&, std::tuple<_Args2 ...>&) const volatile [with _CVArg = _CVArg; _Args = {_Args ...}; _Arg = std::_Bind<void (*(std::_Placeholder<1>))(const char*)>]
operator()(_CVArg& __arg,
^
/usr/include/c++/4.8/functional:1136:2: note: template argument deduction/substitution failed:
/usr/include/c++/4.8/functional: In substitution of ‘template<class _CVArg, class ... _Args> decltype (__arg((declval<_Args>)()...)) std::_Mu<_Arg, true, false>::operator()(_CVArg&, std::tuple<_Args2 ...>&) const volatile [with _CVArg = _CVArg; _Args = {_Args ...}; _Arg = std::_Bind<void (*(std::_Placeholder<1>))(const char*)>] [with _CVArg = const std::_Bind<void (*(std::_Placeholder<1>))(const char*)>; _Args = {}]’:
/usr/include/c++/4.8/functional:1363:40: required from ‘decltype (func(f::args ...)) f(Function, Args ...) [with Function = main(int, char**)::__lambda1; Args = {std::_Bind<void (*(std::_Placeholder<1>))(const char*)>}; decltype (func(f::args ...)) = void]’
prog.cpp:37:18: required from here
/usr/include/c++/4.8/functional:1138:39: error: no match for call to ‘(const std::_Bind<void (*(std::_Placeholder<1>))(const char*)>) ()’
-> decltype(__arg(declval<_Args>()...))
^
/usr/include/c++/4.8/functional:1280:11: note: candidates are:
class _Bind<_Functor(_Bound_args...)>
^
/usr/include/c++/4.8/functional:1351:2: note: template<class ... _Args, class _Result> _Result std::_Bind<_Functor(_Bound_args ...)>::operator()(_Args&& ...) [with _Args = {_Args ...}; _Result = _Result; _Functor = void (*)(const char*); _Bound_args = {std::_Placeholder<1>}]
operator()(_Args&&... __args)
^
/usr/include/c++/4.8/functional:1351:2: note: template argument deduction/substitution failed:
/usr/include/c++/4.8/functional:1347:37: error: cannot convert ‘std::_No_tuple_element’ to ‘const char*’ in argument passing
= decltype( std::declval<_Functor>()(
^
/usr/include/c++/4.8/functional:1365:2: note: template<class ... _Args, class _Result> _Result std::_Bind<_Functor(_Bound_args ...)>::operator()(_Args&& ...) const [with _Args = {_Args ...}; _Result = _Result; _Functor = void (*)(const char*); _Bound_args = {std::_Placeholder<1>}]
operator()(_Args&&... __args) const
^
/usr/include/c++/4.8/functional:1365:2: note: template argument deduction/substitution failed:
/usr/include/c++/4.8/functional:1361:53: error: cannot convert ‘std::_No_tuple_element’ to ‘const char*’ in argument passing
typename add_const<_Functor>::type>::type>()(
^
/usr/include/c++/4.8/functional:1379:2: note: template<class ... _Args, class _Result> _Result std::_Bind<_Functor(_Bound_args ...)>::operator()(_Args&& ...) volatile [with _Args = {_Args ...}; _Result = _Result; _Functor = void (*)(const char*); _Bound_args = {std::_Placeholder<1>}]
operator()(_Args&&... __args) volatile
^
/usr/include/c++/4.8/functional:1379:2: note: template argument deduction/substitution failed:
/usr/include/c++/4.8/functional:1375:70: error: cannot convert ‘std::_No_tuple_element’ to ‘const char*’ in argument passing
typename add_volatile<_Functor>::type>::type>()(
^
/usr/include/c++/4.8/functional:1393:2: note: template<class ... _Args, class _Result> _Result std::_Bind<_Functor(_Bound_args ...)>::operator()(_Args&& ...) const volatile [with _Args = {_Args ...}; _Result = _Result; _Functor = void (*)(const char*); _Bound_args = {std::_Placeholder<1>}]
operator()(_Args&&... __args) const volatile
^
/usr/include/c++/4.8/functional:1393:2: note: template argument deduction/substitution failed:
/usr/include/c++/4.8/functional:1389:64: error: cannot convert ‘std::_No_tuple_element’ to ‘const char*’ in argument passing
typename add_cv<_Functor>::type>::type>()(
^
prog.cpp: In instantiation of ‘decltype (func(f::args ...)) f(Function, Args ...) [with Function = main(int, char**)::__lambda1; Args = {std::_Bind<void (*(std::_Placeholder<1>))(const char*)>}; decltype (func(f::args ...)) = void]’:
prog.cpp:37:18: required from here
/usr/include/c++/4.8/functional:1379:2: note: template<class ... _Args, class _Result> _Result std::_Bind<_Functor(_Bound_args ...)>::operator()(_Args&& ...) volatile [with _Args = {_Args ...}; _Result = _Result; _Functor = main(int, char**)::__lambda1; _Bound_args = {std::_Bind<void (*(std::_Placeholder<1>))(const char*)>}]
operator()(_Args&&... __args) volatile
^
/usr/include/c++/4.8/functional:1379:2: note: template argument deduction/substitution failed:
/usr/include/c++/4.8/functional:1377:40: error: no match for call to ‘(std::_Mu<std::_Bind<void (*(std::_Placeholder<1>))(const char*)>, true, false>) (volatile std::_Bind<void (*(std::_Placeholder<1>))(const char*)>&, std::tuple<>&)’
std::declval<tuple<_Args...>&>() )... ) )>
^
/usr/include/c++/4.8/functional:1131:11: note: candidate is:
class _Mu<_Arg, true, false>
^
/usr/include/c++/4.8/functional:1136:2: note: template<class _CVArg, class ... _Args> decltype (__arg((declval<_Args>)()...)) std::_Mu<_Arg, true, false>::operator()(_CVArg&, std::tuple<_Args2 ...>&) const volatile [with _CVArg = _CVArg; _Args = {_Args ...}; _Arg = std::_Bind<void (*(std::_Placeholder<1>))(const char*)>]
operator()(_CVArg& __arg,
^
/usr/include/c++/4.8/functional:1136:2: note: template argument deduction/substitution failed:
/usr/include/c++/4.8/functional: In substitution of ‘template<class _CVArg, class ... _Args> decltype (__arg((declval<_Args>)()...)) std::_Mu<_Arg, true, false>::operator()(_CVArg&, std::tuple<_Args2 ...>&) const volatile [with _CVArg = _CVArg; _Args = {_Args ...}; _Arg = std::_Bind<void (*(std::_Placeholder<1>))(const char*)>] [with _CVArg = volatile std::_Bind<void (*(std::_Placeholder<1>))(const char*)>; _Args = {}]’:
/usr/include/c++/4.8/functional:1377:40: required from ‘decltype (func(f::args ...)) f(Function, Args ...) [with Function = main(int, char**)::__lambda1; Args = {std::_Bind<void (*(std::_Placeholder<1>))(const char*)>}; decltype (func(f::args ...)) = void]’
prog.cpp:37:18: required from here
/usr/include/c++/4.8/functional:1138:39: error: no match for call to ‘(volatile std::_Bind<void (*(std::_Placeholder<1>))(const char*)>) ()’
-> decltype(__arg(declval<_Args>()...))
^
/usr/include/c++/4.8/functional:1280:11: note: candidates are:
class _Bind<_Functor(_Bound_args...)>
^
/usr/include/c++/4.8/functional:1351:2: note: template<class ... _Args, class _Result> _Result std::_Bind<_Functor(_Bound_args ...)>::operator()(_Args&& ...) [with _Args = {_Args ...}; _Result = _Result; _Functor = void (*)(const char*); _Bound_args = {std::_Placeholder<1>}]
operator()(_Args&&... __args)
^
/usr/include/c++/4.8/functional:1351:2: note: template argument deduction/substitution failed:
/usr/include/c++/4.8/functional:1347:37: error: cannot convert ‘std::_No_tuple_element’ to ‘const char*’ in argument passing
= decltype( std::declval<_Functor>()(
^
/usr/include/c++/4.8/functional:1365:2: note: template<class ... _Args, class _Result> _Result std::_Bind<_Functor(_Bound_args ...)>::operator()(_Args&& ...) const [with _Args = {_Args ...}; _Result = _Result; _Functor = void (*)(const char*); _Bound_args = {std::_Placeholder<1>}]
operator()(_Args&&... __args) const
^
/usr/include/c++/4.8/functional:1365:2: note: template argument deduction/substitution failed:
/usr/include/c++/4.8/functional:1361:53: error: cannot convert ‘std::_No_tuple_element’ to ‘const char*’ in argument passing
typename add_const<_Functor>::type>::type>()(
^
/usr/include/c++/4.8/functional:1379:2: note: template<class ... _Args, class _Result> _Result std::_Bind<_Functor(_Bound_args ...)>::operator()(_Args&& ...) volatile [with _Args = {_Args ...}; _Result = _Result; _Functor = void (*)(const char*); _Bound_args = {std::_Placeholder<1>}]
operator()(_Args&&... __args) volatile
^
/usr/include/c++/4.8/functional:1379:2: note: template argument deduction/substitution failed:
/usr/include/c++/4.8/functional:1375:70: error: cannot convert ‘std::_No_tuple_element’ to ‘const char*’ in argument passing
typename add_volatile<_Functor>::type>::type>()(
^
/usr/include/c++/4.8/functional:1393:2: note: template<class ... _Args, class _Result> _Result std::_Bind<_Functor(_Bound_args ...)>::operator()(_Args&& ...) const volatile [with _Args = {_Args ...}; _Result = _Result; _Functor = void (*)(const char*); _Bound_args = {std::_Placeholder<1>}]
operator()(_Args&&... __args) const volatile
^
/usr/include/c++/4.8/functional:1393:2: note: template argument deduction/substitution failed:
/usr/include/c++/4.8/functional:1389:64: error: cannot convert ‘std::_No_tuple_element’ to ‘const char*’ in argument passing
typename add_cv<_Functor>::type>::type>()(
^
prog.cpp: In instantiation of ‘decltype (func(f::args ...)) f(Function, Args ...) [with Function = main(int, char**)::__lambda1; Args = {std::_Bind<void (*(std::_Placeholder<1>))(const char*)>}; decltype (func(f::args ...)) = void]’:
prog.cpp:37:18: required from here
/usr/include/c++/4.8/functional:1393:2: note: template<class ... _Args, class _Result> _Result std::_Bind<_Functor(_Bound_args ...)>::operator()(_Args&& ...) const volatile [with _Args = {_Args ...}; _Result = _Result; _Functor = main(int, char**)::__lambda1; _Bound_args = {std::_Bind<void (*(std::_Placeholder<1>))(const char*)>}]
operator()(_Args&&... __args) const volatile
^
/usr/include/c++/4.8/functional:1393:2: note: template argument deduction/substitution failed:
/usr/include/c++/4.8/functional:1391:40: error: no match for call to ‘(std::_Mu<std::_Bind<void (*(std::_Placeholder<1>))(const char*)>, true, false>) (const volatile std::_Bind<void (*(std::_Placeholder<1>))(const char*)>&, std::tuple<>&)’
std::declval<tuple<_Args...>&>() )... ) )>
^
/usr/include/c++/4.8/functional:1131:11: note: candidate is:
class _Mu<_Arg, true, false>
^
/usr/include/c++/4.8/functional:1136:2: note: template<class _CVArg, class ... _Args> decltype (__arg((declval<_Args>)()...)) std::_Mu<_Arg, true, false>::operator()(_CVArg&, std::tuple<_Args2 ...>&) const volatile [with _CVArg = _CVArg; _Args = {_Args ...}; _Arg = std::_Bind<void (*(std::_Placeholder<1>))(const char*)>]
operator()(_CVArg& __arg,
^
/usr/include/c++/4.8/functional:1136:2: note: template argument deduction/substitution failed:
/usr/include/c++/4.8/functional: In substitution of ‘template<class _CVArg, class ... _Args> decltype (__arg((declval<_Args>)()...)) std::_Mu<_Arg, true, false>::operator()(_CVArg&, std::tuple<_Args2 ...>&) const volatile [with _CVArg = _CVArg; _Args = {_Args ...}; _Arg = std::_Bind<void (*(std::_Placeholder<1>))(const char*)>] [with _CVArg = const volatile std::_Bind<void (*(std::_Placeholder<1>))(const char*)>; _Args = {}]’:
/usr/include/c++/4.8/functional:1391:40: required from ‘decltype (func(f::args ...)) f(Function, Args ...) [with Function = main(int, char**)::__lambda1; Args = {std::_Bind<void (*(std::_Placeholder<1>))(const char*)>}; decltype (func(f::args ...)) = void]’
prog.cpp:37:18: required from here
/usr/include/c++/4.8/functional:1138:39: error: no match for call to ‘(const volatile std::_Bind<void (*(std::_Placeholder<1>))(const char*)>) ()’
-> decltype(__arg(declval<_Args>()...))
^
/usr/include/c++/4.8/functional:1280:11: note: candidates are:
class _Bind<_Functor(_Bound_args...)>
^
/usr/include/c++/4.8/functional:1351:2: note: template<class ... _Args, class _Result> _Result std::_Bind<_Functor(_Bound_args ...)>::operator()(_Args&& ...) [with _Args = {_Args ...}; _Result = _Result; _Functor = void (*)(const char*); _Bound_args = {std::_Placeholder<1>}]
operator()(_Args&&... __args)
^
/usr/include/c++/4.8/functional:1351:2: note: template argument deduction/substitution failed:
/usr/include/c++/4.8/functional:1347:37: error: cannot convert ‘std::_No_tuple_element’ to ‘const char*’ in argument passing
= decltype( std::declval<_Functor>()(
^
/usr/include/c++/4.8/functional:1365:2: note: template<class ... _Args, class _Result> _Result std::_Bind<_Functor(_Bound_args ...)>::operator()(_Args&& ...) const [with _Args = {_Args ...}; _Result = _Result; _Functor = void (*)(const char*); _Bound_args = {std::_Placeholder<1>}]
operator()(_Args&&... __args) const
^
/usr/include/c++/4.8/functional:1365:2: note: template argument deduction/substitution failed:
/usr/include/c++/4.8/functional:1361:53: error: cannot convert ‘std::_No_tuple_element’ to ‘const char*’ in argument passing
typename add_const<_Functor>::type>::type>()(
^
/usr/include/c++/4.8/functional:1379:2: note: template<class ... _Args, class _Result> _Result std::_Bind<_Functor(_Bound_args ...)>::operator()(_Args&& ...) volatile [with _Args = {_Args ...}; _Result = _Result; _Functor = void (*)(const char*); _Bound_args = {std::_Placeholder<1>}]
operator()(_Args&&... __args) volatile
^
/usr/include/c++/4.8/functional:1379:2: note: template argument deduction/substitution failed:
/usr/include/c++/4.8/functional:1375:70: error: cannot convert ‘std::_No_tuple_element’ to ‘const char*’ in argument passing
typename add_volatile<_Functor>::type>::type>()(
^
/usr/include/c++/4.8/functional:1393:2: note: template<class ... _Args, class _Result> _Result std::_Bind<_Functor(_Bound_args ...)>::operator()(_Args&& ...) const volatile [with _Args = {_Args ...}; _Result = _Result; _Functor = void (*)(const char*); _Bound_args = {std::_Placeholder<1>}]
operator()(_Args&&... __args) const volatile
^
/usr/include/c++/4.8/functional:1393:2: note: template argument deduction/substitution failed:
/usr/include/c++/4.8/functional:1389:64: error: cannot convert ‘std::_No_tuple_element’ to ‘const char*’ in argument passing
typename add_cv<_Functor>::type>::type>()(
^