[MOAB-dev] r4278 - in MOAB/trunk: . config src src/io

kraftche at cae.wisc.edu kraftche at cae.wisc.edu
Thu Nov 18 13:41:39 CST 2010


Author: kraftche
Date: 2010-11-18 13:41:39 -0600 (Thu, 18 Nov 2010)
New Revision: 4278

Modified:
   MOAB/trunk/config/cplusplus.m4
   MOAB/trunk/configure.ac
   MOAB/trunk/src/AEntityFactory.cpp
   MOAB/trunk/src/MeshSetSequence.cpp
   MOAB/trunk/src/Skinner.cpp
   MOAB/trunk/src/io/ReadHDF5.hpp
   MOAB/trunk/src/io/ReadIDEAS.cpp
   MOAB/trunk/src/io/WriteVtk.cpp
Log:
fix protability issues

Modified: MOAB/trunk/config/cplusplus.m4
===================================================================
--- MOAB/trunk/config/cplusplus.m4	2010-11-18 18:37:36 UTC (rev 4277)
+++ MOAB/trunk/config/cplusplus.m4	2010-11-18 19:41:39 UTC (rev 4278)
@@ -173,3 +173,31 @@
 fi
 
 ]) # FATHOM_TEMPLATE_FUNC_SPECIALIZATION
+
+
+#######################################################################################
+# Check if c++ standard library implements templatized vertor insert:
+# v.insert( v.begin(), o.begin(), o.end() ); where 'o' is not a std::vector
+# Sets NO_VECTOR_TEMPLATE_INSERT=-DNO_VECTOR_TEMPLATE_INSERT
+# if support is not found.
+#######################################################################################
+AC_DEFUN([FATHOM_VECTOR_TEMPLATE_INSERT],[
+AC_CACHE_CHECK([if std::vector has templatized insert method],
+               [fathom_cv_std_vector_templatized_insert],[
+AC_LANG_PUSH([C++])
+AC_COMPILE_IFELSE(
+[AC_LANG_PROGRAM(
+[#include <vector>
+ #include <list>],
+[std::vector<int> v;
+ std::list<int> l;
+ v.insert( v.begin(), l.begin(), l.end() );
+])],
+[fathom_cv_std_vector_templatized_insert=yes],
+[fathom_cv_std_vector_templatized_insert=no])
+AC_LANG_POP([C++])])
+NO_VECTOR_TEMPLATE_INSERT=
+if test $fathom_cv_std_vector_templatized_insert = no; then
+  NO_VECTOR_TEMPLATE_INSERT=-DNO_VECTOR_TEMPLATE_INSERT
+fi
+])

Modified: MOAB/trunk/configure.ac
===================================================================
--- MOAB/trunk/configure.ac	2010-11-18 18:37:36 UTC (rev 4277)
+++ MOAB/trunk/configure.ac	2010-11-18 19:41:39 UTC (rev 4278)
@@ -59,6 +59,8 @@
 # is larger that 2GB.
 AM_CPPFLAGS="$AM_CPPFLAGS -D_FILE_OFFSET_BITS=64"
 
+FATHOM_VECTOR_TEMPLATE_INSERT
+AM_CPPFLAGS="$AM_CPPFLAGS $NO_VECTOR_TEMPLATE_INSERT"
 
 
 ################################################################################



More information about the moab-dev mailing list