|
Boost Users : |
From: David Greene (greened_at_[hidden])
Date: 2004-12-27 14:21:19
All right, I'm still trying to figure out the MPL lambda stuff.
I had expected this to work:
template<typename Arg>
some func {
typedef ... type;
};
typedef transform<
sequence,
some_func<_>
>::type result;
But I get a compiler error about a missing apply<> in some_func.
This works:
typedef transform<
sequence,
quote1<some_func>
>::type result;
I don't understand why the placeholder doesn't convert some_func
to an appropriate metafunction class.
Similarly, I tried to use unpack args:
template<typename Arg1, typename Arg2>
some_func2 {
typedef ... type;
};
typedef transform<
zipped_sequence,
unpack_args<some_func2<_,_>
>::type result;
The compiler complained about a missing apply<> in some_func2.
Again, this worked:
typedef transform<
zipped_sequence,
unpack_args<quote2<some_func2> >
>::type result;
Is it because I'm using _ rather than _1 and _2? The examples
in the MPL manual using is_same, etc. work fine for me.
Learning lots. Hope to learn more. :)
-Dave
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