[Boost-bugs] [Boost C++ Libraries] #3675: Boost.Parameter passing function pointers

Subject: [Boost-bugs] [Boost C++ Libraries] #3675: Boost.Parameter passing function pointers
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2009-11-26 16:10:03


#3675: Boost.Parameter passing function pointers
------------------------------------------------------------+---------------
 Reporter: Aristid Breitkreuz <aristid.breitkreuz@…> | Owner: danielw
     Type: Bugs | Status: new
Milestone: Boost 1.42.0 | Component: parameter
  Version: Boost 1.41.0 | Severity: Problem
 Keywords: |
------------------------------------------------------------+---------------
 When passing function pointers with Boost.Parameter on Boost 1.41 on
 MacPorts, there are errors.

 Apparently, somewhere the function type gets a "const" and that breaks
 stuff.

 That's the error message:

 {{{
 bash-3.2$ make CXXFLAGS=-I/opt/local/include test
 g++ -I/opt/local/include test.cc -o test
 /opt/local/include/boost/parameter/aux_/arg_list.hpp: In constructor
 'boost::parameter::aux::arg_list<TaggedArg, Next>::arg_list(A0&, A1&, A2&,
 A3&, A4&) [with A0 = void ()(int)const, A1 = boost::parameter::void_, A2 =
 boost::parameter::void_, A3 = boost::parameter::void_, A4 =
 boost::parameter::void_, TaggedArg =
 boost::parameter::aux::tagged_argument<tag::par, void ()(int)>, Next =
 boost::parameter::aux::empty_arg_list]':
 /opt/local/include/boost/parameter/parameters.hpp:876: instantiated from
 'typename boost::mpl::first<typename
 boost::parameter::aux::make_arg_list<boost::parameter::aux::item<PS0, A0,
 boost::parameter::void_>, typename
 boost::parameter::aux::make_deduced_items<PS0,
 boost::parameter::aux::make_deduced_items<PS1,
 boost::parameter::aux::make_deduced_items<PS2,
 boost::parameter::aux::make_deduced_items<PS3,
 boost::parameter::aux::make_deduced_items<PS4,
 boost::mpl::identity<boost::parameter::void_> > > > > >::type,
 boost::parameter::aux::tag_keyword_arg, mpl_::bool_<true> >::type>::type
 boost::parameter::parameters<PS0, PS1, PS2, PS3, PS4>::operator()(A0&)
 const [with A0 = void ()(int)const, PS0 =
 boost::parameter::required<tag::par, boost::mpl::always<mpl_::true_> >,
 PS1 = boost::parameter::void_, PS2 = boost::parameter::void_, PS3 =
 boost::parameter::void_, PS4 = boost::parameter::void_]'
 test.cc:9: instantiated from 'typename
 boost_param_result_14testfn<typename
 boost::parameter::aux::argument_pack<boost_param_parameters_14testfn,
 const ParameterArgumentType0, boost::parameter::void_,
 boost::parameter::void_, boost::parameter::void_,
 boost::parameter::void_>::type>::type testfn(const
 ParameterArgumentType0&, typename
 boost::parameter::aux::match<boost_param_parameters_14testfn,
 ParameterArgumentType0, boost::parameter::void_, boost::parameter::void_,
 boost::parameter::void_, boost::parameter::void_>::type) [with
 ParameterArgumentType0 = void ()(int)]'
 test.cc:20: instantiated from here
 /opt/local/include/boost/parameter/aux_/arg_list.hpp:208: error: no
 matching function for call to
 'boost::parameter::aux::tagged_argument<tag::par, void
 ()(int)>::tagged_argument(void (&)(int)const)'
 /opt/local/include/boost/parameter/aux_/tagged_argument.hpp:37: note:
 candidates are: boost::parameter::aux::tagged_argument<KW,
 T>::tagged_argument(Arg&) [with Keyword = tag::par, Arg = void ()(int)]
 /opt/local/include/boost/parameter/aux_/tagged_argument.hpp:32: note:
 boost::parameter::aux::tagged_argument<tag::par, void
 ()(int)>::tagged_argument(const
 boost::parameter::aux::tagged_argument<tag::par, void ()(int)>&)
 make: *** [test] Error 1
 bash-3.2$
 }}}

 The example compiles on Linux just fine. I will attach the example if I
 find out how to do it.

 Please provide a workaround for the time until the fix for this hits the
 shelves.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/3675>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:01 UTC