From 423453fa22dc562dc7857619aab1c9c2ac7f3844 Mon Sep 17 00:00:00 2001 From: vil02 <65706193+vil02@users.noreply.github.com> Date: Sat, 11 Oct 2025 12:08:29 +0200 Subject: [PATCH] Resolve `modernize-type-traits` --- include/CXXGraph/Utility/TypeTraits.hpp | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) mode change 100755 => 100644 include/CXXGraph/Utility/TypeTraits.hpp diff --git a/include/CXXGraph/Utility/TypeTraits.hpp b/include/CXXGraph/Utility/TypeTraits.hpp old mode 100755 new mode 100644 index 0c643439b..05c81469f --- a/include/CXXGraph/Utility/TypeTraits.hpp +++ b/include/CXXGraph/Utility/TypeTraits.hpp @@ -38,9 +38,10 @@ namespace CXXGraph { // is_node type trait template struct is_node - : std::integral_constant< - bool, std::is_same, - typename std::remove_const::type>::value> {}; + : std::integral_constant, + typename std::remove_const_t>> { +}; template struct is_node : std::false_type {}; @@ -56,11 +57,10 @@ template struct is_node_ptr : std::false_type {}; template -struct is_node_ptr : std::integral_constant::value> {}; +struct is_node_ptr : std::integral_constant> {}; template -struct is_node_ptr> - : std::integral_constant::value> {}; +struct is_node_ptr> : std::integral_constant> {}; template inline constexpr bool is_node_ptr_v = is_node_ptr::value; @@ -75,10 +75,10 @@ inline constexpr bool all_are_node_ptrs_v = all_are_node_ptrs::value; // is_edge type trait template -struct is_edge - : std::integral_constant< - bool, std::is_base_of, - typename std::remove_const::type>::value> {}; +struct is_edge : std::integral_constant< + bool, std::is_base_of_v, + typename std::remove_const_t>> { +}; template struct is_edge : std::false_type {}; @@ -94,11 +94,10 @@ template struct is_edge_ptr : std::false_type {}; template -struct is_edge_ptr : std::integral_constant::value> {}; +struct is_edge_ptr : std::integral_constant> {}; template -struct is_edge_ptr> - : std::integral_constant::value> {}; +struct is_edge_ptr> : std::integral_constant> {}; template inline constexpr bool is_edge_ptr_v = is_edge_ptr::value;