Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing bind overloads #737

Closed
VeXocide opened this issue Mar 4, 2013 · 2 comments
Closed

Missing bind overloads #737

VeXocide opened this issue Mar 4, 2013 · 2 comments

Comments

@VeXocide
Copy link
Contributor

VeXocide commented Mar 4, 2013

The version of bind which takes a function pointer is missing overloads, it currently only has overloads matching the arity.

    In file included from hpx/src/runtime/threads/threadmanager.cpp:12:
    In file included from hpx/hpx/runtime/threads/threadmanager_impl.hpp:23:
    In file included from hpx/hpx/performance_counters/counters.hpp:12:
    In file included from hpx/hpx/lcos/base_lco_with_value.hpp:11:
    In file included from hpx/hpx/lcos/base_lco.hpp:12:
    In file included from hpx/hpx/runtime/components/server/managed_component_base.hpp:14:
    In file included from hpx/hpx/runtime/components/server/wrapper_heap_list.hpp:10:
    In file included from hpx/hpx/util/one_size_heap_list.hpp:26:
    In file included from hpx/hpx/util/bind.hpp:387:
    In file included from hpx/hpx/util/preprocessed/bind.hpp:13:
    hpx/hpx/util/preprocessed/bind_10.hpp:889:802: error: too many arguments to function call, expected 0, have 1
      ...F(A0), Arg0, boost::mpl::false_>::type operator()(BOOST_FWD_REF(A0) a0) { typedef hpx::util::tuple1< typename detail::env_value_type<A0>::type > env_type; env_type env(boost::forward<A0>( a0 )); return eval(env, f) (::hpx::util::detail::eval(env, arg0)); } template <typename This, typename A0 , typename A1> struct result<This(A0 , A1)> { typedef...                                                                                                                                                                                                                      
                                                                                                                                                                                                                   ~~~~~~~~~~~~  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    hpx/hpx/util/detail/vtable.hpp:350:24: note: in instantiation of function template specialization 'hpx::util::detail::bound_functor1<unsigned long long (*)(), const hpx::util::placeholders::arg<0> >::operator()<bool &>' requested here
                    return (**reinterpret_cast<Functor**>(f))(BOOST_PP_ENUM_PARAMS(N, a));
                           ^
    hpx/hpx/util/detail/vtable.hpp:339:24: note: in instantiation of member function 'hpx::util::detail::vtable<false>::type<hpx::util::detail::bound_functor1<unsigned long long (*)(), const hpx::util::placeholders::arg<0> >, long long (bool), void, void>::invoke_' requested here
                    return invoke_(f BOOST_PP_COMMA_IF(N) BOOST_PP_ENUM_PARAMS(N, a), typename boost::is_reference_wrapper<Functor>::type());
                           ^
    hpx/hpx/util/detail/preprocessed/vtable_ptr_10.hpp:211:41: note: in instantiation of member function 'hpx::util::detail::vtable<false>::type<hpx::util::detail::bound_functor1<unsigned long long (*)(), const hpx::util::placeholders::arg<0> >, long long (bool), void, void>::invoke' requested here
                base_type::invoke = Vtable::invoke;
                                            ^
    hpx/hpx/util/detail/preprocessed/get_table_10.hpp:88:36: note: in instantiation of member function 'hpx::util::detail::vtable_ptr<long long (bool), void, void, hpx::util::detail::vtable<false>::type<hpx::util::detail::bound_functor1<unsigned long long (*)(), const hpx::util::placeholders::arg<0> >, long long (bool), void,
          void> >::vtable_ptr' requested here
                static vtable_ptr_type ptr;
                                       ^
    hpx/hpx/util/detail/preprocessed/function_template_10.hpp:298:37: note: in instantiation of function template specialization 'hpx::util::detail::get_table<hpx::util::detail::bound_functor1<unsigned long long (*)(), const hpx::util::placeholders::arg<0> >, long long (bool)>::get<void, void>' requested here
                            >::template get<
                                        ^
    hpx/hpx/util/detail/function_template.hpp:275:15: note: in instantiation of function template specialization 'hpx::util::function_base<long long (bool), void, void>::function_base<hpx::util::detail::bound_functor1<unsigned long long (*)(), const hpx::util::placeholders::arg<0> > >' requested here
                : base_type(boost::forward<Functor>(f))
                  ^
    hpx/src/runtime/threads/threadmanager.cpp:1571:15: note: in instantiation of function template specialization 'hpx::util::function_nonser<long long (bool)>::function_nonser<hpx::util::detail::bound_functor1<unsigned long long (*)(), const hpx::util::placeholders::arg<0> > >' requested here
                  HPX_STD_BIND(&coroutine_type::impl_type::get_stack_recycle_count, _1),
                  ^
    hpx/hpx/config.hpp:527:39: note: expanded from macro 'HPX_STD_BIND'
    #  define HPX_STD_BIND                ::hpx::util::bind
                                          ^

Note that it is using bound_functor1 for unsigned long long (*)() instead of bound_functor0. This blocks #732.

@ghost ghost assigned sithhell Mar 4, 2013
@sithhell
Copy link
Member

Actually, this error is not due to missing overloads. It occurs because a nullary function was bound with one argument. Nevertheless, the error could be way better.

sithhell added a commit that referenced this issue Mar 18, 2013
One of the generic context functions missed a boolean reset parameter for the
new performance counter API.
@sithhell
Copy link
Member

The mentioned commit fixes this error. Please reopen if more errors of this kind appear.

sithhell added a commit that referenced this issue Mar 22, 2013
One of the generic context functions missed a boolean reset parameter for the
new performance counter API.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants