May be I misunderstand smth., but MACRO is pre-processor and takes place before compilation starts.
mpl::size<...> is a template instantiation which takes place during compilation and after pre-processing.

Making pre-processor understand C++ templates is probably impossible (I think to write a compiler would be easier ;)

Best Regards,
Ovanes

On Feb 4, 2008 8:27 PM, Tim St. Clair <timothysc@gmail.com> wrote:
Is there a MACRO which returns a constant when evaluating the size of an mpl sequence.

Here is what I'm trying to do:

#define MY_MACRO (N) CREATE_FOO_BAR_FN##N   

#define SUPERFUNK (CLASSA, ...)\
     CLASSA { \
          typedef mpl::vector<__VA_ARGS__> v0; \
          MY_MACRO ( ??SOME_BOOST_MACRO??(mpl::size<v0>::value) ) \
    } \

If seems like this should be possible given that I can do the following:

BOOST_MPL_ASSERT_RELATION(mpl::size<v0>::value, ==, 0);

--
Regards,
Timothy St. Clair
[timothysc@gmail.com]

_______________________________________________
Boost-users mailing list
Boost-users@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users