]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Detect whether compiler supports C++0x and if so enable it through the compatibility...
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 13 Jan 2009 14:13:48 +0000 (14:13 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 13 Jan 2009 14:13:48 +0000 (14:13 +0000)
git-svn-id: https://svn.dealii.org/trunk@18206 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/aclocal.m4
deal.II/base/include/base/config.h.in
deal.II/base/include/base/std_cxx0x/array.h
deal.II/base/include/base/std_cxx0x/bind.h
deal.II/base/include/base/std_cxx0x/function.h
deal.II/base/include/base/std_cxx0x/shared_ptr.h
deal.II/base/include/base/std_cxx0x/tuple.h
deal.II/base/include/base/thread_management.h
deal.II/configure

index 6b0114f3636f0b06612769f276e068e39d853423..1bbf090ed075b7afb516a345293f5ae55a4b51bc 100644 (file)
@@ -489,6 +489,26 @@ AC_DEFUN(DEAL_II_SET_CXX_FLAGS, dnl
     dnl BOOST uses long long, so don't warn about this
     CXXFLAGSG="$CXXFLAGSG -Wno-long-long"
 
+    dnl See whether the gcc we use already supports C++0x features.
+    dnl 
+    OLD_CXXFLAGS="$CXXFLAGS"
+    CXXFLAGS=-std=c++0x
+
+    AC_MSG_CHECKING(whether compiler supports C++0x)
+    AC_TRY_COMPILE([], [;],
+       [
+         AC_MSG_RESULT(yes)
+         CXXFLAGSG="$CXXFLAGSG -std=c++0x"
+         CXXFLAGSO="$CXXFLAGSO -std=c++0x"
+         AC_DEFINE(DEAL_II_CAN_USE_CXX0X, 1,
+                   [Defined if the compiler we use supports the upcoming C++0x standard.])
+       ],
+       [
+         AC_MSG_RESULT(no)
+       ])
+    CXXFLAGS="${OLD_CXXFLAGS}"
+
+
     dnl On some gcc 4.3 snapshots, a 'const' qualifier on a return type triggers a
     dnl warning. This is unfortunate, since we happen to stumble on this
     dnl in some of our template trickery with iterator classes. If necessary,
index 6f1354ec43f52a5b144d4c8f043419fcf942e4c0..816a0997800b3cc30664f9cfb39f5e2c9e4849a7 100644 (file)
@@ -65,6 +65,9 @@
    floating point computations on cygwin systems. */
 #undef DEAL_II_BROKEN_SOCKETS
 
+/* Defined if the compiler we use supports the upcoming C++0x standard. */
+#undef DEAL_II_CAN_USE_CXX0X
+
 /* Backward compatibility support for functions and classes that do not take
    an explicit mapping variable, but rather use a default Q1 mapping instead
    */
index 925aae66d1093306eabe9a98778f7e13ddbee45b..6a856584733f08bf11ca8efe3a7cc57c20de0d37 100644 (file)
 
 
 #include <base/config.h>
-#include <boost/array.hpp>
 
+#ifdef DEAL_II_CAN_USE_CXX0X
 
-DEAL_II_NAMESPACE_OPEN
+#  include <array>
+
+#else
+
+#include <boost/array.hpp>
 
+DEAL_II_NAMESPACE_OPEN
 namespace std_cxx0x
 {
   using boost::array;
 }
-
-
 DEAL_II_NAMESPACE_CLOSE
 
 #endif
+
+#endif
index baf313a72433af83d8ace53aa486281f45b194d7..d866ec9610acf5f1be4195ee21e108166b5aefe2 100644 (file)
 
 
 #include <base/config.h>
-#include <boost/bind.hpp>
 
+#ifdef DEAL_II_CAN_USE_CXX0X
+
+#  include <functional>
 
 DEAL_II_NAMESPACE_OPEN
+// in boost, the placeholders _1, _2, ... are in the global namespace. in
+// C++0x, they are in namespace std::placeholders, which makes them awkward to
+// use. import them into the deal.II namespace
+using namespace std::placeholders;
+DEAL_II_NAMESPACE_CLOSE
+
+#else
+
+#include <boost/bind.hpp>
 
+DEAL_II_NAMESPACE_OPEN
 namespace std_cxx0x
 {
   using boost::bind;
@@ -27,8 +39,8 @@ namespace std_cxx0x
   using boost::cref;
   using boost::reference_wrapper;
 }
-
-
 DEAL_II_NAMESPACE_CLOSE
 
 #endif
+
+#endif
index e17704a4b1fdbd5ea628e6aaa411796f58181c2f..39e7aec27d8c782abae4f8f3aad6764921bf0545 100644 (file)
 
 
 #include <base/config.h>
-#include <boost/function.hpp>
 
+#ifdef DEAL_II_CAN_USE_CXX0X
 
-DEAL_II_NAMESPACE_OPEN
+#  include <functional>
+
+#else
+
+#include <boost/function.hpp>
 
+DEAL_II_NAMESPACE_OPEN
 namespace std_cxx0x
 {
   using boost::function;
 }
-
-
 DEAL_II_NAMESPACE_CLOSE
 
 #endif
+
+#endif
index 0c5e032f831ebe0fb77f4c6dced90760873087c8..69238ae88b0c3721d9ec597b3bbb55f92a35b193 100644 (file)
 
 
 #include <base/config.h>
-#include <boost/shared_ptr.hpp>
 
+#ifdef DEAL_II_CAN_USE_CXX0X
 
-DEAL_II_NAMESPACE_OPEN
+#  include <memory>
+
+#else
+
+#include <boost/shared_ptr.hpp>
 
+DEAL_II_NAMESPACE_OPEN
 namespace std_cxx0x
 {
   using boost::shared_ptr;
 }
-
-
 DEAL_II_NAMESPACE_CLOSE
 
 #endif
+
+#endif
index 86ecd219ecc501f08f5b31e5e3b61285cf963f21..5fa0e0808e7f29d962e9f82f47c9b575055cca6b 100644 (file)
 
 
 #include <base/config.h>
-#include <boost/tuple/tuple.hpp>
 
+#ifdef DEAL_II_CAN_USE_CXX0X
 
-DEAL_II_NAMESPACE_OPEN
+#  include <tuple>
+
+#else
 
+#include <boost/tuple/tuple.hpp>
+
+DEAL_II_NAMESPACE_OPEN
 namespace std_cxx0x
 {
   using boost::tuple;
   using boost::get;
-  
-  namespace tuples
+
+                                  // boost::tuples::length has been renamed
+                                  // by the standard to std::tuple_size
+  template <typename T>
+  struct tuple_size 
+  {
+      static const std::size_t value = boost::tuples::length<T>::value;
+  };
+
+                                  // similarly, boost::tuples::element has
+                                  // been renamed by the standard to
+                                  // std::tuple_element
+  template <int N, typename T>
+  struct tuple_element
   {
-    using namespace boost::tuples;
-  }
+      typedef boost::tuples::element<N,T> type;
+  };
 }
-
-
 DEAL_II_NAMESPACE_CLOSE
 
 #endif
+
+#endif
index f1696b0a135fed7061c716b3ac6c62209929ddc0..0a912d50e1b63672d80c6983ae28b2726a7d55f6 100644 (file)
@@ -953,7 +953,7 @@ namespace Threads
                                       * for each number of arguments.
                                       */
     template <typename RT, typename ArgList,
-              int length = std_cxx0x::tuples::length<ArgList>::value>
+              int length = std_cxx0x::tuple_size<ArgList>::value>
     struct fun_ptr_helper;
   
 
@@ -981,7 +981,7 @@ namespace Threads
     template <typename RT, typename ArgList>
     struct fun_ptr_helper<RT, ArgList, 1>
     {
-        typedef RT (type) (typename std_cxx0x::tuples::element<0,ArgList>::type);
+        typedef RT (type) (typename std_cxx0x::tuple_element<0,ArgList>::type);
     };
 
 
@@ -995,8 +995,8 @@ namespace Threads
     template <typename RT, typename ArgList>
     struct fun_ptr_helper<RT, ArgList, 2>
     {
-        typedef RT (type) (typename std_cxx0x::tuples::element<0,ArgList>::type,
-                          typename std_cxx0x::tuples::element<1,ArgList>::type);
+        typedef RT (type) (typename std_cxx0x::tuple_element<0,ArgList>::type,
+                          typename std_cxx0x::tuple_element<1,ArgList>::type);
     };
 
 
@@ -1010,9 +1010,9 @@ namespace Threads
     template <typename RT, typename ArgList>
     struct fun_ptr_helper<RT, ArgList, 3>
     {
-        typedef RT (type) (typename std_cxx0x::tuples::element<0,ArgList>::type,
-                          typename std_cxx0x::tuples::element<1,ArgList>::type,
-                          typename std_cxx0x::tuples::element<2,ArgList>::type);
+        typedef RT (type) (typename std_cxx0x::tuple_element<0,ArgList>::type,
+                          typename std_cxx0x::tuple_element<1,ArgList>::type,
+                          typename std_cxx0x::tuple_element<2,ArgList>::type);
     };
 
 
@@ -1026,10 +1026,10 @@ namespace Threads
     template <typename RT, typename ArgList>
     struct fun_ptr_helper<RT, ArgList, 4>
     {
-        typedef RT (type) (typename std_cxx0x::tuples::element<0,ArgList>::type,
-                          typename std_cxx0x::tuples::element<1,ArgList>::type,
-                          typename std_cxx0x::tuples::element<2,ArgList>::type,
-                          typename std_cxx0x::tuples::element<3,ArgList>::type);
+        typedef RT (type) (typename std_cxx0x::tuple_element<0,ArgList>::type,
+                          typename std_cxx0x::tuple_element<1,ArgList>::type,
+                          typename std_cxx0x::tuple_element<2,ArgList>::type,
+                          typename std_cxx0x::tuple_element<3,ArgList>::type);
     };
 
 
@@ -1043,11 +1043,11 @@ namespace Threads
     template <typename RT, typename ArgList>
     struct fun_ptr_helper<RT, ArgList, 5>
     {
-        typedef RT (type) (typename std_cxx0x::tuples::element<0,ArgList>::type,
-                          typename std_cxx0x::tuples::element<1,ArgList>::type,
-                          typename std_cxx0x::tuples::element<2,ArgList>::type,
-                          typename std_cxx0x::tuples::element<3,ArgList>::type,
-                          typename std_cxx0x::tuples::element<4,ArgList>::type);
+        typedef RT (type) (typename std_cxx0x::tuple_element<0,ArgList>::type,
+                          typename std_cxx0x::tuple_element<1,ArgList>::type,
+                          typename std_cxx0x::tuple_element<2,ArgList>::type,
+                          typename std_cxx0x::tuple_element<3,ArgList>::type,
+                          typename std_cxx0x::tuple_element<4,ArgList>::type);
     };
 
 
@@ -1061,12 +1061,12 @@ namespace Threads
     template <typename RT, typename ArgList>
     struct fun_ptr_helper<RT, ArgList, 6>
     {
-        typedef RT (type) (typename std_cxx0x::tuples::element<0,ArgList>::type,
-                          typename std_cxx0x::tuples::element<1,ArgList>::type,
-                          typename std_cxx0x::tuples::element<2,ArgList>::type,
-                          typename std_cxx0x::tuples::element<3,ArgList>::type,
-                          typename std_cxx0x::tuples::element<4,ArgList>::type,
-                          typename std_cxx0x::tuples::element<5,ArgList>::type);
+        typedef RT (type) (typename std_cxx0x::tuple_element<0,ArgList>::type,
+                          typename std_cxx0x::tuple_element<1,ArgList>::type,
+                          typename std_cxx0x::tuple_element<2,ArgList>::type,
+                          typename std_cxx0x::tuple_element<3,ArgList>::type,
+                          typename std_cxx0x::tuple_element<4,ArgList>::type,
+                          typename std_cxx0x::tuple_element<5,ArgList>::type);
     };
 
 
@@ -1080,13 +1080,13 @@ namespace Threads
     template <typename RT, typename ArgList>
     struct fun_ptr_helper<RT, ArgList, 7>
     {
-        typedef RT (type) (typename std_cxx0x::tuples::element<0,ArgList>::type,
-                          typename std_cxx0x::tuples::element<1,ArgList>::type,
-                          typename std_cxx0x::tuples::element<2,ArgList>::type,
-                          typename std_cxx0x::tuples::element<3,ArgList>::type,
-                          typename std_cxx0x::tuples::element<4,ArgList>::type,
-                          typename std_cxx0x::tuples::element<5,ArgList>::type,
-                          typename std_cxx0x::tuples::element<6,ArgList>::type);
+        typedef RT (type) (typename std_cxx0x::tuple_element<0,ArgList>::type,
+                          typename std_cxx0x::tuple_element<1,ArgList>::type,
+                          typename std_cxx0x::tuple_element<2,ArgList>::type,
+                          typename std_cxx0x::tuple_element<3,ArgList>::type,
+                          typename std_cxx0x::tuple_element<4,ArgList>::type,
+                          typename std_cxx0x::tuple_element<5,ArgList>::type,
+                          typename std_cxx0x::tuple_element<6,ArgList>::type);
     };
 
 
@@ -1100,14 +1100,14 @@ namespace Threads
     template <typename RT, typename ArgList>
     struct fun_ptr_helper<RT, ArgList, 8>
     {
-        typedef RT (type) (typename std_cxx0x::tuples::element<0,ArgList>::type,
-                          typename std_cxx0x::tuples::element<1,ArgList>::type,
-                          typename std_cxx0x::tuples::element<2,ArgList>::type,
-                          typename std_cxx0x::tuples::element<3,ArgList>::type,
-                          typename std_cxx0x::tuples::element<4,ArgList>::type,
-                          typename std_cxx0x::tuples::element<5,ArgList>::type,
-                          typename std_cxx0x::tuples::element<6,ArgList>::type,
-                          typename std_cxx0x::tuples::element<7,ArgList>::type);
+        typedef RT (type) (typename std_cxx0x::tuple_element<0,ArgList>::type,
+                          typename std_cxx0x::tuple_element<1,ArgList>::type,
+                          typename std_cxx0x::tuple_element<2,ArgList>::type,
+                          typename std_cxx0x::tuple_element<3,ArgList>::type,
+                          typename std_cxx0x::tuple_element<4,ArgList>::type,
+                          typename std_cxx0x::tuple_element<5,ArgList>::type,
+                          typename std_cxx0x::tuple_element<6,ArgList>::type,
+                          typename std_cxx0x::tuple_element<7,ArgList>::type);
     };
 
 
@@ -1121,15 +1121,15 @@ namespace Threads
     template <typename RT, typename ArgList>
     struct fun_ptr_helper<RT, ArgList, 9>
     {
-        typedef RT (type) (typename std_cxx0x::tuples::element<0,ArgList>::type,
-                          typename std_cxx0x::tuples::element<1,ArgList>::type,
-                          typename std_cxx0x::tuples::element<2,ArgList>::type,
-                          typename std_cxx0x::tuples::element<3,ArgList>::type,
-                          typename std_cxx0x::tuples::element<4,ArgList>::type,
-                          typename std_cxx0x::tuples::element<5,ArgList>::type,
-                          typename std_cxx0x::tuples::element<6,ArgList>::type,
-                          typename std_cxx0x::tuples::element<7,ArgList>::type,
-                          typename std_cxx0x::tuples::element<8,ArgList>::type);
+        typedef RT (type) (typename std_cxx0x::tuple_element<0,ArgList>::type,
+                          typename std_cxx0x::tuple_element<1,ArgList>::type,
+                          typename std_cxx0x::tuple_element<2,ArgList>::type,
+                          typename std_cxx0x::tuple_element<3,ArgList>::type,
+                          typename std_cxx0x::tuple_element<4,ArgList>::type,
+                          typename std_cxx0x::tuple_element<5,ArgList>::type,
+                          typename std_cxx0x::tuple_element<6,ArgList>::type,
+                          typename std_cxx0x::tuple_element<7,ArgList>::type,
+                          typename std_cxx0x::tuple_element<8,ArgList>::type);
     };
 
 
@@ -1144,16 +1144,16 @@ namespace Threads
     template <typename RT, typename ArgList>
     struct fun_ptr_helper<RT, ArgList, 10>
     {
-        typedef RT (type) (typename std_cxx0x::tuples::element<0,ArgList>::type,
-                          typename std_cxx0x::tuples::element<1,ArgList>::type,
-                          typename std_cxx0x::tuples::element<2,ArgList>::type,
-                          typename std_cxx0x::tuples::element<3,ArgList>::type,
-                          typename std_cxx0x::tuples::element<4,ArgList>::type,
-                          typename std_cxx0x::tuples::element<5,ArgList>::type,
-                          typename std_cxx0x::tuples::element<6,ArgList>::type,
-                          typename std_cxx0x::tuples::element<7,ArgList>::type,
-                          typename std_cxx0x::tuples::element<8,ArgList>::type,
-                          typename std_cxx0x::tuples::element<9,ArgList>::type);
+        typedef RT (type) (typename std_cxx0x::tuple_element<0,ArgList>::type,
+                          typename std_cxx0x::tuple_element<1,ArgList>::type,
+                          typename std_cxx0x::tuple_element<2,ArgList>::type,
+                          typename std_cxx0x::tuple_element<3,ArgList>::type,
+                          typename std_cxx0x::tuple_element<4,ArgList>::type,
+                          typename std_cxx0x::tuple_element<5,ArgList>::type,
+                          typename std_cxx0x::tuple_element<6,ArgList>::type,
+                          typename std_cxx0x::tuple_element<7,ArgList>::type,
+                          typename std_cxx0x::tuple_element<8,ArgList>::type,
+                          typename std_cxx0x::tuple_element<9,ArgList>::type);
     };
 
   
@@ -1777,12 +1777,12 @@ namespace Threads
 
         inline
         Thread<RT>
-        operator() (typename std_cxx0x::tuples::element<0,ArgList>::type arg1)
+        operator() (typename std_cxx0x::tuple_element<0,ArgList>::type arg1)
          {
            return
              ThreadStarter<RT>::start_thread
              (std_cxx0x::bind (function,
-                           internal::maybe_make_ref<typename std_cxx0x::tuples::element<0,ArgList>::type>::act(arg1)));
+                           internal::maybe_make_ref<typename std_cxx0x::tuple_element<0,ArgList>::type>::act(arg1)));
          }
     
       private:
