aboutsummaryrefslogtreecommitdiff
path: root/src/common/Utilities
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2025-02-23 11:33:53 +0100
committerOvahlord <dreadkiller@gmx.de>2025-04-06 19:22:25 +0200
commit27e7a99106e7796057ca74cd4edfac28b09f6554 (patch)
tree0ad0438a4a8eee29a3fa1dea1181ec74eb77b6a9 /src/common/Utilities
parent7a2c949bf7618c8762949308ad1b6c1bc0edbee8 (diff)
Core/Utils: Added map key/value utility projections for std::ranges algorithms
(cherry picked from commit 67418a1aeee9035234d304b5e9653b832488dd66)
Diffstat (limited to 'src/common/Utilities')
-rw-r--r--src/common/Utilities/Tuples.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/common/Utilities/Tuples.h b/src/common/Utilities/Tuples.h
index 8b608fd8901..e1c8142166f 100644
--- a/src/common/Utilities/Tuples.h
+++ b/src/common/Utilities/Tuples.h
@@ -60,6 +60,9 @@ namespace Trinity
{
return Impl::new_from_tuple<T>(std::forward<Tuple>(args), std::make_index_sequence<std::tuple_size_v<std::remove_reference_t<Tuple>>>{});
}
+
+ template <std::size_t I>
+ inline constexpr auto TupleElement = []<typename Tuple>(Tuple&& tuple) constexpr -> decltype(auto) { return std::get<I>(std::forward<Tuple>(tuple)); };
}
#endif // Tuples_h__