Boost logo

Boost :

From: Robert Ramey (ramey_at_[hidden])
Date: 2004-08-13 10:17:41


> Is there an alternative to the macros for registering types?
> (A sample program exhibiting what I am trying is attached.)

Have you considered using "forward registration" rather than EXPORT?

int main() {
  Status< Algo< int, double > >* p_s = new DerivedStatus< Algo< int, double
> >;

====>
  boost::archive::text_oarchive oa(std::cout);
  oa.boost::archive::register_type(
    static_cast<DerivedStatus_Algo_int_double *>(NULL)
  );
  oa << p_s;
}

Robert Ramey


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