]> https://gitweb.dealii.org/ - dealii.git/commitdiff
remove DEAL_II_WITH_CXX* from the source code
authorMatthias Maier <tamiko@43-1.org>
Fri, 22 May 2020 03:48:08 +0000 (22:48 -0500)
committerMatthias Maier <tamiko@43-1.org>
Sat, 23 May 2020 14:56:48 +0000 (09:56 -0500)
13 files changed:
Jenkinsfile
doc/doxygen/options.dox.in
include/deal.II/base/config.h.in
include/deal.II/base/partitioner.templates.h
include/deal.II/base/std_cxx14/algorithm.h
include/deal.II/base/std_cxx14/memory.h
include/deal.II/base/std_cxx14/utility.h
include/deal.II/base/utilities.h
include/deal.II/lac/sparse_matrix.templates.h
include/deal.II/lac/vector_operations_internal.h
include/deal.II/physics/elasticity/standard_tensors.h
source/physics/elasticity/standard_tensors.cc
tests/symengine/CMakeLists.txt

index 3eb60365636864c3f0ffc693c7c4b256368c4df4..b0f6f99a2a837fd557d186e9969fb49770902161 100644 (file)
@@ -139,7 +139,6 @@ pipeline
                    -D DEAL_II_CXX_FLAGS='-Werror' \
                    -D CMAKE_BUILD_TYPE=Debug \
                    -D DEAL_II_WITH_MPI=OFF \
-                   -D DEAL_II_WITH_CXX14=OFF \
                    -D DEAL_II_UNITY_BUILD=ON \
                    $WORKSPACE/
                  time ninja -j $NP
index dbed47b97e414525156c6995f9366de4ed07dc7a..1d65cb36d668f16fda5c7539b97ad9b46de09f32 100644 (file)
@@ -194,8 +194,6 @@ PREDEFINED             = DOXYGEN=1 \
                          DEAL_II_WITH_COMPLEX_VALUES=1 \
                          DEAL_II_WITH_CUDA=1 \
                          DEAL_II_COMPILER_CUDA_AWARE=1 \
-                         DEAL_II_WITH_CXX14=1 \
-                         DEAL_II_WITH_CXX17=1 \
                          DEAL_II_WITH_GINKGO=1 \
                          DEAL_II_WITH_GMSH=1 \
                          DEAL_II_WITH_GSL=1 \
index 61181c61faefddc2c4b92c46f6adeef5f2c3a137..970b0053579b60a17138e06d1ddb1cf6a632bcef 100644 (file)
 #cmakedefine DEAL_II_HAVE_GLIBC_STACKTRACE
 #cmakedefine DEAL_II_HAVE_LIBSTDCXX_DEMANGLER
 #cmakedefine __PRETTY_FUNCTION__ @__PRETTY_FUNCTION__@
-#cmakedefine DEAL_II_DEPRECATED @DEAL_II_DEPRECATED@
 #cmakedefine DEAL_II_ALWAYS_INLINE @DEAL_II_ALWAYS_INLINE@
 #cmakedefine DEAL_II_RESTRICT @DEAL_II_RESTRICT@
 #cmakedefine DEAL_II_COMPILER_HAS_DIAGNOSTIC_PRAGMA
-#cmakedefine DEAL_II_CONSTEXPR @DEAL_II_CONSTEXPR@
 
 /*
  * A variable to tell if the compiler used in the current compilation process
 
 #cmakedefine DEAL_II_HAVE_CXX17
 
-#cmakedefine DEAL_II_HAVE_CXX14_CONSTEXPR
 #cmakedefine DEAL_II_HAVE_FP_EXCEPTIONS
 #cmakedefine DEAL_II_HAVE_COMPLEX_OPERATOR_OVERLOADS
+#cmakedefine DEAL_II_CXX14_CONSTEXPR_BUG_OK
+
+#define DEAL_II_DEPRECATED [[deprecated]]
 #cmakedefine DEAL_II_FALLTHROUGH @DEAL_II_FALLTHROUGH@
+#cmakedefine DEAL_II_CONSTEXPR @DEAL_II_CONSTEXPR@
 
 
 /***********************************************************************
index 68e26211597d2a3cbd883aacf3ec5bf0d8708990..dd10f66c3f46bc9e016c82fdce4a37a054a763df 100644 (file)
@@ -535,7 +535,7 @@ namespace Utilities
           else
 #      endif
             {
-#      ifdef DEAL_II_WITH_CXX17
+#      ifdef DEAL_II_HAVE_CXX17
               if constexpr (std::is_trivial<Number>::value)
 #      else
             if (std::is_trivial<Number>::value)
@@ -738,7 +738,7 @@ namespace Utilities
           else
 #    endif
             {
-#    ifdef DEAL_II_WITH_CXX17
+#    ifdef DEAL_II_HAVE_CXX17
               if constexpr (std::is_trivial<Number>::value)
 #    else
             if (std::is_trivial<Number>::value)
index 483c5a81261ecb49ec9b9b03ef22ba6195fd376c..9925c5db76d328fd92793f1d84265010558037cc 100644 (file)
 
 #include <deal.II/base/config.h>
 
-#ifdef DEAL_II_WITH_CXX14
-#  include <algorithm>
-#endif
+#include <algorithm>
 
 DEAL_II_NAMESPACE_OPEN
 
 namespace std_cxx14
 {
-#ifdef DEAL_II_WITH_CXX14
   using std::max;
   using std::min;
-
-#else
-
-  template <class T>
-  constexpr const T &
-  max(const T &a, const T &b)
-  {
-    return (a < b) ? b : a;
-  }
-
-  template <class T, class Compare>
-  constexpr const T &
-  max(const T &a, const T &b, Compare comp)
-  {
-    return (comp(a, b)) ? b : a;
-  }
-
-  template <class T>
-  constexpr const T &
-  min(const T &a, const T &b)
-  {
-    return (b < a) ? b : a;
-  }
-
-  template <class T, class Compare>
-  constexpr const T &
-  min(const T &a, const T &b, Compare comp)
-  {
-    return (comp(b, a)) ? b : a;
-  }
-
-#endif
 } // namespace std_cxx14
 
 DEAL_II_NAMESPACE_CLOSE
index 3f722c24464cdfe8fdbcb575d762a6b63bea84d8..b24fc1cd8616f3d3fefe8c589ff313bfcc7b24a9 100644 (file)
 
 #include <memory>
 
-#ifndef DEAL_II_WITH_CXX14
-// needed for array type check
-#  include <type_traits>
-#endif
-
 DEAL_II_NAMESPACE_OPEN
 
 namespace std_cxx14
 {
-#ifdef DEAL_II_WITH_CXX14
   using std::make_unique;
-
-#else
-
-  namespace internal
-  {
-    template <typename T>
-    struct is_bounded_array
-    {
-      static constexpr bool value = false;
-    };
-
-    template <typename T, std::size_t N>
-    struct is_bounded_array<T[N]>
-    {
-      static constexpr bool value = true;
-    };
-  } // namespace internal
-
-  template <typename T, typename... Args>
-  inline
-    typename std::enable_if<!std::is_array<T>::value, std::unique_ptr<T>>::type
-    make_unique(Args &&... constructor_arguments)
-  {
-    return std::unique_ptr<T>(
-      new T(std::forward<Args>(constructor_arguments)...));
-  }
-
-  template <typename T>
-  inline
-    typename std::enable_if<std::is_array<T>::value, std::unique_ptr<T>>::type
-    make_unique(std::size_t n)
-  {
-    static_assert(!internal::is_bounded_array<T>::value,
-                  "This function is not implemented for bounded array types.");
-    return std::unique_ptr<T>(new typename std::remove_extent<T>::type[n]);
-  }
-
-#endif
 } // namespace std_cxx14
 
 DEAL_II_NAMESPACE_CLOSE
index 3656c98de771f2a111aae684fec9af0989841788..1d6008b4b585b797fa6ff4e677c3750d98bf10a5 100644 (file)
 
 #include <utility>
 
-#ifndef DEAL_II_WITH_CXX14
-// needed for array type check
-#  include <type_traits>
-#endif
-
 DEAL_II_NAMESPACE_OPEN
 
 namespace std_cxx14
 {
-#ifdef DEAL_II_WITH_CXX14
   using std::index_sequence;
   using std::index_sequence_for;
   using std::make_index_sequence;
-
-#else
-
-  template <size_t... Ints>
-  struct index_sequence
-  {
-    using type       = index_sequence;
-    using value_type = size_t;
-    static constexpr std::size_t
-    size() noexcept
-    {
-      return sizeof...(Ints);
-    }
-  };
-
-  // --------------------------------------------------------------
-  namespace internal
-  {
-    template <class Sequence1, class Sequence2>
-    struct merge_and_renumber;
-
-    template <size_t... I1, size_t... I2>
-    struct merge_and_renumber<index_sequence<I1...>, index_sequence<I2...>>
-      : index_sequence<I1..., (sizeof...(I1) + I2)...>
-    {};
-  } // namespace internal
-  // --------------------------------------------------------------
-
-  template <std::size_t N>
-  struct make_index_sequence : internal::merge_and_renumber<
-                                 typename make_index_sequence<N / 2>::type,
-                                 typename make_index_sequence<N - N / 2>::type>
-  {};
-
-  template <>
-  struct make_index_sequence<0> : index_sequence<>
-  {};
-  template <>
-  struct make_index_sequence<1> : index_sequence<0>
-  {};
-
-  template <class... T>
-  using index_sequence_for = make_index_sequence<sizeof...(T)>;
-#endif
 } // namespace std_cxx14
 
 DEAL_II_NAMESPACE_CLOSE
index f83995c14fed45f5bcdb46a855ecd80f2f38fc21..63be355f775c88854b74e364b62c08fe2e9b09cc 100644 (file)
@@ -475,7 +475,7 @@ namespace Utilities
   constexpr T
   pow(const T base, const int iexp)
   {
-#if defined(DEBUG) && defined(DEAL_II_HAVE_CXX14_CONSTEXPR)
+#if defined(DEBUG) && defined(DEAL_II_CXX14_CONSTEXPR_BUG_OK)
     // Up to __builtin_expect this is the same code as in the 'Assert' macro.
     // The call to __builtin_expect turns out to be problematic.
     if (!(iexp >= 0))
@@ -1225,7 +1225,7 @@ namespace Utilities
 #if __GNUG__ && __GNUC__ < 5
     if (__has_trivial_copy(T) && sizeof(T) < 256)
 #else
-#  ifdef DEAL_II_WITH_CXX17
+#  ifdef DEAL_II_HAVE_CXX17
     if constexpr (std::is_trivially_copyable<T>() && sizeof(T) < 256)
 #  else
     if (std::is_trivially_copyable<T>() && sizeof(T) < 256)
@@ -1307,7 +1307,7 @@ namespace Utilities
 #if __GNUG__ && __GNUC__ < 5
     if (__has_trivial_copy(T) && sizeof(T) < 256)
 #else
-#  ifdef DEAL_II_WITH_CXX17
+#  ifdef DEAL_II_HAVE_CXX17
     if constexpr (std::is_trivially_copyable<T>() && sizeof(T) < 256)
 #  else
     if (std::is_trivially_copyable<T>() && sizeof(T) < 256)
index 3933a20fa6e932e3ce0ffd061fbfb510b0f38037..77d8798ecfab98ce4b475c17c45a7a051e3b74ea 100644 (file)
@@ -219,7 +219,7 @@ SparseMatrix<number>::operator=(const double d)
       grain_size);
   else if (matrix_size > 0)
     {
-#ifdef DEAL_II_WITH_CXX17
+#ifdef DEAL_II_HAVE_CXX17
       if constexpr (std::is_trivial<number>::value)
 #else
       if (std::is_trivial<number>::value)
index c0d7868547507d85aa6c4ea35744bb8ea7e6c88b..50c3748f47c62245f07565faeb959f7411f62095 100644 (file)
@@ -213,7 +213,7 @@ namespace internal
 
         if (value == Number())
           {
-#ifdef DEAL_II_WITH_CXX17
+#ifdef DEAL_II_HAVE_CXX17
             if constexpr (std::is_trivial<Number>::value)
 #else
             if (std::is_trivial<Number>::value)
@@ -250,7 +250,7 @@ namespace internal
         if (__has_trivial_copy(Number) &&
             std::is_same<Number, OtherNumber>::value)
 #else
-#  ifdef DEAL_II_WITH_CXX17
+#  ifdef DEAL_II_HAVE_CXX17
         if constexpr (std::is_trivially_copyable<Number>() &&
                       std::is_same<Number, OtherNumber>::value)
 #  else
index 7796f84de120d9cf9268d66b4ea9814635f63ec4..dd8d355c67297d45bb2de60627ebcdf8fceec9c4 100644 (file)
@@ -70,7 +70,7 @@ namespace Physics
        * matrix, then this simply corresponds to the identity matrix.
        */
       static DEAL_II_CONSTEXPR const SymmetricTensor<2, dim> I
-#ifdef DEAL_II_HAVE_CXX14_CONSTEXPR
+#ifdef DEAL_II_CXX14_CONSTEXPR_BUG_OK
         = unit_symmetric_tensor<dim>()
 #endif
         ;
@@ -103,7 +103,7 @@ namespace Physics
        * operator.
        */
       static DEAL_II_CONSTEXPR const SymmetricTensor<4, dim> S
-#ifdef DEAL_II_HAVE_CXX14_CONSTEXPR
+#ifdef DEAL_II_CXX14_CONSTEXPR_BUG_OK
         = identity_tensor<dim>()
 #endif
         ;
@@ -119,7 +119,7 @@ namespace Physics
        * @f]
        */
       static DEAL_II_CONSTEXPR const SymmetricTensor<4, dim> IxI
-#ifdef DEAL_II_HAVE_CXX14_CONSTEXPR
+#ifdef DEAL_II_CXX14_CONSTEXPR_BUG_OK
         = outer_product(unit_symmetric_tensor<dim>(),
                         unit_symmetric_tensor<dim>())
 #endif
@@ -169,7 +169,7 @@ namespace Physics
        * @dealiiHolzapfelA{232,6.105}
        */
       static DEAL_II_CONSTEXPR const SymmetricTensor<4, dim> dev_P
-#ifdef DEAL_II_HAVE_CXX14_CONSTEXPR
+#ifdef DEAL_II_CXX14_CONSTEXPR_BUG_OK
         = deviator_tensor<dim>()
 #endif
         ;
index a71d15fa8feeba7c2250240c47c267336ca86130..886a7ff2204134a066d0dc7164228d7c26a5b04d 100644 (file)
@@ -24,7 +24,7 @@ DEAL_II_NAMESPACE_OPEN
 template <int dim>
 DEAL_II_CONSTEXPR const SymmetricTensor<2, dim>
                         Physics::Elasticity::StandardTensors<dim>::I
-#  ifndef DEAL_II_HAVE_CXX14_CONSTEXPR
+#  ifndef DEAL_II_CXX14_CONSTEXPR_BUG_OK
   = unit_symmetric_tensor<dim>()
 #  endif
   ;
@@ -34,7 +34,7 @@ DEAL_II_CONSTEXPR const SymmetricTensor<2, dim>
 template <int dim>
 DEAL_II_CONSTEXPR const SymmetricTensor<4, dim>
                         Physics::Elasticity::StandardTensors<dim>::S
-#  ifndef DEAL_II_HAVE_CXX14_CONSTEXPR
+#  ifndef DEAL_II_CXX14_CONSTEXPR_BUG_OK
   = identity_tensor<dim>()
 #  endif
   ;
@@ -44,7 +44,7 @@ DEAL_II_CONSTEXPR const SymmetricTensor<4, dim>
 template <int dim>
 DEAL_II_CONSTEXPR const SymmetricTensor<4, dim>
                         Physics::Elasticity::StandardTensors<dim>::IxI
-#  ifndef DEAL_II_HAVE_CXX14_CONSTEXPR
+#  ifndef DEAL_II_CXX14_CONSTEXPR_BUG_OK
   = outer_product(unit_symmetric_tensor<dim>(), unit_symmetric_tensor<dim>())
 #  endif
   ;
@@ -54,7 +54,7 @@ DEAL_II_CONSTEXPR const SymmetricTensor<4, dim>
 template <int dim>
 DEAL_II_CONSTEXPR const SymmetricTensor<4, dim>
                         Physics::Elasticity::StandardTensors<dim>::dev_P
-#  ifndef DEAL_II_HAVE_CXX14_CONSTEXPR
+#  ifndef DEAL_II_CXX14_CONSTEXPR_BUG_OK
   = deviator_tensor<dim>()
 #  endif
   ;
index 46145a04668feadcd3dfc7bb68f8680bd529b3ec..09f74f39eb29ec837c90a1841a581b78f557ef3d 100644 (file)
@@ -1,6 +1,6 @@
 CMAKE_MINIMUM_REQUIRED(VERSION 2.8.9)
 INCLUDE(../setup_testsubproject.cmake)
 PROJECT(testsuite CXX)
-IF(DEAL_II_WITH_SYMENGINE AND DEAL_II_WITH_CXX11)
+IF(DEAL_II_WITH_SYMENGINE)
   DEAL_II_PICKUP_TESTS()
 ENDIF()

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.