I feel like I must be doing something incredibly stupid (and I'm sorry if indeed I do) but this: ---------------------------- #include <functional>
void goo(int); void foo() { std::bind (goo,1)(); // works std::bind (goo,std::placeholders::_1)(1); // does not work } ---------------------------- doesn't appear to work: g/x> /home/bangerth/bin/x86/gcc-mainline/bin/c++ -std=c++0x -c x.cc x.cc: In function 'void foo()': x.cc:6: error: no match for call to '(std::_Bind<void (* ()(std::_Placeholder<1>))(int)>) (int)' /home/bangerth/bin/x86/gcc-mainline/lib/gcc/i686-pc-linux-gnu/4.4.0/../../../../include/c++/4.4.0/tr1_impl/functional:1190: note: candidates are: typename std::result_of<_Functor ()(typename std::result_of<std::_Mu<_Bound_args, std::is_bind_expression::value, (std::is_placeholder::value > 0)> ()(_Bound_args, std::tuple<_UElements ...>)>::type ...)>::type std::_Bind<_Functor ()(_Bound_args ...)>::operator()(_Args& ...) [with _Args = int, _Functor = void (*)(int), _Bound_args = std::_Placeholder<1>] /home/bangerth/bin/x86/gcc-mainline/lib/gcc/i686-pc-linux-gnu/4.4.0/../../../../include/c++/4.4.0/tr1_impl/functional:1201: note: typename std::result_of<const _Functor ()(typename std::result_of<std::_Mu<_Bound_args, std::is_bind_expression::value, (std::is_placeholder::value > 0)> ()(_Bound_args, std::tuple<_UElements ...>)>::type ...)>::type std::_Bind<_Functor ()(_Bound_args ...)>::operator()(_Args& ...) const [with _Args = int, _Functor = void (*)(int), _Bound_args = std::_Placeholder<1>] /home/bangerth/bin/x86/gcc-mainline/lib/gcc/i686-pc-linux-gnu/4.4.0/../../../../include/c++/4.4.0/tr1_impl/functional:1213: note: typename std::result_of<volatile _Functor ()(typename std::result_of<std::_Mu<_Bound_args, std::is_bind_expression::value, (std::is_placeholder::value > 0)> ()(_Bound_args, std::tuple<_UElements ...>)>::type ...)>::type std::_Bind<_Functor ()(_Bound_args ...)>::operator()(_Args& ...) volatile [with _Args = int, _Functor = void (*)(int), _Bound_args = std::_Placeholder<1>] /home/bangerth/bin/x86/gcc-mainline/lib/gcc/i686-pc-linux-gnu/4.4.0/../../../../include/c++/4.4.0/tr1_impl/functional:1226: note: typename std::result_of<const volatile _Functor ()(typename std::result_of<std::_Mu<_Bound_args, std::is_bind_expression::value, (std::is_placeholder::value > 0)> ()(_Bound_args, std::tuple<_UElements ...>)>::type ...)>::type std::_Bind<_Functor ()(_Bound_args ...)>::operator()(_Args& ...) const volatile [with _Args = int, _Functor = void (*)(int), _Bound_args = std::_Placeholder<1>] What do I miss? Thanks in advance Wolfgang -- Summary: [C++0x] std::bind doesn't work Product: gcc Version: 4.4.0 Status: UNCONFIRMED Keywords: rejects-valid Severity: normal Priority: P3 Component: libstdc++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: bangerth at dealii dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38889