From: Manfred Doudar (manfred.doudar_at_[hidden])
Date: 2005-09-24 00:45:58
troy d. straszheim wrote:
>>The implementation relies on the cons-list implementation of tuples.
>> It is part of the public interface of Boost.Tuple, but not part of
>>the TR1 specification. So if one wants to define serialization so
>>that it works with any TR1 compatible tuple implementation, one must
>>build the metafunctions around the get<N> templates. The downside of
>>this is, that more compiler resources will be used.
>So the tuple at boost/tuple/tuple.hpp doesn't have tuple_size<>. One is
>forced to resort to using either the cons<> stuff, or lots of
>preprocessor stuff. I went with cons.
Am I missing something here? I know that boost::tuple lacks a _size<>
but I've always found a simple work-around with:
template <typename T>
size_t tuple_size(T tuple)
return boost::tuples::length<T>::value ;
... But I agree, that convenience is lacking.
-- Manfred MetOcean Engineers www.metoceanengineers.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk