32 #ifndef ABSL_CONTAINER_INTERNAL_COMPRESSED_TUPLE_H_ 33 #define ABSL_CONTAINER_INTERNAL_COMPRESSED_TUPLE_H_ 36 #include <type_traits> 41 #if defined(_MSC_VER) && !defined(__NVCC__) 44 #define ABSL_INTERNAL_COMPRESSED_TUPLE_DECLSPEC __declspec(empty_bases) 46 #define ABSL_INTERNAL_COMPRESSED_TUPLE_DECLSPEC 50 namespace container_internal {
52 template <
typename... Ts>
55 namespace internal_compressed_tuple {
57 template <
typename D,
size_t I>
59 template <
typename... B,
size_t I>
61 : std::tuple_element<I, std::tuple<B...>> {};
62 template <
typename D,
size_t I>
71 #if defined(__clang__) || defined(__GNUC__) 86 template <
typename D,
size_t I,
bool = ShouldUseBase<ElemT<D, I>>()>
92 constexpr
const T&
get()
const& {
return value; }
94 constexpr
const T&&
get()
const&& {
return absl::move(*this).value; }
98 template <
typename D,
size_t I>
104 constexpr
const T&
get()
const& {
return *
this; }
105 T&
get() & {
return *
this; }
110 template <
typename D,
typename I>
113 template <
typename... Ts,
size_t... I>
120 :
Storage<CompressedTuple<Ts...>,
121 std::integral_constant<size_t, I>::value>... {
145 template <
typename... Ts>
148 CompressedTuple<Ts...>, absl::index_sequence_for<Ts...>> {
154 constexpr CompressedTuple() =
default;
189 #undef ABSL_INTERNAL_COMPRESSED_TUPLE_DECLSPEC 191 #endif // ABSL_CONTAINER_INTERNAL_COMPRESSED_TUPLE_H_
constexpr CompressedTupleImpl(Ts &&...args)
constexpr T && forward(absl::remove_reference_t< T > &t) noexcept
internal_compressed_tuple::ElemT< CompressedTuple, I > ElemT
typename Elem< D, I >::type ElemT
constexpr const T & get() const &
constexpr bool ShouldUseBase()
#define ABSL_INTERNAL_COMPRESSED_TUPLE_DECLSPEC
struct ABSL_INTERNAL_COMPRESSED_TUPLE_DECLSPEC CompressedTupleImpl
ElemT< CompressedTuple< Ts... >, I > T
constexpr absl::remove_reference_t< T > && move(T &&t) noexcept
constexpr CompressedTuple(Ts...base)
internal_compressed_tuple::ElemT< D, I > T