@@ -1808,14 +1808,14 @@ namespace Threads
 
        inline
        Thread<RT>
-       operator() (typename std_cxx0x::tuples::element<0,ArgList>::type arg1,
-                   typename std_cxx0x::tuples::element<1,ArgList>::type arg2)
+       operator() (typename std_cxx0x::tuple_element<0,ArgList>::type arg1,
+                   typename std_cxx0x::tuple_element<1,ArgList>::type arg2)
          {
            return
              ThreadStarter<RT>::start_thread
              (std_cxx0x::bind (function,
-                           internal::maybe_make_ref<typename std_cxx0x::tuples::element<0,ArgList>::type>::act(arg1),
-                           internal::maybe_make_ref<typename std_cxx0x::tuples::element<1,ArgList>::type>::act(arg2)));
+                           internal::maybe_make_ref<typename std_cxx0x::tuple_element<0,ArgList>::type>::act(arg1),
+                           internal::maybe_make_ref<typename std_cxx0x::tuple_element<1,ArgList>::type>::act(arg2)));
          }
     
       private:
@@ -1841,16 +1841,16 @@ namespace Threads
 
        inline
        Thread<RT>
-       operator() (typename std_cxx0x::tuples::element<0,ArgList>::type arg1,
-                   typename std_cxx0x::tuples::element<1,ArgList>::type arg2,
-                   typename std_cxx0x::tuples::element<2,ArgList>::type arg3)
+       operator() (typename std_cxx0x::tuple_element<0,ArgList>::type arg1,
+                   typename std_cxx0x::tuple_element<1,ArgList>::type arg2,
+                   typename std_cxx0x::tuple_element<2,ArgList>::type arg3)
          {
            return
              ThreadStarter<RT>::start_thread
              (std_cxx0x::bind (function,
-                           internal::maybe_make_ref<typename std_cxx0x::tuples::element<0,ArgList>::type>::act(arg1),
-                           internal::maybe_make_ref<typename std_cxx0x::tuples::element<1,ArgList>::type>::act(arg2),
-                           internal::maybe_make_ref<typename std_cxx0x::tuples::element<2,ArgList>::type>::act(arg3)));
+                           internal::maybe_make_ref<typename std_cxx0x::tuple_element<0,ArgList>::type>::act(arg1),
+                           internal::maybe_make_ref<typename std_cxx0x::tuple_element<1,ArgList>::type>::act(arg2),
+                           internal::maybe_make_ref<typename std_cxx0x::tuple_element<2,ArgList>::type>::act(arg3)));
          }
     
       private:
@@ -1876,18 +1876,18 @@ namespace Threads
 
        inline
        Thread<RT>
-       operator() (typename std_cxx0x::tuples::element<0,ArgList>::type arg1,
-                   typename std_cxx0x::tuples::element<1,ArgList>::type arg2,
-                   typename std_cxx0x::tuples::element<2,ArgList>::type arg3,
-                   typename std_cxx0x::tuples::element<3,ArgList>::type arg4)
+       operator() (typename std_cxx0x::tuple_element<0,ArgList>::type arg1,
+                   typename std_cxx0x::tuple_element<1,ArgList>::type arg2,
+                   typename std_cxx0x::tuple_element<2,ArgList>::type arg3,
+                   typename std_cxx0x::tuple_element<3,ArgList>::type arg4)
          {
            return
              ThreadStarter<RT>::start_thread
              (std_cxx0x::bind (function,
-                           internal::maybe_make_ref<typename std_cxx0x::tuples::element<0,ArgList>::type>::act(arg1),
-                           internal::maybe_make_ref<typename std_cxx0x::tuples::element<1,ArgList>::type>::act(arg2),
-                           internal::maybe_make_ref<typename std_cxx0x::tuples::element<2,ArgList>::type>::act(arg3),
-                           internal::maybe_make_ref<typename std_cxx0x::tuples::element<3,ArgList>::type>::act(arg4)));
+                           internal::maybe_make_ref<typename std_cxx0x::tuple_element<0,ArgList>::type>::act(arg1),
+                           internal::maybe_make_ref<typename std_cxx0x::tuple_element<1,ArgList>::type>::act(arg2),
+                           internal::maybe_make_ref<typename std_cxx0x::tuple_element<2,ArgList>::type>::act(arg3),
+                           internal::maybe_make_ref<typename std_cxx0x::tuple_element<3,ArgList>::type>::act(arg4)));
          }
     
       private:
@@ -1913,20 +1913,20 @@ namespace Threads
 
        inline
        Thread<RT>
-       operator() (typename std_cxx0x::tuples::element<0,ArgList>::type arg1,
-                   typename std_cxx0x::tuples::element<1,ArgList>::type arg2,
-                   typename std_cxx0x::tuples::element<2,ArgList>::type arg3,
-                   typename std_cxx0x::tuples::element<3,ArgList>::type arg4,
-                   typename std_cxx0x::tuples::element<4,ArgList>::type arg5)
+       operator() (typename std_cxx0x::tuple_element<0,ArgList>::type arg1,
+                   typename std_cxx0x::tuple_element<1,ArgList>::type arg2,
+                   typename std_cxx0x::tuple_element<2,ArgList>::type arg3,
+                   typename std_cxx0x::tuple_element<3,ArgList>::type arg4,
+                   typename std_cxx0x::tuple_element<4,ArgList>::type arg5)
          {
            return
              ThreadStarter<RT>::start_thread
              (std_cxx0x::bind (function,
-                           internal::maybe_make_ref<typename std_cxx0x::tuples::element<0,ArgList>::type>::act(arg1),
-                           internal::maybe_make_ref<typename std_cxx0x::tuples::element<1,ArgList>::type>::act(arg2),
-                           internal::maybe_make_ref<typename std_cxx0x::tuples::element<2,ArgList>::type>::act(arg3),
-                           internal::maybe_make_ref<typename std_cxx0x::tuples::element<3,ArgList>::type>::act(arg4),
-                           internal::maybe_make_ref<typename std_cxx0x::tuples::element<4,ArgList>::type>::act(arg5)));
+                           internal::maybe_make_ref<typename std_cxx0x::tuple_element<0,ArgList>::type>::act(arg1),
+                           internal::maybe_make_ref<typename std_cxx0x::tuple_element<1,ArgList>::type>::act(arg2),
+                           internal::maybe_make_ref<typename std_cxx0x::tuple_element<2,ArgList>::type>::act(arg3),
+                           internal::maybe_make_ref<typename std_cxx0x::tuple_element<3,ArgList>::type>::act(arg4),
+                           internal::maybe_make_ref<typename std_cxx0x::tuple_element<4,ArgList>::type>::act(arg5)));
          }
     
       private:
@@ -1952,22 +1952,22 @@ namespace Threads
 
        inline
        Thread<RT>
-       operator() (typename std_cxx0x::tuples::element<0,ArgList>::type arg1,
-                   typename std_cxx0x::tuples::element<1,ArgList>::type arg2,
-                   typename std_cxx0x::tuples::element<2,ArgList>::type arg3,
-                   typename std_cxx0x::tuples::element<3,ArgList>::type arg4,
-                   typename std_cxx0x::tuples::element<4,ArgList>::type arg5,
-                   typename std_cxx0x::tuples::element<5,ArgList>::type arg6)
+       operator() (typename std_cxx0x::tuple_element<0,ArgList>::type arg1,
+                   typename std_cxx0x::tuple_element<1,ArgList>::type arg2,
+                   typename std_cxx0x::tuple_element<2,ArgList>::type arg3,
+                   typename std_cxx0x::tuple_element<3,ArgList>::type arg4,
+                   typename std_cxx0x::tuple_element<4,ArgList>::type arg5,
+                   typename std_cxx0x::tuple_element<5,ArgList>::type arg6)
          {
            return
              ThreadStarter<RT>::start_thread
              (std_cxx0x::bind (function,
-                           internal::maybe_make_ref<typename std_cxx0x::tuples::element<0,ArgList>::type>::act(arg1),
-                           internal::maybe_make_ref<typename std_cxx0x::tuples::element<1,ArgList>::type>::act(arg2),
-                           internal::maybe_make_ref<typename std_cxx0x::tuples::element<2,ArgList>::type>::act(arg3),
-                           internal::maybe_make_ref<typename std_cxx0x::tuples::element<3,ArgList>::type>::act(arg4),
-                           internal::maybe_make_ref<typename std_cxx0x::tuples::element<4,ArgList>::type>::act(arg5),
-                           internal::maybe_make_ref<typename std_cxx0x::tuples::element<5,ArgList>::type>::act(arg6)));
+                           internal::maybe_make_ref<typename std_cxx0x::tuple_element<0,ArgList>::type>::act(arg1),
+                           internal::maybe_make_ref<typename std_cxx0x::tuple_element<1,ArgList>::type>::act(arg2),
+                           internal::maybe_make_ref<typename std_cxx0x::tuple_element<2,ArgList>::type>::act(arg3),
+                           internal::maybe_make_ref<typename std_cxx0x::tuple_element<3,ArgList>::type>::act(arg4),
+                           internal::maybe_make_ref<typename std_cxx0x::tuple_element<4,ArgList>::type>::act(arg5),
+                           internal::maybe_make_ref<typename std_cxx0x::tuple_element<5,ArgList>::type>::act(arg6)));
          }
     
       private:
@@ -1993,24 +1993,24 @@ namespace Threads
 
        inline
        Thread<RT>
-       operator() (typename std_cxx0x::tuples::element<0,ArgList>::type arg1,
-                   typename std_cxx0x::tuples::element<1,ArgList>::type arg2,
-                   typename std_cxx0x::tuples::element<2,ArgList>::type arg3,
-                   typename std_cxx0x::tuples::element<3,ArgList>::type arg4,
-                   typename std_cxx0x::tuples::element<4,ArgList>::type arg5,
-                   typename std_cxx0x::tuples::element<5,ArgList>::type arg6,
-                   typename std_cxx0x::tuples::element<6,ArgList>::type arg7)
+       operator() (typename std_cxx0x::tuple_element<0,ArgList>::type arg1,
+                   typename std_cxx0x::tuple_element<1,ArgList>::type arg2,
+                   typename std_cxx0x::tuple_element<2,ArgList>::type arg3,
+                   typename std_cxx0x::tuple_element<3,ArgList>::type arg4,
+                   typename std_cxx0x::tuple_element<4,ArgList>::type arg5,
+                   typename std_cxx0x::tuple_element<5,ArgList>::type arg6,
+                   typename std_cxx0x::tuple_element<6,ArgList>::type arg7)
          {
            return
              ThreadStarter<RT>::start_thread
              (std_cxx0x::bind (function,
-                           internal::maybe_make_ref<typename std_cxx0x::tuples::element<0,ArgList>::type>::act(arg1),
-                           internal::maybe_make_ref<typename std_cxx0x::tuples::element<1,ArgList>::type>::act(arg2),
-                           internal::maybe_make_ref<typename std_cxx0x::tuples::element<2,ArgList>::type>::act(arg3),
-                           internal::maybe_make_ref<typename std_cxx0x::tuples::element<3,ArgList>::type>::act(arg4),
-                           internal::maybe_make_ref<typename std_cxx0x::tuples::element<4,ArgList>::type>::act(arg5),
-                           internal::maybe_make_ref<typename std_cxx0x::tuples::element<5,ArgList>::type>::act(arg6),
-                           internal::maybe_make_ref<typename std_cxx0x::tuples::element<6,ArgList>::type>::act(arg7)));
+                           internal::maybe_make_ref<typename std_cxx0x::tuple_element<0,ArgList>::type>::act(arg1),
+                           internal::maybe_make_ref<typename std_cxx0x::tuple_element<1,ArgList>::type>::act(arg2),
+                           internal::maybe_make_ref<typename std_cxx0x::tuple_element<2,ArgList>::type>::act(arg3),
+                           internal::maybe_make_ref<typename std_cxx0x::tuple_element<3,ArgList>::type>::act(arg4),
+                           internal::maybe_make_ref<typename std_cxx0x::tuple_element<4,ArgList>::type>::act(arg5),
+                           internal::maybe_make_ref<typename std_cxx0x::tuple_element<5,ArgList>::type>::act(arg6),
+                           internal::maybe_make_ref<typename std_cxx0x::tuple_element<6,ArgList>::type>::act(arg7)));
          }
     
       private:
@@ -2036,26 +2036,26 @@ namespace Threads
 
        inline
        Thread<RT>
-       operator() (typename std_cxx0x::tuples::element<0,ArgList>::type arg1,
-                   typename std_cxx0x::tuples::element<1,ArgList>::type arg2,
-                   typename std_cxx0x::tuples::element<2,ArgList>::type arg3,
-                   typename std_cxx0x::tuples::element<3,ArgList>::type arg4,
-                   typename std_cxx0x::tuples::element<4,ArgList>::type arg5,
-                   typename std_cxx0x::tuples::element<5,ArgList>::type arg6,
-                   typename std_cxx0x::tuples::element<6,ArgList>::type arg7,
-                   typename std_cxx0x::tuples::element<7,ArgList>::type arg8)
+       operator() (typename std_cxx0x::tuple_element<0,ArgList>::type arg1,
+                   typename std_cxx0x::tuple_element<1,ArgList>::type arg2,
+                   typename std_cxx0x::tuple_element<2,ArgList>::type arg3,
+                   typename std_cxx0x::tuple_element<3,ArgList>::type arg4,
+                   typename std_cxx0x::tuple_element<4,ArgList>::type arg5,
+                   typename std_cxx0x::tuple_element<5,ArgList>::type arg6,
+                   typename std_cxx0x::tuple_element<6,ArgList>::type arg7,
+                   typename std_cxx0x::tuple_element<7,ArgList>::type arg8)
          {
            return
              ThreadStarter<RT>::start_thread
              (std_cxx0x::bind (function,
-                           internal::maybe_make_ref<typename std_cxx0x::tuples::element<0,ArgList>::type>::act(arg1),
-                           internal::maybe_make_ref<typename std_cxx0x::tuples::element<1,ArgList>::type>::act(arg2),
-                           internal::maybe_make_ref<typename std_cxx0x::tuples::element<2,ArgList>::type>::act(arg3),
-                           internal::maybe_make_ref<typename std_cxx0x::tuples::element<3,ArgList>::type>::act(arg4),
-                           internal::maybe_make_ref<typename std_cxx0x::tuples::element<4,ArgList>::type>::act(arg5),
-                           internal::maybe_make_ref<typename std_cxx0x::tuples::element<5,ArgList>::type>::act(arg6),
-                           internal::maybe_make_ref<typename std_cxx0x::tuples::element<6,ArgList>::type>::act(arg7),
-                           internal::maybe_make_ref<typename std_cxx0x::tuples::element<7,ArgList>::type>::act(arg8)));
+                           internal::maybe_make_ref<typename std_cxx0x::tuple_element<0,ArgList>::type>::act(arg1),
+                           internal::maybe_make_ref<typename std_cxx0x::tuple_element<1,ArgList>::type>::act(arg2),
+                           internal::maybe_make_ref<typename std_cxx0x::tuple_element<2,ArgList>::type>::act(arg3),
+                           internal::maybe_make_ref<typename std_cxx0x::tuple_element<3,ArgList>::type>::act(arg4),
+                           internal::maybe_make_ref<typename std_cxx0x::tuple_element<4,ArgList>::type>::act(arg5),
+                           internal::maybe_make_ref<typename std_cxx0x::tuple_element<5,ArgList>::type>::act(arg6),
+                           internal::maybe_make_ref<typename std_cxx0x::tuple_element<6,ArgList>::type>::act(arg7),
+                           internal::maybe_make_ref<typename std_cxx0x::tuple_element<7,ArgList>::type>::act(arg8)));
          }
     
       private:
@@ -2081,28 +2081,28 @@ namespace Threads
 
        inline
        Thread<RT>
-       operator() (typename std_cxx0x::tuples::element<0,ArgList>::type arg1,
-                   typename std_cxx0x::tuples::element<1,ArgList>::type arg2,
-                   typename std_cxx0x::tuples::element<2,ArgList>::type arg3,
-                   typename std_cxx0x::tuples::element<3,ArgList>::type arg4,
-                   typename std_cxx0x::tuples::element<4,ArgList>::type arg5,
-                   typename std_cxx0x::tuples::element<5,ArgList>::type arg6,
-                   typename std_cxx0x::tuples::element<6,ArgList>::type arg7,
-                   typename std_cxx0x::tuples::element<7,ArgList>::type arg8,
-                   typename std_cxx0x::tuples::element<8,ArgList>::type arg9)
+       operator() (typename std_cxx0x::tuple_element<0,ArgList>::type arg1,
+                   typename std_cxx0x::tuple_element<1,ArgList>::type arg2,
+                   typename std_cxx0x::tuple_element<2,ArgList>::type arg3,
+                   typename std_cxx0x::tuple_element<3,ArgList>::type arg4,
+                   typename std_cxx0x::tuple_element<4,ArgList>::type arg5,
+                   typename std_cxx0x::tuple_element<5,ArgList>::type arg6,
+                   typename std_cxx0x::tuple_element<6,ArgList>::type arg7,
+                   typename std_cxx0x::tuple_element<7,ArgList>::type arg8,
+                   typename std_cxx0x::tuple_element<8,ArgList>::type arg9)
          {
            return
              ThreadStarter<RT>::start_thread
              (std_cxx0x::bind (function,
-                           internal::maybe_make_ref<typename std_cxx0x::tuples::element<0,ArgList>::type>::act(arg1),
-                           internal::maybe_make_ref<typename std_cxx0x::tuples::element<1,ArgList>::type>::act(arg2),
-                           internal::maybe_make_ref<typename std_cxx0x::tuples::element<2,ArgList>::type>::act(arg3),
-                           internal::maybe_make_ref<typename std_cxx0x::tuples::element<3,ArgList>::type>::act(arg4),
-                           internal::maybe_make_ref<typename std_cxx0x::tuples::element<4,ArgList>::type>::act(arg5),
-                           internal::maybe_make_ref<typename std_cxx0x::tuples::element<5,ArgList>::type>::act(arg6),
-                           internal::maybe_make_ref<typename std_cxx0x::tuples::element<6,ArgList>::type>::act(arg7),
-                           internal::maybe_make_ref<typename std_cxx0x::tuples::element<7,ArgList>::type>::act(arg8),
-                           internal::maybe_make_ref<typename std_cxx0x::tuples::element<8,ArgList>::type>::act(arg9)));
+                           internal::maybe_make_ref<typename std_cxx0x::tuple_element<0,ArgList>::type>::act(arg1),
+                           internal::maybe_make_ref<typename std_cxx0x::tuple_element<1,ArgList>::type>::act(arg2),
+                           internal::maybe_make_ref<typename std_cxx0x::tuple_element<2,ArgList>::type>::act(arg3),
+                           internal::maybe_make_ref<typename std_cxx0x::tuple_element<3,ArgList>::type>::act(arg4),
+                           internal::maybe_make_ref<typename std_cxx0x::tuple_element<4,ArgList>::type>::act(arg5),
+                           internal::maybe_make_ref<typename std_cxx0x::tuple_element<5,ArgList>::type>::act(arg6),
+                           internal::maybe_make_ref<typename std_cxx0x::tuple_element<6,ArgList>::type>::act(arg7),
+                           internal::maybe_make_ref<typename std_cxx0x::tuple_element<7,ArgList>::type>::act(arg8),
+                           internal::maybe_make_ref<typename std_cxx0x::tuple_element<8,ArgList>::type>::act(arg9)));
          }
     
       private:
index aabb889d7202498d98fbf2898ef4989dbbedf777..ad5ecb513ea18da30450309adb88ea617d771ed1 100755 (executable)
@@ -3896,6 +3896,68 @@ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 
         CXXFLAGSG="$CXXFLAGSG -Wno-long-long"
 
+            OLD_CXXFLAGS="$CXXFLAGS"
+    CXXFLAGS=-std=c++0x
+
+    { echo "$as_me:$LINENO: checking whether compiler supports C++0x" >&5
+echo $ECHO_N "checking whether compiler supports C++0x... $ECHO_C" >&6; }
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_cxx_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+
+         { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+         CXXFLAGSG="$CXXFLAGSG -std=c++0x"
+         CXXFLAGSO="$CXXFLAGSO -std=c++0x"
+
+cat >>confdefs.h <<\_ACEOF
+#define DEAL_II_CAN_USE_CXX0X 1
+_ACEOF
+
+
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+         { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+    CXXFLAGS="${OLD_CXXFLAGS}"
+
+
                     CXXFLAGS="-Wreturn-type -Werror"
     { echo "$as_me:$LINENO: checking whether qualifiers in return types lead to a warning" >&5
 echo $ECHO_N "checking whether qualifiers in return types lead to a warning... $ECHO_C" >&6; }

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.