Update of /cvsroot/boost/boost/boost/mpi/detail
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv21972/detail

Modified Files:
        mpi_datatype_cache.hpp packed_oprimitive.hpp 
Log Message:
Introduce workarounds a fixes for Microsoft's tool chain, based on MS-MPI and 
Visual C++ 8.0

Index: mpi_datatype_cache.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/mpi/detail/mpi_datatype_cache.hpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- mpi_datatype_cache.hpp      17 Jan 2007 02:48:47 -0000      1.1
+++ mpi_datatype_cache.hpp      16 Feb 2007 21:01:25 -0000      1.2
@@ -18,6 +18,15 @@
 #include <map>
 #include <typeinfo>
 
+// The std::type_info::before function in Visual C++ 8.0 (and probably earlier)
+// incorrectly returns an "int" instead of a "bool". Then the compiler has the
+// audacity to complain when that "int" is converted to a "bool". Silence
+// this warning.
+#ifdef BOOST_MSVC
+#  pragma warning(push)
+#  pragma warning(disable : 4800)
+#endif
+
 namespace boost { namespace mpi { namespace detail {
 
 /// @brief comparison function object for two std::type_info pointers
@@ -55,13 +64,13 @@
   }
 
   template <class T>
-  MPI_Datatype datatype(const T& = T(), typename 
boost::enable_if<is_mpi_builtin_datatype<T> >::type* =0)
+  MPI_Datatype datatype(const T& x = T(), typename 
boost::enable_if<is_mpi_builtin_datatype<T> >::type* =0)
   {
-    return get_mpi_datatype<T>();
+    return get_mpi_datatype<T>(x);
   }
 
   template <class T>
-  MPI_Datatype datatype(const T& x=T(), typename 
boost::disable_if<is_mpi_builtin_datatype<T> >::type* =0 )
+  MPI_Datatype datatype(const T& x =T(), typename 
boost::disable_if<is_mpi_builtin_datatype<T> >::type* =0 )
   {
     BOOST_MPL_ASSERT((is_mpi_datatype<T>));
 
@@ -94,5 +103,8 @@
 
 } } } // end namespace boost::mpi::detail
 
+#ifdef BOOST_MSVC
+#  pragma warning(pop)
+#endif
 
 #endif // BOOST_MPI_DETAIL_TYPE_MPI_DATATYPE_CACHE_HPP

Index: packed_oprimitive.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/mpi/detail/packed_oprimitive.hpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- packed_oprimitive.hpp       17 Jan 2007 02:48:47 -0000      1.1
+++ packed_oprimitive.hpp       16 Feb 2007 21:01:25 -0000      1.2
@@ -74,7 +74,7 @@
     template<class T>
     void save(const T & t)
     {
-        save_impl(&t, get_mpi_datatype<T>(), 1);
+        save_impl(&t, get_mpi_datatype<T>(t), 1);
     }
 
         void save(const std::string &s)


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Boost-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/boost-cvs

Reply via email to