From fcfa994152f70180a1d47bc46b84109f34cd703f Mon Sep 17 00:00:00 2001 From: Michele Caini Date: Tue, 8 Feb 2022 09:57:10 +0100 Subject: [PATCH] doc: compressed_pair, std::tuple_size and std::tuple_element specializations --- src/entt/core/compressed_pair.hpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/entt/core/compressed_pair.hpp b/src/entt/core/compressed_pair.hpp index 236c7f2be..131a8e8e8 100644 --- a/src/entt/core/compressed_pair.hpp +++ b/src/entt/core/compressed_pair.hpp @@ -255,9 +255,20 @@ inline void swap(compressed_pair &lhs, compressed_pair 6 namespace std { +/** + * @brief `std::tuple_size` specialization for `entt::compressed_pair`. + * @tparam First The type of the first element that the pair stores. + * @tparam Second The type of the second element that the pair stores. + */ template struct tuple_size>: integral_constant {}; +/** + * @brief `std::tuple_element` specialization for `entt::compressed_pair`. + * @tparam Index The index of the type to return. + * @tparam First The type of the first element that the pair stores. + * @tparam Second The type of the second element that the pair stores. + */ template struct tuple_element>: conditional { static_assert(Index < 2u, "Index out of bounds");