Boost logo

Boost :

From: Jonathan Turkanis (technews_at_[hidden])
Date: 2005-02-14 14:52:26


Howard Hinnant wrote:

> I think we could do better, but it would be stretching TR1 (which I
> think is good).
>
> I think any compatible tuple-like type should be convertible to tuple
> (pair, array, maybe complex?, anything else that declares itself
> tuple-like and implements the tuple interface). Furthermore, I think
> is_convertible should answer correctly, even for negative cases (for
> those pair that are not convertible to a 2-tuple).

I'd definitely like some standard way for a type to declare itself tuple-like.
Why didn't it make it into TR1?

I use a version of it here, to allow arbitrary tuple-like types to take
advantage of a form of tuple i/o:

http://www.kangaroologic.com/format_lite/libs/format_lite/doc/?path=4.2.5

Jonathan


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