Boost logo

Boost :

From: David Abrahams (abrahams_at_[hidden])
Date: 2001-04-05 06:24:47


----- Original Message -----
From: <jk_at_[hidden]>

> 5 Apr 2001 11:04:29 +0400 David Abrahams wrote:
> >ParameterAdapter template has all the problems I alluded to: it is
> >overloaded for a limited number of argumeents,
>
> It's better than nothing. I cannot imagine some API, standard or not,
where
> are functions with more than, say, 6 arguments; if there is more, it is
sign
> not to use this API (for me). So traits for functions having up to 10
> parameters is absolutely enough. It is not perfect, but it will work and
will
> be useful. Anyway we cannot get better solution with the language as it is
> now.

I didn't read the paper in detail, but I don't see what the ParameterAdapter
buys us over, say, what I did in Boost.Python. Again, am I missing
something?

> >and can't handle non-const or
> >volatile reference arguments. Am I missing something?
>
> Is it something that cannot be solved with function traits (non-existed
yet:)
> with the help of call_traits?

Yes. The problem is that to properly forward such arguments, you need to a
version which takes, for each parameter:

T&
T const&
T volatile&
T const volatile&

Now write the functions with these variants for /each/ parameter in all
combinations, and you'll begin to see the problem.

-Dave


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