Tobias Schwinger wrote:
Sohail Somani wrote:
-----Original Message----- From: boost-users-bounces@lists.boost.org on behalf of Tobias Schwinger
Sohail Somani wrote:
If I am trying to make a fusion sequence mpl compatible, do I need to specialize mpl::is_sequence as well?
No. mpl::is_sequence just checks whether mpl::begin returns mpl::void_ (in this case it's not an MPL Sequence).
--------------
Thank you for your reply. If I do what you suggest (include intrinsic/mpl), it still doesn't compile. I checked fusion::result_of::begin<myseq>::type was correct but mpl::begin<type>::type is still void_. I'm sure I'm doing something wrong, but I can't figure out what!
I guess you have to make sure that mpl::sequence_tag returns fusion::fusion_sequence_tag. An easy way to do it is to add a 'tag' type member.
struct my_seq { typedef fusion::fusion_sequence_tag tag; // ...
Sidenote: Although all Sequences provided by Fusion are MPL Sequences (because of that 'tag' type member), it is possible to /write/ a Fusion Sequence that is not an MPL Sequence by omitting that type member... Regards, Tobias