Boost logo

Boost :

From: Joel de Guzman (joel_at_[hidden])
Date: 2007-06-17 17:31:40


Tobias Schwinger wrote:

[1]

> For now (C++89) it might be good enough to just have operator() take its
> arguments by non-const reference. As usually the call will be deferred
> and as long as the arguments are L-Values they will be deduced even if
> const qualified (this might break the code of the first use case above -
> wrapping the factory specialization into a Boost.Bind function object
> without actually binding anything will work around the problem, though).

[2]

> Alternatively we could solve the forwarding problem (within the function
> object itself) using a "hammer and crowbar utility" in Fusion
> (overloading operator() with all combinations of templatized
> const/non-const reference parameters) until we have better means to do
> so. I personally prefer the former because it's more lightweight and
> might allow us to be more portable than Fusion is, however.

Have [2] for a predefined limit (say 3) and do the rest [1] for
more (e.g. 3 or more). Isn't that how you did it with the
fusion functional stuff?

Anyway, yeah, I need such a utility, especially if it is lighweight.

Regards,

-- 
Joel de Guzman
http://www.boost-consulting.com
http://spirit.sf.net

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk