diff options
| author | Shauren <shauren.trinity@gmail.com> | 2025-02-23 11:33:53 +0100 |
|---|---|---|
| committer | Shauren <shauren.trinity@gmail.com> | 2025-02-23 11:33:53 +0100 |
| commit | 67418a1aeee9035234d304b5e9653b832488dd66 (patch) | |
| tree | d09fea9a2824e77e4f3ffa8b73ddef765328b081 /src/common/Utilities | |
| parent | da07737f9f86ebae1de3b8204921373539530ab8 (diff) | |
Core/Utils: Added map key/value utility projections for std::ranges algorithms
Diffstat (limited to 'src/common/Utilities')
| -rw-r--r-- | src/common/Utilities/Tuples.h | 3 |
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__ |
