
On Wed, 17 Jun 2009 12:07:33 -0500, Joel de Guzman
Mike Tegtmeyer wrote:
I am hoping someone can point me the in right direction regarding this code snippit failing to compile. My suspicion is that it is a header problem but any help would be appreciated. In short, I seem to be missing why the binary form of mpl::transform won't work with fusion::vector. (unary form works just fine). The code below just attempts to make a std::pair<> from the contents of two sequences (this is just an example to illustrate the transform problem). If the two sequences are mpl::vectors, everything is fine. If they are fusion::vectors then 'lots of errors'. I'm fairly new to both mpl and fusion so I am not ruling out the fact that I have done something stupid.
Trying the code, it seems mpl::(binary)transform is looking for Seq::tag which is not a requirement for MPL::Forward Sequence which mpl::transform requires (http://tinyurl.com/l6kcb4). fusion::vector adheres fully to an MPL::Forward Sequence.
No, the error is caused by the following code in MPL's pair_view
(which is the underlying implementation mechanism for the binary
transform):
typedef typename min<
typename iterator_category