|
Boost : |
From: Jaakko Jarvi (jajarvi_at_[hidden])
Date: 2002-08-02 09:54:41
Hi,
>
> Sure it _can_ be done, but would you do it for 10,000 elements? Take a look at
> the tuple constructor for this in tuple/detail/tuple_basic.hpp:
>
> tuple(typename access_traits<T0>::parameter_type t0,
> typename access_traits<T1>::parameter_type t1,
> typename access_traits<T2>::parameter_type t2,
> typename access_traits<T3>::parameter_type t3,
> typename access_traits<T4>::parameter_type t4,
> typename access_traits<T5>::parameter_type t5,
> typename access_traits<T6>::parameter_type t6)
> : inherited(t0, t1, t2, t3, t4, t5, t6, detail::cnull(),
> detail::cnull(), detail::cnull()) {}
>
> There are 9 more of those, so a full set for a tuple of 10,000 elements is
> 10,000^2. Granted, you can just have one constructor with 10,000 arguments if
> you are very careful with references, but I'd still be a little worried about
> all of the "Implementation quantities" we're blowing past (think of mangled
> name for that constructor...).
Actually, with some loss of generality, we can do with only one
constructor. We need to require that all elements be copyable (reference
types are ok of course).
This was the way the original implementation was.
Cheers, Jaakko
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk