]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Deprecate constraint_and_return_value in favor of std::enable_if 4834/head
authorDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Mon, 14 Aug 2017 05:21:36 +0000 (07:21 +0200)
committerDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Mon, 14 Aug 2017 05:21:36 +0000 (07:21 +0200)
include/deal.II/base/template_constraints.h
source/grid/grid_refinement.cc

index 1ea804679844aca4661ec6cbc852df40b8567693..bbaa6de0f8bb80ae8e868b4559cdc293a9e21314 100644 (file)
@@ -81,12 +81,14 @@ template <bool, typename> struct constraint_and_return_value;
  * constraint_and_return_value template is true, then the return type is just
  * the second type in the template.
  *
+ * @deprecated Use std::enable_if instead.
+ *
  * @author Wolfgang Bangerth, 2003
  */
 template <typename T> struct constraint_and_return_value<true,T>
 {
   typedef T type;
-};
+} DEAL_II_DEPRECATED;
 
 
 
index 1fe51cb306ff440cdc2f9f43a568f3daeaa79950..fde982e36f70657dd35426eb7e08c0c68b6b9d1e 100644 (file)
@@ -86,7 +86,7 @@ namespace internal
       DEAL_II_ENABLE_EXTRA_DIAGNOSTICS
 
       template <typename VectorType>
-      typename constraint_and_return_value<!IsBlockVector<VectorType>::value,
+      typename std::enable_if<!IsBlockVector<VectorType>::value,
                typename VectorType::value_type>::type
                min_element (const VectorType &criteria)
       {
@@ -95,7 +95,7 @@ namespace internal
 
 
       template <typename VectorType>
-      typename constraint_and_return_value<!IsBlockVector<VectorType>::value,
+      typename std::enable_if<!IsBlockVector<VectorType>::value,
                typename VectorType::value_type>::type
                max_element (const VectorType &criteria)
       {
@@ -104,7 +104,7 @@ namespace internal
 
 
       template <typename VectorType>
-      typename constraint_and_return_value<IsBlockVector<VectorType>::value,
+      typename std::enable_if<IsBlockVector<VectorType>::value,
                typename VectorType::value_type>::type
                min_element (const VectorType &criteria)
       {
@@ -117,7 +117,7 @@ namespace internal
 
 
       template <typename VectorType>
-      typename constraint_and_return_value<IsBlockVector<VectorType>::value,
+      typename std::enable_if<IsBlockVector<VectorType>::value,
                typename VectorType::value_type>::type
                max_element (const VectorType &criteria)
       {

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.