Boost logo

Boost Users :

From: Ovanes Markarian (om_boost_at_[hidden])
Date: 2008-02-04 14:36:35


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_at_[hidden]> 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_at_[hidden]]
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>



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