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,
> are functions with more than, say, 6 arguments; if there is more, it is
> 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
> 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

> >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
> 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 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.


Boost list run by bdawes at, gregod at, cpdaniel at, john at