|
Boost : |
Subject: Re: [boost] [parameter] function types as named template parameters?
From: David Abrahams (dave_at_[hidden])
Date: 2009-01-23 00:55:36
on Thu Jan 22 2009, Frank Mori Hess <frank.hess-AT-nist.gov> wrote:
> Does Boost.Parameter support function types as named template type parameters?
> I'm trying to write a metafunction which lets you use Boost.Parameter to
> specify the template types for a boost::signals2::signal using named type
> parameters, as was suggested during the review. But it doesn't seem to work
> for the "Signature" function type. I get errors like:
>
> /home/fhess/svn/boost/boost/parameter/aux_/arg_list.hpp:264: error: function
> returning a function
> /home/fhess/svn/boost/boost/parameter/aux_/arg_list.hpp:270: error: function
> returning a function
> /home/fhess/svn/boost/boost/parameter/aux_/arg_list.hpp:352: error: function
> returning a function
> /home/fhess/svn/boost/boost/parameter/aux_/arg_list.hpp:359: error: function
> returning a function
> /home/fhess/svn/boost/boost/parameter/aux_/arg_list.hpp:365: error: function
> returning a function
It wouldn't surprise me if we had overlooked that possibility.
> I can get it to work if I don't use Boost.Parameter for the "Signature" type,
> but only use it for the other 6 types.
Can you post a minimal example that reproduces this bug? I'm sure
there's a quick fix.
> Also, I noticed BOOST_PARAMETER_MAX_ARITY defaults to 5, but signals2::signal
> has 7 parameters. I can't reliably redefine BOOST_PARAMETER_MAX_ARITY in my
> library header, since it must be defined before boost/parameter/config.hpp
> gets included. You can't redefine the arity and then re-include the
> parameter library headers like you can with Boost.Function.
Oh, that's cool. Please open a ticket with a feature request for that
and assign it to Daniel Wallin.
-- Dave Abrahams BoostPro Computing http://www.boostpro.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk