+dnl -------------------------------------------------------------
+dnl Old versions of gcc had a problem with arrays inside ?:
+dnl expressions: they decayed too quickly to pointers. This then
+dnl leads to erroneous warnings :-(
+dnl
+dnl Usage: DEAL_II_CHECK_ARRAY_CONDITIONAL_DECAY_BUG
+dnl
+dnl -------------------------------------------------------------
+AC_DEFUN(DEAL_II_CHECK_ARRAY_CONDITIONAL_DECAY_BUG, dnl
+[
+ AC_MSG_CHECKING(for array assignment in conditional bug)
+ AC_LANG(C++)
+ CXXFLAGS="-W -Wall -Werror"
+ AC_TRY_COMPILE(
+ [
+ ],
+ [
+ const int x[2][2] = {{1,1},{1,1}};
+ const int (&y)[2] = (1 ? x[0] : x[1]);
+ return y[0];
+ ],
+ [
+ AC_MSG_RESULT(no)
+ ],
+ [
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(DEAL_II_ARRAY_CONDITIONAL_DECAY_BUG, 1,
+ [Defined if the compiler has a problem with
+ assigning arrays in conditionals])
+ ])
+])
+
+
+
dnl -------------------------------------------------------------
dnl The boost::shared_ptr class has a templated assignment operator
dnl but no assignment operator matching the default operator
* The constants defined here are a subset of the @p{M_XXX} constants sometimes
* declared in the system include file @p{math.h}, but without the
* prefix @p{M_}.
+ *
+ * In addition to that, we declare @p{invalid_unsigned_int} to be the
+ * largest unsigned integer representable; this value is widely used in
+ * the library as a marker for an invalid index, an invalid size of an
+ * array, and similar purposes.
*/
namespace deal_II_numbers {
+ /**
+ * Representation of the
+ * largest number that
+ * can be put into an
+ * unsigned integer. This
+ * value is widely used
+ * throughout the library
+ * as a marker for an
+ * invalid unsigned
+ * integer value, such as
+ * an invalid array
+ * index, an invalid
+ * array size, and the
+ * like.
+ */
+ static const unsigned int
+ invalid_unsigned_int = static_cast<unsigned int> (-1);
+
/**
* e
*/
_ACEOF
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+
+
+ echo "$as_me:$LINENO: checking for array assignment in conditional bug" >&5
+echo $ECHO_N "checking for array assignment in conditional bug... $ECHO_C" >&6
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ CXXFLAGS="-W -Wall -Werror"
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+
+int
+main ()
+{
+
+ const int x[2][2] = {{1,1},{1,1}};
+ const int (&y)[2] = (1 ? x[0] : x[1]);
+ return y[0];
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+
+cat >>confdefs.h <<\_ACEOF
+#define DEAL_II_ARRAY_CONDITIONAL_DECAY_BUG 1
+_ACEOF
+
+
fi
rm -f conftest.$ac_objext conftest.$ac_ext
DEAL_II_CHECK_LONG_DOUBLE_LOOP_BUG
DEAL_II_CHECK_ANON_NAMESPACE_BUG
DEAL_II_CHECK_SFINAE_BUG
+DEAL_II_CHECK_ARRAY_CONDITIONAL_DECAY_BUG
DEAL_II_CHECK_BOOST_SHARED_PTR_ASSIGNMENT
DEAL_II_HAVE_PRETTY_FUNCTION
DEAL_II_HAVE_STD_ITERATOR
* The constants defined here are a subset of the @p{M_XXX} constants sometimes
* declared in the system include file @p{math.h}, but without the
* prefix @p{M_}.
+ *
+ * In addition to that, we declare @p{invalid_unsigned_int} to be the
+ * largest unsigned integer representable; this value is widely used in
+ * the library as a marker for an invalid index, an invalid size of an
+ * array, and similar purposes.
*/
namespace deal_II_numbers {
+ /**
+ * Representation of the
+ * largest number that
+ * can be put into an
+ * unsigned integer. This
+ * value is widely used
+ * throughout the library
+ * as a marker for an
+ * invalid unsigned
+ * integer value, such as
+ * an invalid array
+ * index, an invalid
+ * array size, and the
+ * like.
+ */
+ static const unsigned int
+ invalid_unsigned_int = static_cast<unsigned int> (-1);
+
/**
* e
*/