@@ -38,9 +38,10 @@ namespace CXXGraph {
3838// is_node type trait
3939template <typename T>
4040struct is_node
41- : std::integral_constant<
42- bool , std::is_same<Node<typename T::Node_t>,
43- typename std::remove_const<T>::type>::value> {};
41+ : std::integral_constant<bool ,
42+ std::is_same_v<Node<typename T::Node_t>,
43+ typename std::remove_const_t <T>>> {
44+ };
4445
4546template <typename T>
4647struct is_node <T*> : std::false_type {};
@@ -56,11 +57,10 @@ template <typename T>
5657struct is_node_ptr : std::false_type {};
5758
5859template <typename T>
59- struct is_node_ptr <T*> : std::integral_constant<bool , is_node <T>::value > {};
60+ struct is_node_ptr <T*> : std::integral_constant<bool , is_node_v <T>> {};
6061
6162template <typename T>
62- struct is_node_ptr <shared<T>>
63- : std::integral_constant<bool , is_node<T>::value> {};
63+ struct is_node_ptr <shared<T>> : std::integral_constant<bool , is_node_v<T>> {};
6464
6565template <typename T>
6666inline constexpr bool is_node_ptr_v = is_node_ptr<T>::value;
@@ -75,10 +75,10 @@ inline constexpr bool all_are_node_ptrs_v = all_are_node_ptrs<T, Ts...>::value;
7575
7676// is_edge type trait
7777template <typename T>
78- struct is_edge
79- : std::integral_constant<
80- bool , std::is_base_of<Edge< typename T::Node_t>,
81- typename std::remove_const<T>::type>::value> { };
78+ struct is_edge : std::integral_constant<
79+ bool , std::is_base_of_v<Edge< typename T::Node_t>,
80+ typename std::remove_const_t <T>>> {
81+ };
8282
8383template <typename T>
8484struct is_edge <T*> : std::false_type {};
@@ -94,11 +94,10 @@ template <typename T>
9494struct is_edge_ptr : std::false_type {};
9595
9696template <typename T>
97- struct is_edge_ptr <T*> : std::integral_constant<bool , is_edge <T>::value > {};
97+ struct is_edge_ptr <T*> : std::integral_constant<bool , is_edge_v <T>> {};
9898
9999template <typename T>
100- struct is_edge_ptr <shared<T>>
101- : std::integral_constant<bool , is_edge<T>::value> {};
100+ struct is_edge_ptr <shared<T>> : std::integral_constant<bool , is_edge_v<T>> {};
102101
103102template <typename T>
104103inline constexpr bool is_edge_ptr_v = is_edge_ptr<T>::value;
0 commit comments