From 8d9a468b22fbb0772e5232c7e23b42f5952a9ecc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Del=20Pino?= <stephane.delpino44@gmail.com> Date: Mon, 26 Jul 2021 19:23:51 +0200 Subject: [PATCH] Modernize a bit the code using is_const_v --- src/utils/Array.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils/Array.hpp b/src/utils/Array.hpp index e47e56575..e2a4e5c71 100644 --- a/src/utils/Array.hpp +++ b/src/utils/Array.hpp @@ -60,7 +60,7 @@ class [[nodiscard]] Array PUGS_INLINE void fill(const DataType& data) const { - static_assert(not std::is_const<DataType>(), "Cannot modify Array of const"); + static_assert(not std::is_const_v<DataType>, "Cannot modify Array of const"); Kokkos::deep_copy(m_values, data); } @@ -72,7 +72,7 @@ class [[nodiscard]] Array static_assert(std::is_same<std::remove_const_t<DataType>, std::remove_const_t<DataType2>>(), "Cannot assign Array of different type"); // ensures that const is not lost through copy - static_assert(((std::is_const<DataType2>() and std::is_const<DataType>()) or not std::is_const<DataType2>()), + static_assert(((std::is_const_v<DataType2> and std::is_const_v<DataType>) or not std::is_const_v<DataType2>), "Cannot assign Array of const to Array of non-const"); m_values = array.m_values; return *this; -- GitLab