Boost logo

Boost Users :

Subject: [Boost-users] fusion newby question - boost stew
From: Robert Ramey (ramey_at_[hidden])
Date: 2011-11-30 14:41:53


I'm experimenting with fusion and I have a question regarding the
compatibiliy/interaction with MPL.

in .. /libs/fusion/doc/html/fusion/introduction.html it states:

"Fusion provides full round compatibility with MPL. Fusion sequences are
fully conforming MPL sequences and MPL sequences are fully compatible with
Fusion. You can work with Fusion sequences on MPL if you wish to work solely
on types [1]. In MPL, Fusion sequences follow MPL's sequence-type preserving
semantics"

So when I compare the pages for the concept of AssociativeSequence for
fusion:

libs/fusion/doc/html/fusion/sequence/concepts/associative_sequence.html

and that for MPL

libs/mpl/doc/refmanual/associative-sequence.html

the expression requirements are not the same. The metafunctions for fusion
are:

result_of::has_key<S, K>::type
result_of::at_key<S, K>::type
result_of::value_at_key<S, K>::type
while for MPL they are

has_key<s,k>::type
count<s,k>::type
order<s,k>::type
at<s,k>::type
at<s,k,def>::type
key_type<s,x>::type
value_type<s,x>::type

So how can the statement in the fusion introduction be true? This question
comes about as I'm making a new
"thing" of my own invention where I want to inter-operate with purely type
sequences created with MPL - just likt it says you can do in the
documentation. Turns out at significant part of this "boost stew" depends
on better compile time checking of the users's metafunction invocation.
This ends up creating the need for concepts in both MPL which as far as I
know haven't yet been coded. So when I do this, I run accross this
question.

I realize I can build a fusion sequence from an MPL one, but given the
language in the introduction, I would have expected to be able to go both
ways and this wouldn't seem to be true. Note that it's quite possible that
I'm missing something here as I feel that I'm really starting to get this
stuff only for the first time.

Robert Ramey


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