From 1f80aed157d8dccd58e189f0619ff60a14dc8009 Mon Sep 17 00:00:00 2001 From: Daniel Arndt Date: Mon, 14 Aug 2017 07:21:36 +0200 Subject: [PATCH] Deprecate constraint_and_return_value in favor of std::enable_if --- include/deal.II/base/template_constraints.h | 4 +++- source/grid/grid_refinement.cc | 8 ++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/include/deal.II/base/template_constraints.h b/include/deal.II/base/template_constraints.h index 1ea8046798..bbaa6de0f8 100644 --- a/include/deal.II/base/template_constraints.h +++ b/include/deal.II/base/template_constraints.h @@ -81,12 +81,14 @@ template 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 struct constraint_and_return_value { typedef T type; -}; +} DEAL_II_DEPRECATED; diff --git a/source/grid/grid_refinement.cc b/source/grid/grid_refinement.cc index 1fe51cb306..fde982e36f 100644 --- a/source/grid/grid_refinement.cc +++ b/source/grid/grid_refinement.cc @@ -86,7 +86,7 @@ namespace internal DEAL_II_ENABLE_EXTRA_DIAGNOSTICS template - typename constraint_and_return_value::value, + typename std::enable_if::value, typename VectorType::value_type>::type min_element (const VectorType &criteria) { @@ -95,7 +95,7 @@ namespace internal template - typename constraint_and_return_value::value, + typename std::enable_if::value, typename VectorType::value_type>::type max_element (const VectorType &criteria) { @@ -104,7 +104,7 @@ namespace internal template - typename constraint_and_return_value::value, + typename std::enable_if::value, typename VectorType::value_type>::type min_element (const VectorType &criteria) { @@ -117,7 +117,7 @@ namespace internal template - typename constraint_and_return_value::value, + typename std::enable_if::value, typename VectorType::value_type>::type max_element (const VectorType &criteria) { -- 2.39.5