From: Wolfgang Bangerth Date: Wed, 19 Jul 2023 17:13:31 +0000 (-0600) Subject: Prefer std::decay_t over std::decay::type. X-Git-Tag: relicensing~665^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F15765%2Fhead;p=dealii.git Prefer std::decay_t over std::decay::type. --- diff --git a/include/deal.II/base/array_view.h b/include/deal.II/base/array_view.h index 61453aeb25..6f4d8922c1 100644 --- a/include/deal.II/base/array_view.h +++ b/include/deal.II/base/array_view.h @@ -651,7 +651,7 @@ namespace internal is_contiguous(const Iterator &first, const Iterator &last) { const auto n = std::distance(first, last); - for (typename std::decay::type i = 0; i < n; ++i) + for (std::decay_t i = 0; i < n; ++i) if (std::addressof(*(std::next(first, i))) != std::next(std::addressof(*first), i)) return false; diff --git a/include/deal.II/base/mpi.templates.h b/include/deal.II/base/mpi.templates.h index e38c42252e..3f6b8815d5 100644 --- a/include/deal.II/base/mpi.templates.h +++ b/include/deal.II/base/mpi.templates.h @@ -157,8 +157,7 @@ namespace Utilities void sum(const T &values, const MPI_Comm mpi_communicator, U &sums) { - static_assert(std::is_same_v::type, - typename std::decay::type>, + static_assert(std::is_same_v, std::decay_t>, "Input and output arguments must have the same type!"); const auto array_view_values = make_array_view(values); using const_type = @@ -272,8 +271,7 @@ namespace Utilities void max(const T &values, const MPI_Comm mpi_communicator, U &maxima) { - static_assert(std::is_same_v::type, - typename std::decay::type>, + static_assert(std::is_same_v, std::decay_t>, "Input and output arguments must have the same type!"); const auto array_view_values = make_array_view(values); using const_type = @@ -314,8 +312,7 @@ namespace Utilities void min(const T &values, const MPI_Comm mpi_communicator, U &minima) { - static_assert(std::is_same_v::type, - typename std::decay::type>, + static_assert(std::is_same_v, std::decay_t>, "Input and output arguments must have the same type!"); const auto array_view_values = make_array_view(values); using const_type = @@ -359,8 +356,7 @@ namespace Utilities void logical_or(const T &values, const MPI_Comm mpi_communicator, U &results) { - static_assert(std::is_same_v::type, - typename std::decay::type>, + static_assert(std::is_same_v, std::decay_t>, "Input and output arguments must have the same type!"); static_assert(std::is_integral::value, diff --git a/include/deal.II/base/numbers.h b/include/deal.II/base/numbers.h index 9378caa00c..1c9dd9606d 100644 --- a/include/deal.II/base/numbers.h +++ b/include/deal.II/base/numbers.h @@ -715,8 +715,7 @@ namespace internal template static constexpr DEAL_II_HOST_DEVICE_ALWAYS_INLINE T value(const F &f, - std::enable_if_t::type, - typename std::decay::type> && + std::enable_if_t, std::decay_t> && std::is_constructible::value> * = nullptr) { return T(f); @@ -726,8 +725,7 @@ namespace internal template static constexpr DEAL_II_HOST_DEVICE_ALWAYS_INLINE T value(const F &f, - std::enable_if_t::type, - typename std::decay::type> && + std::enable_if_t, std::decay_t> && !std::is_constructible::value && is_explicitly_convertible::value> * = nullptr) @@ -743,8 +741,7 @@ namespace internal static T value( const F &f, - std::enable_if_t::type, - typename std::decay::type> && + std::enable_if_t, std::decay_t> && !std::is_constructible::value && !is_explicitly_convertible::value && Differentiation::AD::is_ad_number::value> * = nullptr) diff --git a/include/deal.II/base/patterns.h b/include/deal.II/base/patterns.h index 9aaf1ed478..e0d71fad93 100644 --- a/include/deal.II/base/patterns.h +++ b/include/deal.II/base/patterns.h @@ -1629,14 +1629,14 @@ namespace Patterns struct is_list_compatible { static constexpr bool const value = - internal::is_list_compatible::type>::value; + internal::is_list_compatible>::value; }; template struct is_map_compatible { static constexpr bool const value = - internal::is_map_compatible::type>::value; + internal::is_map_compatible>::value; }; namespace internal diff --git a/include/deal.II/base/template_constraints.h b/include/deal.II/base/template_constraints.h index 9255d41f94..af593ce065 100644 --- a/include/deal.II/base/template_constraints.h +++ b/include/deal.II/base/template_constraints.h @@ -459,8 +459,7 @@ template struct ProductType { using type = - typename internal::ProductTypeImpl::type, - typename std::decay::type>::type; + typename internal::ProductTypeImpl, std::decay_t>::type; }; namespace internal diff --git a/include/deal.II/differentiation/ad/ad_number_traits.h b/include/deal.II/differentiation/ad/ad_number_traits.h index ea0ff92cc0..270eaeff1c 100644 --- a/include/deal.II/differentiation/ad/ad_number_traits.h +++ b/include/deal.II/differentiation/ad/ad_number_traits.h @@ -442,8 +442,7 @@ namespace Differentiation */ template struct is_ad_number - : internal::HasRequiredADInfo< - ADNumberTraits::type>> + : internal::HasRequiredADInfo>> {}; @@ -454,8 +453,7 @@ namespace Differentiation template struct is_taped_ad_number< NumberType, - std::enable_if_t< - ADNumberTraits::type>::is_taped>> + std::enable_if_t>::is_taped>> : std::true_type {}; @@ -467,8 +465,7 @@ namespace Differentiation template struct is_tapeless_ad_number< NumberType, - std::enable_if_t< - ADNumberTraits::type>::is_tapeless>> + std::enable_if_t>::is_tapeless>> : std::true_type {}; @@ -482,7 +479,7 @@ namespace Differentiation struct is_real_valued_ad_number< NumberType, std::enable_if_t< - ADNumberTraits::type>::is_real_valued>> + ADNumberTraits>::is_real_valued>> : std::true_type {}; @@ -495,8 +492,8 @@ namespace Differentiation template struct is_complex_valued_ad_number< NumberType, - std::enable_if_t::type>::is_complex_valued>> + std::enable_if_t< + ADNumberTraits>::is_complex_valued>> : std::true_type {}; diff --git a/include/deal.II/differentiation/ad/adolc_number_types.h b/include/deal.II/differentiation/ad/adolc_number_types.h index 81b4968f9a..3c7dd50e5c 100644 --- a/include/deal.II/differentiation/ad/adolc_number_types.h +++ b/include/deal.II/differentiation/ad/adolc_number_types.h @@ -460,9 +460,8 @@ namespace Differentiation template struct is_adolc_taped_number< NumberType, - std::enable_if_t::type>:: - type_code == NumberTypes::adolc_taped>> - : std::true_type + std::enable_if_t>::type_code == + NumberTypes::adolc_taped>> : std::true_type {}; @@ -473,9 +472,8 @@ namespace Differentiation template struct is_adolc_tapeless_number< NumberType, - std::enable_if_t::type>:: - type_code == NumberTypes::adolc_tapeless>> - : std::true_type + std::enable_if_t>::type_code == + NumberTypes::adolc_tapeless>> : std::true_type {}; diff --git a/include/deal.II/differentiation/ad/sacado_number_types.h b/include/deal.II/differentiation/ad/sacado_number_types.h index bc12093491..5e7553e568 100644 --- a/include/deal.II/differentiation/ad/sacado_number_types.h +++ b/include/deal.II/differentiation/ad/sacado_number_types.h @@ -184,9 +184,9 @@ namespace Differentiation * templates used in the above specializations. */ template - struct SacadoNumberInfo::type>::value>> + struct SacadoNumberInfo< + Number, + std::enable_if_t>::value>> { static const unsigned int n_supported_derivative_levels = 0; }; @@ -849,11 +849,10 @@ namespace Differentiation template struct is_sacado_dfad_number< NumberType, - std::enable_if_t< - ADNumberTraits::type>::type_code == - NumberTypes::sacado_dfad || - ADNumberTraits::type>::type_code == - NumberTypes::sacado_dfad_dfad>> : std::true_type + std::enable_if_t>::type_code == + NumberTypes::sacado_dfad || + ADNumberTraits>::type_code == + NumberTypes::sacado_dfad_dfad>> : std::true_type {}; @@ -870,11 +869,10 @@ namespace Differentiation template struct is_sacado_rad_number< NumberType, - std::enable_if_t< - ADNumberTraits::type>::type_code == - NumberTypes::sacado_rad || - ADNumberTraits::type>::type_code == - NumberTypes::sacado_rad_dfad>> : std::true_type + std::enable_if_t>::type_code == + NumberTypes::sacado_rad || + ADNumberTraits>::type_code == + NumberTypes::sacado_rad_dfad>> : std::true_type {}; diff --git a/include/deal.II/dofs/dof_accessor.templates.h b/include/deal.II/dofs/dof_accessor.templates.h index 4ee7bd40e5..8239e7f893 100644 --- a/include/deal.II/dofs/dof_accessor.templates.h +++ b/include/deal.II/dofs/dof_accessor.templates.h @@ -2133,9 +2133,8 @@ namespace internal if (accessor.dof_handler->hp_capability_enabled == false) return DoFHandler::default_fe_index; - Assert( - accessor.dof_handler != nullptr, - (typename std::decay::type::ExcInvalidObject())); + Assert(accessor.dof_handler != nullptr, + (typename std::decay_t::ExcInvalidObject())); Assert(static_cast(accessor.level()) < accessor.dof_handler->hp_cell_future_fe_indices.size(), ExcMessage("DoFHandler not initialized")); @@ -2162,9 +2161,8 @@ namespace internal return; } - Assert( - accessor.dof_handler != nullptr, - (typename std::decay::type::ExcInvalidObject())); + Assert(accessor.dof_handler != nullptr, + (typename std::decay_t::ExcInvalidObject())); Assert(static_cast(accessor.level()) < accessor.dof_handler->hp_cell_future_fe_indices.size(), ExcMessage("DoFHandler not initialized")); @@ -2190,9 +2188,8 @@ namespace internal if (accessor.dof_handler->hp_capability_enabled == false) return DoFHandler::default_fe_index; - Assert( - accessor.dof_handler != nullptr, - (typename std::decay::type::ExcInvalidObject())); + Assert(accessor.dof_handler != nullptr, + (typename std::decay_t::ExcInvalidObject())); Assert(static_cast(accessor.level()) < accessor.dof_handler->hp_cell_future_fe_indices.size(), ExcMessage("DoFHandler not initialized")); @@ -2224,9 +2221,8 @@ namespace internal return; } - Assert( - accessor.dof_handler != nullptr, - (typename std::decay::type::ExcInvalidObject())); + Assert(accessor.dof_handler != nullptr, + (typename std::decay_t::ExcInvalidObject())); Assert(static_cast(accessor.level()) < accessor.dof_handler->hp_cell_future_fe_indices.size(), ExcMessage("DoFHandler not initialized")); @@ -2252,9 +2248,8 @@ namespace internal if (accessor.dof_handler->hp_capability_enabled == false) return false; - Assert( - accessor.dof_handler != nullptr, - (typename std::decay::type::ExcInvalidObject())); + Assert(accessor.dof_handler != nullptr, + (typename std::decay_t::ExcInvalidObject())); Assert(static_cast(accessor.level()) < accessor.dof_handler->hp_cell_future_fe_indices.size(), ExcMessage("DoFHandler not initialized")); @@ -2279,9 +2274,8 @@ namespace internal if (accessor.dof_handler->hp_capability_enabled == false) return; - Assert( - accessor.dof_handler != nullptr, - (typename std::decay::type::ExcInvalidObject())); + Assert(accessor.dof_handler != nullptr, + (typename std::decay_t::ExcInvalidObject())); Assert(static_cast(accessor.level()) < accessor.dof_handler->hp_cell_future_fe_indices.size(), ExcMessage("DoFHandler not initialized")); @@ -2832,12 +2826,12 @@ DoFCellAccessor:: OutputVector & global_destination) const { Assert(this->dof_handler != nullptr, - (typename std::decay::type::ExcInvalidObject())); + (typename std::decay_t::ExcInvalidObject())); Assert(static_cast(local_source_end - local_source_begin) == this->get_fe().n_dofs_per_cell(), - (typename std::decay::type::ExcVectorDoesNotMatch())); + (typename std::decay_t::ExcVectorDoesNotMatch())); Assert(this->dof_handler->n_dofs() == global_destination.size(), - (typename std::decay::type::ExcVectorDoesNotMatch())); + (typename std::decay_t::ExcVectorDoesNotMatch())); Assert(!this->has_children(), ExcMessage("Cell must be active")); @@ -2871,12 +2865,12 @@ DoFCellAccessor:: OutputVector & global_destination) const { Assert(this->dof_handler != nullptr, - (typename std::decay::type::ExcInvalidObject())); + (typename std::decay_t::ExcInvalidObject())); Assert(local_source_end - local_source_begin == this->get_fe().n_dofs_per_cell(), - (typename std::decay::type::ExcVectorDoesNotMatch())); + (typename std::decay_t::ExcVectorDoesNotMatch())); Assert(this->dof_handler->n_dofs() == global_destination.size(), - (typename std::decay::type::ExcVectorDoesNotMatch())); + (typename std::decay_t::ExcVectorDoesNotMatch())); Assert(!this->has_children(), ExcMessage("Cell must be active.")); @@ -2902,15 +2896,15 @@ DoFCellAccessor:: OutputMatrix & global_destination) const { Assert(this->dof_handler != nullptr, - (typename std::decay::type::ExcInvalidObject())); + (typename std::decay_t::ExcInvalidObject())); Assert(local_source.m() == this->get_fe().n_dofs_per_cell(), - (typename std::decay::type::ExcMatrixDoesNotMatch())); + (typename std::decay_t::ExcMatrixDoesNotMatch())); Assert(local_source.n() == this->get_fe().n_dofs_per_cell(), - (typename std::decay::type::ExcMatrixDoesNotMatch())); + (typename std::decay_t::ExcMatrixDoesNotMatch())); Assert(this->dof_handler->n_dofs() == global_destination.m(), - (typename std::decay::type::ExcMatrixDoesNotMatch())); + (typename std::decay_t::ExcMatrixDoesNotMatch())); Assert(this->dof_handler->n_dofs() == global_destination.n(), - (typename std::decay::type::ExcMatrixDoesNotMatch())); + (typename std::decay_t::ExcMatrixDoesNotMatch())); Assert(!this->has_children(), ExcMessage("Cell must be active.")); @@ -2941,19 +2935,19 @@ DoFCellAccessor:: OutputVector & global_vector) const { Assert(this->dof_handler != nullptr, - (typename std::decay::type::ExcInvalidObject())); + (typename std::decay_t::ExcInvalidObject())); Assert(local_matrix.m() == this->get_fe().n_dofs_per_cell(), - (typename std::decay::type::ExcMatrixDoesNotMatch())); + (typename std::decay_t::ExcMatrixDoesNotMatch())); Assert(local_matrix.n() == this->get_fe().n_dofs_per_cell(), - (typename std::decay::type::ExcVectorDoesNotMatch())); + (typename std::decay_t::ExcVectorDoesNotMatch())); Assert(this->dof_handler->n_dofs() == global_matrix.m(), - (typename std::decay::type::ExcMatrixDoesNotMatch())); + (typename std::decay_t::ExcMatrixDoesNotMatch())); Assert(this->dof_handler->n_dofs() == global_matrix.n(), - (typename std::decay::type::ExcMatrixDoesNotMatch())); + (typename std::decay_t::ExcMatrixDoesNotMatch())); Assert(local_vector.size() == this->get_fe().n_dofs_per_cell(), - (typename std::decay::type::ExcVectorDoesNotMatch())); + (typename std::decay_t::ExcVectorDoesNotMatch())); Assert(this->dof_handler->n_dofs() == global_vector.size(), - (typename std::decay::type::ExcVectorDoesNotMatch())); + (typename std::decay_t::ExcVectorDoesNotMatch())); Assert(!this->has_children(), ExcMessage("Cell must be active.")); diff --git a/include/deal.II/fe/fe_system.h b/include/deal.II/fe/fe_system.h index 7b8be45ed6..90e6a44baf 100644 --- a/include/deal.II/fe/fe_system.h +++ b/include/deal.II/fe/fe_system.h @@ -537,11 +537,11 @@ public: template < class... FEPairs, typename = enable_if_all_t< - (std::is_same_v::type, + (std::is_same_v, std::pair>, unsigned int>> || std::is_base_of_v, - typename std::decay::type>)...>> + std::decay_t>)...>> FESystem(FEPairs &&...fe_pairs); /** diff --git a/include/deal.II/lac/read_write_vector.templates.h b/include/deal.II/lac/read_write_vector.templates.h index 711ccd331f..edc3178f69 100644 --- a/include/deal.II/lac/read_write_vector.templates.h +++ b/include/deal.II/lac/read_write_vector.templates.h @@ -619,7 +619,7 @@ namespace LinearAlgebra const auto *new_values = target_vector.getData().get(); const auto size = target_vector.getLocalLength(); - using size_type = typename std::decay::type; + using size_type = std::decay_t; Assert(size == 0 || values != nullptr, ExcInternalError("Export failed.")); AssertDimension(size, stored_elements.n_elements()); diff --git a/include/deal.II/lac/trilinos_sparsity_pattern.h b/include/deal.II/lac/trilinos_sparsity_pattern.h index 5bed68193c..cac8a87bb9 100644 --- a/include/deal.II/lac/trilinos_sparsity_pattern.h +++ b/include/deal.II/lac/trilinos_sparsity_pattern.h @@ -1261,7 +1261,7 @@ namespace TrilinosWrappers TrilinosWrappers::types::int_type *col_index_ptr = reinterpret_cast( - const_cast::type *>(&*begin)); + const_cast *>(&*begin)); // Check at least for the first index that the conversion actually works AssertDimension(*col_index_ptr, *begin); TrilinosWrappers::types::int_type trilinos_row_index = row; diff --git a/tests/grid/filtered_iterator_08.cc b/tests/grid/filtered_iterator_08.cc index 1cf0dae58f..16991e5a83 100644 --- a/tests/grid/filtered_iterator_08.cc +++ b/tests/grid/filtered_iterator_08.cc @@ -63,8 +63,8 @@ test() // This commented out code block identifies that the filtered iterator // is of a different type to that returned by cell->neighbor() // - // using C1 = typename std::decay::type; - // using C2 = typename std::decay::type; + // using C1 = std::decay_t; + // using C2 = std::decay_t; // static_assert(std::is_same_v, // "Cell iterator types are not identical."); diff --git a/tests/physics/notation-kelvin_01.cc b/tests/physics/notation-kelvin_01.cc index 12f2c0183b..eb9813e43c 100644 --- a/tests/physics/notation-kelvin_01.cc +++ b/tests/physics/notation-kelvin_01.cc @@ -128,7 +128,7 @@ test_scalars() const Vector vA = Notation::Kelvin::to_vector(A); const FullMatrix mA = Notation::Kelvin::to_matrix(A); - using InpType = typename std::decay::type; + using InpType = std::decay_t; const auto vA_conv = Notation::Kelvin::to_tensor(vA); const auto mA_conv = Notation::Kelvin::to_tensor(mA); @@ -147,7 +147,7 @@ test_rank_0_tensors() const Vector vA = Notation::Kelvin::to_vector(A); const FullMatrix mA = Notation::Kelvin::to_matrix(A); - using InpType = typename std::decay::type; + using InpType = std::decay_t; // Here and below we need both types to work around a problem present in GCC // 5.4.0 in which the compiler does not correctly handle SFINAE with // static_assert(). This was fixed by GCC 9. @@ -169,7 +169,7 @@ test_rank_1_tensors() const Vector vA = Notation::Kelvin::to_vector(A); - using InpType = typename std::decay::type; + using InpType = std::decay_t; const auto vA_conv = Notation::Kelvin::to_tensor(vA); Assert((vA_conv - A).norm() < 1e-12, @@ -188,7 +188,7 @@ test_rank_2_tensors() const Vector vA = Notation::Kelvin::to_vector(A); const FullMatrix mA = Notation::Kelvin::to_matrix(A); - using InpType = typename std::decay::type; + using InpType = std::decay_t; const auto vA_conv = Notation::Kelvin::to_tensor(vA); const auto mA_conv = Notation::Kelvin::to_tensor(mA); @@ -206,7 +206,7 @@ test_rank_2_tensors() const Vector vA = Notation::Kelvin::to_vector(A); const FullMatrix mA = Notation::Kelvin::to_matrix(A); - using InpType = typename std::decay::type; + using InpType = std::decay_t; const auto vA_conv = Notation::Kelvin::to_tensor(vA); const auto mA_conv = Notation::Kelvin::to_tensor(mA); @@ -229,7 +229,7 @@ test_rank_3_tensors() const FullMatrix mA = Notation::Kelvin::to_matrix, Tensor<2, dim>>(A); - using InpType = typename std::decay::type; + using InpType = std::decay_t; const auto mA_conv = Notation::Kelvin::to_tensor(mA); Assert((mA_conv - A).norm() < 1e-12, @@ -244,7 +244,7 @@ test_rank_3_tensors() const FullMatrix mA = Notation::Kelvin::to_matrix, Tensor<1, dim>>(A); - using InpType = typename std::decay::type; + using InpType = std::decay_t; const auto mA_conv = Notation::Kelvin::to_tensor(mA); Assert((mA_conv - A).norm() < 1e-12, @@ -260,7 +260,7 @@ test_rank_3_tensors() Notation::Kelvin::to_matrix, Tensor<1, dim>>( A); - using InpType = typename std::decay::type; + using InpType = std::decay_t; const auto mA_conv = Notation::Kelvin::to_tensor(mA); Assert((mA_conv - A).norm() < 1e-12, @@ -276,7 +276,7 @@ test_rank_3_tensors() Notation::Kelvin::to_matrix, SymmetricTensor<2, dim>>( A); - using InpType = typename std::decay::type; + using InpType = std::decay_t; const auto mA_conv = Notation::Kelvin::to_tensor(mA); Assert((mA_conv - A).norm() < 1e-12, @@ -295,7 +295,7 @@ test_rank_4_tensors() const FullMatrix mA = Notation::Kelvin::to_matrix(A); - using InpType = typename std::decay::type; + using InpType = std::decay_t; const auto mA_conv = Notation::Kelvin::to_tensor(mA); Assert((mA_conv - A).norm() < 1e-12, @@ -309,7 +309,7 @@ test_rank_4_tensors() const FullMatrix mA = Notation::Kelvin::to_matrix(A); - using InpType = typename std::decay::type; + using InpType = std::decay_t; const auto mA_conv = Notation::Kelvin::to_tensor(mA); Assert((mA_conv - A).norm() < 1e-12, diff --git a/tests/physics/notation-kelvin_02.cc b/tests/physics/notation-kelvin_02.cc index 66e89cda4b..27591234f8 100644 --- a/tests/physics/notation-kelvin_02.cc +++ b/tests/physics/notation-kelvin_02.cc @@ -135,9 +135,9 @@ test_scalars() Vector vB(mC.m()); mC.vmult(vB, vA); - using InpVecType = typename std::decay::type; - using ResVecType = typename std::decay::type; - using InpMatType = typename std::decay::type; + using InpVecType = std::decay_t; + using ResVecType = std::decay_t; + using InpMatType = std::decay_t; // Here and below we need both types to work around a problem present in GCC // 5.4.0 in which the compiler does not correctly handle SFINAE with // static_assert(). This was fixed by GCC 9. @@ -178,9 +178,9 @@ test_rank_0_tensors() Vector vB(mC.m()); mC.vmult(vB, vA); - using InpVecType = typename std::decay::type; - using ResVecType = typename std::decay::type; - using InpMatType = typename std::decay::type; + using InpVecType = std::decay_t; + using ResVecType = std::decay_t; + using InpMatType = std::decay_t; const auto A_conv = Notation::Kelvin::to_tensor(vA); const auto B_conv = Notation::Kelvin::to_tensor(vB); const auto C_conv = Notation::Kelvin::to_tensor(mC); @@ -222,9 +222,9 @@ test_rank_1_2_tensors() Vector vB(mC.m()); mC.vmult(vB, vA); - using InpVecType = typename std::decay::type; - using ResVecType = typename std::decay::type; - using InpMatType = typename std::decay::type; + using InpVecType = std::decay_t; + using ResVecType = std::decay_t; + using InpMatType = std::decay_t; const auto A_conv = Notation::Kelvin::to_tensor(vA); const auto B_conv = Notation::Kelvin::to_tensor(vB); const auto C_conv = Notation::Kelvin::to_tensor(mC); @@ -262,9 +262,9 @@ test_rank_1_2_tensors() Vector vB(mC.m()); mC.vmult(vB, vA); - using InpVecType = typename std::decay::type; - using ResVecType = typename std::decay::type; - using InpMatType = typename std::decay::type; + using InpVecType = std::decay_t; + using ResVecType = std::decay_t; + using InpMatType = std::decay_t; const auto A_conv = Notation::Kelvin::to_tensor(vA); const auto B_conv = Notation::Kelvin::to_tensor(vB); const auto C_conv = Notation::Kelvin::to_tensor(mC); @@ -307,9 +307,9 @@ test_rank_2_4_tensors() Vector vB(mC.m()); mC.vmult(vB, vA); - using InpVecType = typename std::decay::type; - using ResVecType = typename std::decay::type; - using InpMatType = typename std::decay::type; + using InpVecType = std::decay_t; + using ResVecType = std::decay_t; + using InpMatType = std::decay_t; const auto A_conv = Notation::Kelvin::to_tensor(vA); const auto B_conv = Notation::Kelvin::to_tensor(vB); const auto C_conv = Notation::Kelvin::to_tensor(mC); @@ -347,9 +347,9 @@ test_rank_2_4_tensors() Vector vB(mC.m()); mC.vmult(vB, vA); - using InpVecType = typename std::decay::type; - using ResVecType = typename std::decay::type; - using InpMatType = typename std::decay::type; + using InpVecType = std::decay_t; + using ResVecType = std::decay_t; + using InpMatType = std::decay_t; const auto A_conv = Notation::Kelvin::to_tensor(vA); const auto B_conv = Notation::Kelvin::to_tensor(vB); const auto C_conv = Notation::Kelvin::to_tensor(mC); @@ -390,9 +390,9 @@ test_rank_2_4_tensors() Vector vB(mC.m()); mC.vmult(vB, vA); - using InpVecType = typename std::decay::type; - using ResVecType = typename std::decay::type; - using InpMatType = typename std::decay::type; + using InpVecType = std::decay_t; + using ResVecType = std::decay_t; + using InpMatType = std::decay_t; const auto A_conv = Notation::Kelvin::to_tensor(vA); const auto B_conv = Notation::Kelvin::to_tensor(vB); const auto C_conv = Notation::Kelvin::to_tensor(mC); @@ -437,9 +437,9 @@ test_rank_3_tensors() Vector vB(mC.n()); // Note result size mC.Tvmult(vB, vA); // Note transpose vmult - using InpVecType = typename std::decay::type; - using ResVecType = typename std::decay::type; - using InpMatType = typename std::decay::type; + using InpVecType = std::decay_t; + using ResVecType = std::decay_t; + using InpMatType = std::decay_t; const auto A_conv = Notation::Kelvin::to_tensor(vA); const auto B_conv = Notation::Kelvin::to_tensor(vB); const auto C_conv = Notation::Kelvin::to_tensor(mC); @@ -481,9 +481,9 @@ test_rank_3_tensors() Vector vB(mC.m()); // Note result size mC.vmult(vB, vA); // Note transpose vmult - using InpVecType = typename std::decay::type; - using ResVecType = typename std::decay::type; - using InpMatType = typename std::decay::type; + using InpVecType = std::decay_t; + using ResVecType = std::decay_t; + using InpMatType = std::decay_t; const auto A_conv = Notation::Kelvin::to_tensor(vA); const auto B_conv = Notation::Kelvin::to_tensor(vB); const auto C_conv = Notation::Kelvin::to_tensor(mC); @@ -526,9 +526,9 @@ test_rank_3_tensors() Vector vB(mC.n()); // Note result size mC.Tvmult(vB, vA); // Note transpose vmult - using InpVecType = typename std::decay::type; - using ResVecType = typename std::decay::type; - using InpMatType = typename std::decay::type; + using InpVecType = std::decay_t; + using ResVecType = std::decay_t; + using InpMatType = std::decay_t; const auto A_conv = Notation::Kelvin::to_tensor(vA); const auto B_conv = Notation::Kelvin::to_tensor(vB); const auto C_conv = Notation::Kelvin::to_tensor(mC); @@ -571,9 +571,9 @@ test_rank_3_tensors() Vector vB(mC.m()); // Note result size mC.vmult(vB, vA); // Note transpose vmult - using InpVecType = typename std::decay::type; - using ResVecType = typename std::decay::type; - using InpMatType = typename std::decay::type; + using InpVecType = std::decay_t; + using ResVecType = std::decay_t; + using InpMatType = std::decay_t; const auto A_conv = Notation::Kelvin::to_tensor(vA); const auto B_conv = Notation::Kelvin::to_tensor(vB); const auto C_conv = Notation::Kelvin::to_tensor(mC);