Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2001-06-30 07:57:38


From: "John Max Skaller" <skaller_at_[hidden]>

> Peter Dimov wrote:
>
> > > This gets rid of the compile time overhead completely,
> > > allows a reasonable limit on the size of tuples,
> > > allows important optimisations, and may be mandatory
> > > for generalising certain other library components
> > > efficiently.
> >
> > This would probably be a step in the right direction, but the more
important
> > issue is how do you get from the function call expression
> >
> > f(x, y, z, 5)
> >
> > a tuple containing the arguments.

[...]

> See Felix. This is exactly what I do. It is also exactly
> what SML does.

I saw it. :-) I'm talking about C++. f(x, y, z, 5) is not compatible with
f(t), where t = tuple(x, y, z, 5). [In passing - I believe that argument
deduction should be enabled for constructors, making make_* functions
obsolete.]

In particular, f(x, y, z, 5) may pass everything in registers, or it may
pass only x and 5 in registers.

Introducing only f(tuple) as a typesafe equvalent of f(...) and letting it
participate in overload resolution would be possible, BUT you also need the
'compile-time tuple' in order to declare the function:

template<typelist T> void f(tuple<T>);

--
Peter Dimov
Multi Media Ltd.

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