Boost logo

Boost :

From: Jaakko Jarvi (jajarvi_at_[hidden])
Date: 2002-04-18 15:29:30


Hi,

It is indeed possible to go around this limitation.

One cannot use the default argument trick anymore, so there must
be a distinct constructor for each arity.

Also, one additional constructor for the cons classes must be added.

I'll go ahead and do these changes. Also, we get rid of another restriction:
tuples can now hold array types too!

E.g.

 tuple<int[39], float[44]> ff;

 get<0>(ff)[3] = 42;

Cheers, Jaakko

On Wed, 17 Apr 2002, Giovanni Bajo wrote:

> Currently, I cannot instantiate a tuple<> that contains an element which is
> not copyable (derived by boost::noncopyable, or whatever). I've given a look
> at the code, and it seems that tuple<> internally uses the elements' copy
> constructors within the default contstructor (basically, it copy-constructs
> the elements with default-constructed temporaries). Could this behaviour be
> modified somehow? It looks like an additional requisite for the contained
> object forced only due to an implementation detail.
>
> Giovanni Bajo


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