Boost logo

Boost :

From: Robert Ramey (ramey_at_[hidden])
Date: 2004-10-22 11:54:55


This has been pointed out in the manual and way to address is described.

What would such a macro look like? At some point the "convenience macros"
become sufficiently complex to use that they are no more "convienient" than
using just specifying the class trait directly.

Robert Ramey

"Vyacheslav E. Andrejev" <vandrejev_at_[hidden]> wrote in message
news:claipr$dc6$1_at_sea.gmane.org...
> Hello,
>
> Using BOOST_CLASS_IMPLEMENTATION there is no way to assign specific
> serialization implementation to any specialization of some template class.
> Suppose we have template class
>
> template <class Params>
> class LaserPointSerializationExpression
> {
> ...
> };
> And we want that any specialization of this class should be
> object_serializable. Simple use of
>
> BOOST_CLASS_IMPLEMENTATION(LaserPointSerializationExpression,
> boost::serialization::object_serializable);
>
> will give us the following code
> namespace boost {
> namespace serialization {
> template <>
> struct implementation_level<LaserPointSerializationExpression >
> {
> typedef mpl::integral_c_tag tag;
> typedef mpl::int_< boost::serialization::object_serializable > type;
> static const int value = implementation_level::type::value;
> };
> }
> }
> which obviously will fail to compile. The correct code is
> namespace boost {
> namespace serialization {
> template <class Params>
> struct
>
implementation_level<asda::lpfio::LaserPointSerializationExpression<Params>
> >
> {
> typedef mpl::integral_c_tag tag;
> typedef mpl::int_< boost::serialization::object_serializable > type;
> static const int value = implementation_level::type::value;
> };
> }
> }
> But there's no macro such as BOOST_CLASS_IMPLEMENTATION to generate it. So
I
> think there should be special version of BOOST_CLASS_IMPLEMENTATION that
> allows to generate implementation_level for any specialization of some
> template.
> --
> ______________________________
> Vyacheslav E. Andrejev
> System Architect, Excelsior, LLC
> E-mail: vandrejev_at_[hidden]
> ICQ: 7152604
>
>
> _______________________________________________
> Unsubscribe & other changes:
http://lists.boost.org/mailman/listinfo.cgi/boost
>


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk