]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Check for a bug in gcc C++0x support.
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Sun, 18 Jan 2009 23:56:54 +0000 (23:56 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Sun, 18 Jan 2009 23:56:54 +0000 (23:56 +0000)
git-svn-id: https://svn.dealii.org/trunk@18227 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/aclocal.m4
deal.II/configure

index e4aefbe9bcf9188457853d8dd7ac7927129f47f8..d28dbce4a98d6d66c08aa59f5e1d62a7fc708118 100644 (file)
@@ -1138,6 +1138,18 @@ AC_DEFUN(DEAL_II_CHECK_CXX0X_COMPONENTS, dnl
        [ AC_MSG_RESULT(no); all_cxx0x_available=no ]
        )
 
+  dnl Make sure we don't run into GCC bug 35569
+  AC_MSG_CHECKING(for std::bind works with rvalues)
+  AC_TRY_COMPILE(
+       [#include <functional>
+        void f(int); ], 
+       [ using namespace std;
+         using namespace std::placeholders;
+         bind(multiplies<int>(),4,_1)(5); ;],
+       [ AC_MSG_RESULT(yes) ],
+       [ AC_MSG_RESULT(no); all_cxx0x_available=no ]
+       )
+
   AC_MSG_CHECKING(for std::shared_ptr)
   AC_TRY_COMPILE(
        [#include <memory>], 
index a4d4e6f06cf823fca07a711bea5279817ad97949..5d582455e3e4a179febcf27a72cb3dd36b6230ce 100755 (executable)
@@ -4100,6 +4100,56 @@ echo "${ECHO_T}no" >&6; }; all_cxx0x_available=no
 
 fi
 
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+    { echo "$as_me:$LINENO: checking for std::bind works with rvalues" >&5
+echo $ECHO_N "checking for std::bind works with rvalues... $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.  */
+#include <functional>
+        void f(int);
+int
+main ()
+{
+ using namespace std;
+         using namespace std::placeholders;
+         bind(multiplies<int>(),4,_1)(5); ;
+  ;
+  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; }
+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; }; all_cxx0x_available=no
+
+fi
+
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
   { echo "$as_me:$LINENO: checking for std::shared_ptr" >&5

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.