
Tobias Schwinger wrote:
Hi again,
It would be very cool if fusion::pair would be compatible with mpl::pair, so that MPL's "first" and "second" metafunctions work...
Maybe the names of the type members in "mpl::pair" should be changed from "first/second" to "first_type/second_type", because then
1. "std::pair" could be used with MPL and Fusion (*), 2. "fusion::pair" could be used with MPL, and 3. "mpl::pair" could be used as a Fusion pair, if no runtime data is required
(*) in place of a fusion::pair and not as an "adapted sequence".
Here's my current thinking on this: 1) mpl::pair can be a conforming mpl sequence 2) fusion::pair can be a conforming fusion sequence 3) Hence, mpl::pair and fusion::pair can both be conforming mpl sequences and at the same time, also be conforming fusion sequences. Maybe: 1) fusion::map elements can be generalized to be any fusion sequence with at least 2 elements. 2) mpl::map elements can be generalized to be any mpl sequence with at least 2 elements. Conclusion: The type/type-value sequence is such a powerful concept. Almost any data structure can be defined in terms of sequence. If all our data structures are also conforming sequences, The C++ world would be such an exciting world! Regards, -- Joel de Guzman http://www.boost-consulting.com http://spirit.sf.net