Boost logo

Boost-Commit :

From: chochlik_at_[hidden]
Date: 2008-04-23 14:05:44


Author: matus.chochlik
Date: 2008-04-23 14:05:43 EDT (Wed, 23 Apr 2008)
New Revision: 44743
URL: http://svn.boost.org/trac/boost/changeset/44743

Log:
Updated example on cooperation with Boost.Serialization. However it will not compile with g++.
Text files modified:
   sandbox/mirror/libs/doc/xml/mirror/_library.xml | 4 ++++
   sandbox/mirror/libs/examples/serialization/cube.cpp | 6 ++++--
   2 files changed, 8 insertions(+), 2 deletions(-)

Modified: sandbox/mirror/libs/doc/xml/mirror/_library.xml
==============================================================================
--- sandbox/mirror/libs/doc/xml/mirror/_library.xml (original)
+++ sandbox/mirror/libs/doc/xml/mirror/_library.xml 2008-04-23 14:05:43 EDT (Wed, 23 Apr 2008)
@@ -47,5 +47,9 @@
                 <revision id="20080422" major="0" minor="1" micro="6" author="m_ch">
                         - Made minor updates to documentation
                 </revision>
+ <revision id="20080423" major="0" minor="1" micro="7" author="m_ch">
+ - Added example on cooperation with Boost.Serialization
+ (will not compile with gcc)
+ </revision>
         </revisions>
 </library>

Modified: sandbox/mirror/libs/examples/serialization/cube.cpp
==============================================================================
--- sandbox/mirror/libs/examples/serialization/cube.cpp (original)
+++ sandbox/mirror/libs/examples/serialization/cube.cpp 2008-04-23 14:05:43 EDT (Wed, 23 Apr 2008)
@@ -8,6 +8,8 @@
  * see examples/registering/namespaces.cpp and
  * examples/registering/types.cpp first.
  *
+ * NOTE: this example will currently not compile with g++.
+ *
  * Copyright 2008 Matus Chochlik. Distributed under the Boost
  * Software License, Version 1.0. (See accompanying file
  * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -411,7 +413,7 @@
         //
         // save the first one into a text file
         {
- std::fstream out("./temp.txt", ios_base::out);
+ std::fstream out("./Cube.txt", ios_base::out);
                 boost::archive::text_oarchive oa(out);
                 //
                 to_be_saved<Cube> sc1(c1);
@@ -420,7 +422,7 @@
         //
         // load the second from the same file
         {
- std::fstream in("./temp.txt", ios_base::in);
+ std::fstream in("./Cube.txt", ios_base::in);
                 boost::archive::text_iarchive ia(in);
                 //
                 to_be_loaded<Cube> lc2(c2);


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk