
Douglas Gregor wrote:
On Aug 6, 2006, at 7:10 AM, Ion GaztaƱaga wrote:
And what if Values parameter pack is instantiated as a sequence of the same type? Should we make tuple<int, int> and array<int, 2> the same type?
They should be the same type, but there should be a common interface that allows one to act on both types in the same way. IIRC, array<> works with tuple_size, tuple_element, and get, so we already have that interface.
And Fusion regards boost::array as a fully conforming sequence. All the facilities (algorithms, etc.) are available for array. It is interesting to note that Dan (Marsden) did some tests and found that fusion algorithms on boost::array with vc8.0 "significantly outperforms the standard library equivalent code, presumably as it has more information available at compile time, and with inlining it effectively unrolls the entire loops". Regards, -- Joel de Guzman http://www.boost-consulting.com http://spirit.sf.net