on Fri Jul 27 2007, "JOAQUIN LOPEZ MU?Z"
According to the MPL reference, a placeholder expression X
must satisfy (among others) the following condition: "All of X's template parameters, including the default ones, are types."
According to that the following should then compile without errors:
#include
#include #include using namespace boost; using namespace boost::mpl;
template
struct foo { template<typename Q> struct apply{ typedef Q type; }; }; typedef apply1
,int>::type t1; BOOST_MPL_ASSERT((is_same
)); int main(){}
I don't see how you can conclude the above will compile without error just from (a part of) the definition of placeholder expression. Are you saying that since foo<_1> is not a placeholder expression, when applied to int it should be treated as a metafunction class? -- Dave Abrahams Boost Consulting http://www.boost-consulting.com The Astoria Seminar ==> http://www.astoriaseminar.com