$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-commit] svn:boost r60273 - trunk/libs/serialization/src
From: ramey_at_[hidden]
Date: 2010-03-06 21:43:18
Author: ramey
Date: 2010-03-06 21:43:17 EST (Sat, 06 Mar 2010)
New Revision: 60273
URL: http://svn.boost.org/trac/boost/changeset/60273
Log:
Suppress multiple definition trap
Text files modified: 
   trunk/libs/serialization/src/basic_serializer_map.cpp |    28 ++++++++++++++++++++--------            
   1 files changed, 20 insertions(+), 8 deletions(-)
Modified: trunk/libs/serialization/src/basic_serializer_map.cpp
==============================================================================
--- trunk/libs/serialization/src/basic_serializer_map.cpp	(original)
+++ trunk/libs/serialization/src/basic_serializer_map.cpp	2010-03-06 21:43:17 EST (Sat, 06 Mar 2010)
@@ -41,17 +41,29 @@
     // attempt to insert serializer into it's map
     const std::pair<map_type::iterator, bool> result =
         m_map.insert(bs);
+    // the following is commented out - rather than being just
+    // deleted as a reminder not to try this.
+
+    // At first it seemed like a good idea.  It enforced the
+    // idea that a type be exported from at most one code module
+    // (DLL or mainline).  This would enforce a "one definition rule" 
+    // across code modules. This seems a good idea to me.  
+    // But it seems that it's just too hard for many users to implement.
+
+    // Ideally, I would like to make this exception a warning -
+    // but there isn't anyway to do that.
+
     // if this fails, it's because it's been instantiated
     // in multiple modules - DLLS - a recipe for problems.
     // So trap this here
-    if(!result.second){
-        boost::serialization::throw_exception(
-            archive_exception(
-                archive_exception::multiple_code_instantiation,
-                bs->get_debug_info()
-            )
-        );
-    }
+    // if(!result.second){
+    //     boost::serialization::throw_exception(
+    //         archive_exception(
+    //             archive_exception::multiple_code_instantiation,
+    //             bs->get_debug_info()
+    //         )
+    //     );
+    // }
     return true;
 }