
14 Feb
2005
14 Feb
'05
7:52 p.m.
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