@@ -16,7 +16,7 @@ namespace kumi
1616 }
1717
1818 // ====================================================================================================================
19- // ! @ingroup algorithm
19+ // ! @ingroup queries
2020 // ! @brief Checks if a product type contains a given identifier
2121 // !
2222 // ! @param t the product type to inspect.
@@ -27,25 +27,25 @@ namespace kumi
2727 // ! @include doc/tuple/algo/contains.cpp
2828 // ! @include doc/record/algo/contains.cpp
2929 // ====================================================================================================================
30- template <concepts::product_type T, concepts::identifier I >
31- KUMI_ABI constexpr bool contains ([[maybe_unused]] T&& t, [[maybe_unused]] I const & id) noexcept
30+ template <concepts::product_type T, concepts::identifier ID >
31+ KUMI_ABI constexpr bool contains ([[maybe_unused]] T&& t, [[maybe_unused]] ID const & id) noexcept
3232 {
3333 if constexpr (concepts::sized_product_type<T, 0 >) return false ;
3434 else if constexpr (concepts::record_type<T>)
3535 return []<std::size_t ... I>(std::index_sequence<I...>) {
36- return _::can_get_field_by_value<std::remove_cvref_t <K >, element_t <I, T>...>;
36+ return _::can_get_field_by_value<std::remove_cvref_t <ID >, element_t <I, T>...>;
3737 }(std::make_index_sequence<size_v<T>>{});
3838 else
3939 return []<std::size_t ... I>(std::index_sequence<I...>) {
40- if constexpr (((concepts::field<element_t <I, T>> && std::invocable<element_t <I, T>, std::remove_cvref_t <K >>) ||
40+ if constexpr (((concepts::field<element_t <I, T>> && std::invocable<element_t <I, T>, std::remove_cvref_t <ID >>) ||
4141 ...))
4242 return true ;
4343 else return false ;
4444 }(std::make_index_sequence<size_v<T>>{});
4545 }
4646
4747 // ====================================================================================================================
48- // ! @ingroup algorithm
48+ // ! @ingroup queries
4949 // ! @brief Checks if a product type contains at least one of many identifiers
5050 // !
5151 // ! @param t the product type to inspect.
@@ -60,12 +60,12 @@ namespace kumi
6060 KUMI_ABI constexpr bool contains_any (T&& t, Is const &... ids) noexcept
6161 {
6262 if constexpr (concepts::sized_product_type<T, 0 >) return false ;
63- else if constexpr (sizeof ...(Ks ) == 0 ) return false ;
64- else return (contains (KUMI_FWD (t), ks ) || ...);
63+ else if constexpr (sizeof ...(Is ) == 0 ) return false ;
64+ else return (contains (KUMI_FWD (t), ids ) || ...);
6565 }
6666
6767 // ==================================================================================================================
68- // ! @ingroup algorithm
68+ // ! @ingroup queries
6969 // ! @brief Checks if a product type contains fields based only on selected identifiers
7070 // !
7171 // ! @param t the product type to inspect.
@@ -80,16 +80,16 @@ namespace kumi
8080 KUMI_ABI constexpr bool contains_only ([[maybe_unused]] T&& t, [[maybe_unused]] Is const &... ids) noexcept
8181 {
8282 if constexpr (concepts::sized_product_type<T, 0 >) return false ;
83- else if constexpr (sizeof ...(Ks ) == 0 ) return false ;
84- else if constexpr (sizeof ...(Ks ) < size_v<T>) return false ;
83+ else if constexpr (sizeof ...(Is ) == 0 ) return false ;
84+ else if constexpr (sizeof ...(Is ) < size_v<T>) return false ;
8585 else
8686 return [&]<std::size_t ... I>(std::index_sequence<I...>) {
87- return (_::contains<element_t <I, T>, Ks ...> && ...);
87+ return (_::contains<element_t <I, T>, Is ...> && ...);
8888 }(std::make_index_sequence<size_v<T>>{});
8989 }
9090
9191 // ==================================================================================================================
92- // ! @ingroup algorithm
92+ // ! @ingroup queries
9393 // ! @brief Checks if a product type contains no fields based on any of the selected identifiers
9494 // !
9595 // ! @param t the product type to inspect.
@@ -103,6 +103,6 @@ namespace kumi
103103 template <concepts::product_type T, concepts::identifier... Is>
104104 KUMI_ABI constexpr bool contains_none (T&& t, Is const &... ids) noexcept
105105 {
106- return !contains_any (KUMI_FWD (t), ks ...);
106+ return !contains_any (KUMI_FWD (t), ids ...);
107107 }
108108}
0 commit comments