Boost logo

Boost Testing :

From: Rene Rivera (grafik.list_at_[hidden])
Date: 2005-07-22 14:45:11


Robert Ramey wrote:
> As I write this ,I have no more corrections to make to the serialization
> library. There are a number of test failures, but I cannot resolve them for
> various reasons.
>
> b) cw - There are still some problems with code instantiation. I don't
> expect these to be resolved for the 1.33 release. Things are better than
> the 1.32 release though.

Some info about the cw-8.3 fails. Yes as expected it's another case of
static initializers not getting generated because the are too "far" or
too "indirect" with respect to the usage point in user code. To verify
this I made this change to test_diamond tests:

Index: libs/serialization/test/test_diamond.cpp
===================================================================
RCS file: /cvsroot/boost/boost/libs/serialization/test/test_diamond.cpp,v
retrieving revision 1.8
diff -u -r1.8 test_diamond.cpp
--- libs/serialization/test/test_diamond.cpp 10 Feb 2005 02:48:53 -0000 1.8
+++ libs/serialization/test/test_diamond.cpp 22 Jul 2005 19:32:28 -0000
@@ -203,3 +203,10 @@

      return EXIT_SUCCESS;
  }
+
+namespace boost { namespace archive { namespace detail {
+template<>
+const pointer_oserializer<final, test_oarchive>
pointer_oserializer<final, test_oarchive>::instance;
+template<>
+const pointer_iserializer<final, test_iarchive>
pointer_iserializer<final, test_iarchive>::instance;
+} } }
===================================================================

Which makes that test pass on cw-8.3. Basically it's failing to create
the init code for anything but the directly serialized class/archive
combinations. And it doesn't generate it for the indirect ones, in this
case the subclass because it doesn't tie it to the serialization of the
polymorphic superclass.

Any ideas on how to solve this are welcome. But I suspect it's not
solvable without adding something on the client code.

-- 
-- Grafik - Don't Assume Anything
-- Redshift Software, Inc. - http://redshift-software.com
-- rrivera/acm.org - grafik/redshift-software.com
-- 102708583/icq - grafikrobot/aim - Grafik/jabber.org

Boost-testing list run by mbergal at meta-comm.com