15 template<
typename...
Ts>
class Tuple :
private std::tuple<Ts...> {
20 template<std::
size_t I>
using ElementType =
typename std::tuple_element<I, Base>::type;
26 template<
typename T>
constexpr T&
get() & {
return std::get<T>(
base()); }
27 template<
typename T>
constexpr T&&
get() && {
return std::forward<T>(std::get<T>(
base())); }
28 template<
typename T>
constexpr const T&
get()
const& {
return std::get<T>(
base()); }
29 template<
typename T>
constexpr const T&&
get()
const&& {
return std::forward<T>(std::get<T>(
base())); }
32 template<std::
size_t I>
constexpr ElementType<I>&&
get() && {
return std::forward<ElementType<I>>(std::get<I>(
base())); }
36 template<
typename Function>
decltype(
auto)
apply(
Function&& function) & {
return std::apply(std::forward<Function>(function),
base()); }
37 template<
typename Function>
decltype(
auto)
apply(
Function&& function) && {
return std::apply(std::forward<Function>(function),
base()); }
39 return std::apply(std::forward<Function>(function),
base());
41 template<
typename Function>
decltype(
auto)
apply(
Function&& function)
const&& {
return std::apply(std::forward<Function>(function),
base()); }
56 template<
typename>
friend struct std::tuple_size;
57 template<std::
size_t,
typename>
friend struct std::tuple_element;
58 template<
typename,
typename>
friend struct std::uses_allocator;
86template<
typename... Ts>
struct std::tuple_size<
CeresEngine::
Tuple<Ts...>> : std::tuple_size<typename CeresEngine::Tuple<Ts...>::Base> {};
88template<std::size_t
I,
typename... Ts>
89struct std::tuple_element<
I,
CeresEngine::
Tuple<Ts...>> : std::tuple_element<I, typename CeresEngine::Tuple<Ts...>::Base> {};
91template<
typename... Ts,
typename Allocator>
92struct std::uses_allocator<
CeresEngine::
Tuple<Ts...>, Allocator> : std::uses_allocator<typename CeresEngine::Tuple<Ts...>::Base, Allocator> {};
Tuple is a fixed-size collection of heterogeneous values.
Definition Tuple.hpp:15
const Base && base() const &&
Definition Tuple.hpp:54
friend constexpr bool operator<=(const Tuple< TTypes... > &lhs, const Tuple< UTypes... > &rhs)
Definition Tuple.hpp:70
constexpr ElementType< I > & get() &
Definition Tuple.hpp:31
friend constexpr bool operator>(const Tuple< TTypes... > &lhs, const Tuple< UTypes... > &rhs)
Definition Tuple.hpp:73
Base && base() &&
Definition Tuple.hpp:52
constexpr T && get() &&
Definition Tuple.hpp:27
constexpr const T & get() const &
Definition Tuple.hpp:28
friend constexpr bool operator<(const Tuple< TTypes... > &lhs, const Tuple< UTypes... > &rhs)
Definition Tuple.hpp:67
std::tuple< Ts... > Base
Definition Tuple.hpp:17
constexpr ElementType< I > && get() &&
Definition Tuple.hpp:32
constexpr const T && get() const &&
Definition Tuple.hpp:29
typename std::tuple_element< I, Base >::type ElementType
Definition Tuple.hpp:20
constexpr const ElementType< I > & get() const &
Definition Tuple.hpp:33
constexpr const ElementType< I > && get() const &&
Definition Tuple.hpp:34
constexpr T & get() &
Definition Tuple.hpp:26
friend constexpr bool operator!=(const Tuple< TTypes... > &lhs, const Tuple< UTypes... > &rhs)
Definition Tuple.hpp:64
decltype(auto) apply(Function &&function) const &&
Definition Tuple.hpp:41
decltype(auto) apply(Function &&function) &
Definition Tuple.hpp:36
decltype(auto) apply(Function &&function) const &
Definition Tuple.hpp:38
const Base & base() const &
Definition Tuple.hpp:53
friend constexpr bool operator>=(const Tuple< TTypes... > &lhs, const Tuple< UTypes... > &rhs)
Definition Tuple.hpp:76
Base & base() &
Definition Tuple.hpp:51
decltype(auto) apply(Function &&function) &&
Definition Tuple.hpp:37
friend constexpr bool operator==(const Tuple< TTypes... > &lhs, const Tuple< UTypes... > &rhs)
Definition Tuple.hpp:61
Rename< std::tuple, TTypeList > Tuple
Type list as a tuple.
Definition TypeListOps.hpp:23
Definition Application.hpp:19
Tuple< Ts &... > tie(Ts &... values)
Creates a tuple of lvalue references to its arguments.
Definition Tuple.hpp:83
constexpr bool operator<(const Optional< A > &lhs, const Optional< B > &rhs)
Definition Optional.hpp:162
bool operator!=(const ShortAllocator< T, N, A1 > &x, const ShortAllocator< U, M, A2 > &y) noexcept
Definition Allocator.hpp:416
auto values(Container &container)
Returns an iterable object that iterates over the values of a map-like container.
Definition Iterator.hpp:400
constexpr bool operator>=(const Optional< A > &lhs, const Optional< B > &rhs)
Definition Optional.hpp:157
FunctionBase< true, true, fu2::capacity_default, true, false, Signatures... > Function
An owning copyable function wrapper for arbitrary callable types.
Definition Function.hpp:54
bool operator==(const ShortAllocator< T, N, A1 > &x, const ShortAllocator< U, M, A2 > &y) noexcept
Definition Allocator.hpp:411
constexpr bool operator>(const Optional< A > &lhs, const Optional< B > &rhs)
Definition Optional.hpp:152
constexpr size_t hash(const T &v)
Generates a hash for the provided type.
Definition Hash.hpp:25
constexpr bool operator<=(const Optional< A > &lhs, const Optional< B > &rhs)
Definition Optional.hpp:167