Ver Fonte

doc: compressed_pair, std::tuple_size and std::tuple_element specializations

Michele Caini há 4 anos atrás
pai
commit
fcfa994152
1 ficheiros alterados com 11 adições e 0 exclusões
  1. 11 0
      src/entt/core/compressed_pair.hpp

+ 11 - 0
src/entt/core/compressed_pair.hpp

@@ -255,9 +255,20 @@ inline void swap(compressed_pair<First, Second> &lhs, compressed_pair<First, Sec
 #if !defined __clang_major__ || __clang_major__ > 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<typename First, typename Second>
 struct tuple_size<entt::compressed_pair<First, Second>>: integral_constant<size_t, 2u> {};
 
+/**
+ * @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<size_t Index, typename First, typename Second>
 struct tuple_element<Index, entt::compressed_pair<First, Second>>: conditional<Index == 0u, First, Second> {
     static_assert(Index < 2u, "Index out of bounds");