Boost logo

Boost Users :

From: Tobias Schwinger (tschwinger_at_[hidden])
Date: 2007-01-19 16:01:00


Tobias Schwinger wrote:
> Sohail Somani wrote:
>> -----Original Message-----
>> From: boost-users-bounces_at_[hidden] 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


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net