|
Boost : |
From: Paul Mensonides (pmenso57_at_[hidden])
Date: 2004-08-12 21:03:57
> -----Original Message-----
> From: boost-bounces_at_[hidden]
> [mailto:boost-bounces_at_[hidden]] On Behalf Of Rene Rivera
> [snip]
> > a look at the preprocessor library but I couldnt come up with a
> > solution. Is there an alternative to the macros for
> registering types?
> > (A sample program exhibiting what I am trying is attached.)
> [snip]
> > // Doesn't work (wrong number of macro arguments ):
> > // BOOST_CLASS_EXPORT( DerivedStatus< Algo< int, double > > );
>
> Did you try using BOOST_PP_COMMA ?? For example:
>
> BOOST_CLASS_EXPORT( DerivedStatus< Algo< int BOOST_PP_COMMA
> double > > );
Should be with nullary parentheses:
BOOST_CLASS_EXPORT( DerivedStatus< Algo<int BOOST_PP_COMMA() double > > );
Incidently, do we have a function argument mapping for the common case of this
type of thing?
E.g.
template<class> struct pack;
template<class T> struct pack<void (T)> {
typedef T type;
};
BOOST_CLASS_EXPORT( pack<void (DerivedStatus< Algo<int, double > >)>::type );
Or similar? The COMMA() trick will only work through one level of macro
expansion.
Regards,
Paul Mensonides
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk