Boost logo

Boost Users :

From: Tim St. Clair (timothysc_at_[hidden])
Date: 2008-02-06 10:49:02


Another question might be:

    Is there any MACRO which gives me the ability to strip apart
__VA_ARGS__?
    Such as giving me the count, or first argument?

Cheers,
Tim

On Feb 4, 2008 1:36 PM, Ovanes Markarian <om_boost_at_[hidden]> wrote:

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

-- 
Regards,
Timothy St. Clair
[timothysc_at_[hidden]]


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