From: Marc Fehling Date: Fri, 6 Sep 2024 09:13:11 +0000 (+0200) Subject: Fix modernize-type-traits. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dbf290b4efb3e68a7a7adcd9db12737c89305ac7;p=dealii.git Fix modernize-type-traits. --- diff --git a/include/deal.II/differentiation/ad/ad_number_traits.h b/include/deal.II/differentiation/ad/ad_number_traits.h index e549a4e91a..abb225f986 100644 --- a/include/deal.II/differentiation/ad/ad_number_traits.h +++ b/include/deal.II/differentiation/ad/ad_number_traits.h @@ -741,8 +741,8 @@ namespace Differentiation std::enable_if_t< std::is_floating_point_v || (boost::is_complex::value && - std::is_floating_point< - typename internal::RemoveComplexWrapper::type>::value)>> + std::is_floating_point_v< + typename internal::RemoveComplexWrapper::type>)>> { /** * The type of taping used @@ -862,8 +862,8 @@ namespace Differentiation /** * The actual auto-differentiable number type */ - using ad_type = typename std:: - conditional::type; + using ad_type = + typename std::conditional_t; /** * The actual auto-differentiable number directional derivative type @@ -940,8 +940,8 @@ namespace Differentiation std::enable_if_t< std::is_floating_point_v || (boost::is_complex::value && - std::is_floating_point::type>::value)>>::is_taped = + std::is_floating_point_v::type>)>>::is_taped = internal::ADNumberInfoFromEnum< typename internal::RemoveComplexWrapper::type, ADNumberTypeCode>::is_taped; @@ -954,8 +954,8 @@ namespace Differentiation std::enable_if_t< std::is_floating_point_v || (boost::is_complex::value && - std::is_floating_point::type>::value)>>::is_tapeless = + std::is_floating_point_v::type>)>>::is_tapeless = !(NumberTraits::is_taped); @@ -966,8 +966,8 @@ namespace Differentiation std::enable_if_t< std::is_floating_point_v || (boost::is_complex::value && - std::is_floating_point::type>::value)>>::is_real_valued = + std::is_floating_point_v::type>)>>::is_real_valued = (!boost::is_complex::value); @@ -978,8 +978,8 @@ namespace Differentiation std::enable_if_t< std::is_floating_point_v || (boost::is_complex::value && - std::is_floating_point::type>::value)>>::is_complex_valued = + std::is_floating_point_v::type>)>>::is_complex_valued = !(NumberTraits::is_real_valued); @@ -990,8 +990,8 @@ namespace Differentiation std::enable_if_t< std::is_floating_point_v || (boost::is_complex::value && - std::is_floating_point::type>::value)>>::n_supported_derivative_levels = + std::is_floating_point_v::type>)>>::n_supported_derivative_levels = internal::ADNumberInfoFromEnum< typename internal::RemoveComplexWrapper::type, ADNumberTypeCode>::n_supported_derivative_levels; @@ -1005,8 +1005,8 @@ namespace Differentiation std::enable_if_t< std::is_floating_point_v || (boost::is_complex::value && - std::is_floating_point::type>::value)>>::is_taped; + std::is_floating_point_v::type>)>>::is_taped; template @@ -1016,8 +1016,8 @@ namespace Differentiation std::enable_if_t< std::is_floating_point_v || (boost::is_complex::value && - std::is_floating_point::type>::value)>>::is_tapeless; + std::is_floating_point_v::type>)>>::is_tapeless; template @@ -1027,8 +1027,8 @@ namespace Differentiation std::enable_if_t< std::is_floating_point_v || (boost::is_complex::value && - std::is_floating_point::type>::value)>>::is_real_valued; + std::is_floating_point_v::type>)>>::is_real_valued; template @@ -1038,8 +1038,8 @@ namespace Differentiation std::enable_if_t< std::is_floating_point_v || (boost::is_complex::value && - std::is_floating_point::type>::value)>>::is_complex_valued; + std::is_floating_point_v::type>)>>::is_complex_valued; template @@ -1049,8 +1049,8 @@ namespace Differentiation std::enable_if_t< std::is_floating_point_v || (boost::is_complex::value && - std::is_floating_point::type>::value)>>::n_supported_derivative_levels; + std::is_floating_point_v::type>)>>::n_supported_derivative_levels; # endif @@ -1072,8 +1072,8 @@ namespace Differentiation std::enable_if_t< std::is_floating_point_v || (boost::is_complex::value && - std::is_floating_point< - typename internal::RemoveComplexWrapper::type>::value)>> + std::is_floating_point_v< + typename internal::RemoveComplexWrapper::type>)>> { /** * The internal number type code. @@ -1241,8 +1241,8 @@ namespace Differentiation std::enable_if_t< std::is_floating_point_v || (boost::is_complex::value && - std::is_floating_point::type>::value)>>::is_taped = false; + std::is_floating_point_v::type>)>>::is_taped = false; template @@ -1252,8 +1252,8 @@ namespace Differentiation std::enable_if_t< std::is_floating_point_v || (boost::is_complex::value && - std::is_floating_point::type>::value)>>::is_tapeless = false; + std::is_floating_point_v::type>)>>::is_tapeless = false; template @@ -1263,8 +1263,8 @@ namespace Differentiation std::enable_if_t< std::is_floating_point_v || (boost::is_complex::value && - std::is_floating_point::type>::value)>>::is_real_valued = + std::is_floating_point_v::type>)>>::is_real_valued = (!boost::is_complex::value); @@ -1275,8 +1275,8 @@ namespace Differentiation std::enable_if_t< std::is_floating_point_v || (boost::is_complex::value && - std::is_floating_point::type>::value)>>::is_complex_valued = + std::is_floating_point_v::type>)>>::is_complex_valued = !(NumberTraits::is_real_valued); @@ -1287,8 +1287,8 @@ namespace Differentiation std::enable_if_t< std::is_floating_point_v || (boost::is_complex::value && - std::is_floating_point::type>::value)>>::n_supported_derivative_levels = 0; + std::is_floating_point_v::type>)>>::n_supported_derivative_levels = 0; # else @@ -1299,8 +1299,8 @@ namespace Differentiation std::enable_if_t< std::is_floating_point_v || (boost::is_complex::value && - std::is_floating_point::type>::value)>>::is_taped; + std::is_floating_point_v::type>)>>::is_taped; template @@ -1310,8 +1310,8 @@ namespace Differentiation std::enable_if_t< std::is_floating_point_v || (boost::is_complex::value && - std::is_floating_point::type>::value)>>::is_tapeless; + std::is_floating_point_v::type>)>>::is_tapeless; template @@ -1321,8 +1321,8 @@ namespace Differentiation std::enable_if_t< std::is_floating_point_v || (boost::is_complex::value && - std::is_floating_point::type>::value)>>::is_real_valued; + std::is_floating_point_v::type>)>>::is_real_valued; template @@ -1332,8 +1332,8 @@ namespace Differentiation std::enable_if_t< std::is_floating_point_v || (boost::is_complex::value && - std::is_floating_point::type>::value)>>::is_complex_valued; + std::is_floating_point_v::type>)>>::is_complex_valued; template @@ -1343,8 +1343,8 @@ namespace Differentiation std::enable_if_t< std::is_floating_point_v || (boost::is_complex::value && - std::is_floating_point::type>::value)>>::n_supported_derivative_levels; + std::is_floating_point_v::type>)>>::n_supported_derivative_levels; # endif diff --git a/include/deal.II/differentiation/ad/sacado_number_types.h b/include/deal.II/differentiation/ad/sacado_number_types.h index 4f8f986565..d2dd4687c8 100644 --- a/include/deal.II/differentiation/ad/sacado_number_types.h +++ b/include/deal.II/differentiation/ad/sacado_number_types.h @@ -185,7 +185,7 @@ namespace Differentiation template struct SacadoNumberInfo< Number, - std::enable_if_t>::value>> + std::enable_if_t>>> { static const unsigned int n_supported_derivative_levels = 0; };