Boost logo

Boost :

From: Howard Hinnant (hinnant_at_[hidden])
Date: 2005-02-14 16:38:10


On Feb 14, 2005, at 2:52 PM, Jonathan Turkanis wrote:

> 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

<nod> I use is_tuple_like too. It was in the original proposal. It
got dumped somewhere along the way. I'm not sure why. When tuple was
first voted into TR1, enable_if was brand new and pretty exotic. Parts
of tuple that benefited from (and depended on) enable_if were dumped.
It may be that is_tuple_like got thrown out along with that dump.
Imho, tuple did not benefit from that exercise. We get another shot at
it for C++0X though. So existing practice that is a little better than
TR1 can still help.

-Howard


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