Coverage Report

Created: 2026-07-16 06:43

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/abseil-cpp/absl/container/internal/compressed_tuple.h
Line
Count
Source
1
// Copyright 2018 The Abseil Authors.
2
//
3
// Licensed under the Apache License, Version 2.0 (the "License");
4
// you may not use this file except in compliance with the License.
5
// You may obtain a copy of the License at
6
//
7
//      https://www.apache.org/licenses/LICENSE-2.0
8
//
9
// Unless required by applicable law or agreed to in writing, software
10
// distributed under the License is distributed on an "AS IS" BASIS,
11
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
// See the License for the specific language governing permissions and
13
// limitations under the License.
14
//
15
// Helper class to perform the Empty Base Optimization.
16
// Ts can contain classes and non-classes, empty or not. For the ones that
17
// are empty classes, we perform the optimization. If all types in Ts are empty
18
// classes, then CompressedTuple<Ts...> is itself an empty class.
19
//
20
// To access the members, use member get<N>() function.
21
//
22
// Eg:
23
//   absl::container_internal::CompressedTuple<int, T1, T2, T3> value(7, t1, t2,
24
//                                                                    t3);
25
//   assert(value.get<0>() == 7);
26
//   T1& t1 = value.get<1>();
27
//   const T2& t2 = value.get<2>();
28
//   ...
29
//
30
// https://en.cppreference.com/w/cpp/language/ebo
31
32
#ifndef ABSL_CONTAINER_INTERNAL_COMPRESSED_TUPLE_H_
33
#define ABSL_CONTAINER_INTERNAL_COMPRESSED_TUPLE_H_
34
35
#include <initializer_list>
36
#include <tuple>
37
#include <type_traits>
38
#include <utility>
39
40
#include "absl/utility/utility.h"
41
42
#if defined(_MSC_VER) && !defined(__NVCC__)
43
// We need to mark these classes with this declspec to ensure that
44
// CompressedTuple happens.
45
#define ABSL_INTERNAL_COMPRESSED_TUPLE_DECLSPEC __declspec(empty_bases)
46
#else
47
#define ABSL_INTERNAL_COMPRESSED_TUPLE_DECLSPEC
48
#endif
49
50
namespace absl {
51
ABSL_NAMESPACE_BEGIN
52
namespace container_internal {
53
54
template <typename... Ts>
55
class CompressedTuple;
56
57
namespace internal_compressed_tuple {
58
59
template <typename D, size_t I>
60
struct Elem;
61
template <typename... B, size_t I>
62
struct Elem<CompressedTuple<B...>, I>
63
    : std::tuple_element<I, std::tuple<B...>> {};
64
template <typename D, size_t I>
65
using ElemT = typename Elem<D, I>::type;
66
67
68
template <typename T>
69
0
constexpr bool ShouldUseBase() {
70
0
  return std::is_class_v<T> && std::is_empty_v<T> && !std::is_final_v<T>;
71
0
}
Unexecuted instantiation: bool absl::container_internal::internal_compressed_tuple::ShouldUseBase<std::__1::allocator<absl::LogSink*> >()
Unexecuted instantiation: bool absl::container_internal::internal_compressed_tuple::ShouldUseBase<unsigned long>()
Unexecuted instantiation: bool absl::container_internal::internal_compressed_tuple::ShouldUseBase<absl::LogSink**>()
Unexecuted instantiation: bool absl::container_internal::internal_compressed_tuple::ShouldUseBase<std::__1::allocator<absl::str_format_internal::FormatArgImpl> >()
Unexecuted instantiation: bool absl::container_internal::internal_compressed_tuple::ShouldUseBase<void (*)(std::__1::basic_string_view<char, std::__1::char_traits<char> >)>()
Unexecuted instantiation: bool absl::container_internal::internal_compressed_tuple::ShouldUseBase<std::__1::allocator<char> >()
72
73
// Tag type used to disambiguate Storage types for different CompresseedTuples.
74
// Without it, CompressedTuple<T, CompressedTuple<T>> would inherit from
75
// Storage<T, 0> twice.
76
template <typename... Ts>
77
struct StorageTag;
78
79
// The storage class provides two specializations:
80
//  - For empty classes, it stores T as a base class.
81
//  - For everything else, it stores T as a member.
82
// Tag should be set to StorageTag<Ts...>.
83
template <typename T, size_t I, typename Tag, bool UseBase = ShouldUseBase<T>()>
84
struct Storage {
85
  T value;
86
  constexpr Storage() = default;
87
  template <typename V>
88
  explicit constexpr Storage(std::in_place_t, V&& v)
89
0
      : value(std::forward<V>(v)) {}
Unexecuted instantiation: absl::container_internal::internal_compressed_tuple::Storage<unsigned long, 1ul, absl::container_internal::internal_compressed_tuple::StorageTag<std::__1::allocator<absl::LogSink*>, unsigned long>, false>::Storage<unsigned int>(std::__1::in_place_t, unsigned int&&)
Unexecuted instantiation: absl::container_internal::internal_compressed_tuple::Storage<absl::LogSink**, 1ul, absl::container_internal::internal_compressed_tuple::StorageTag<std::__1::allocator<absl::LogSink*>, absl::LogSink**>, false>::Storage<decltype(nullptr)>(std::__1::in_place_t, decltype(nullptr)&&)
Unexecuted instantiation: absl::container_internal::internal_compressed_tuple::Storage<unsigned long, 0ul, absl::container_internal::internal_compressed_tuple::StorageTag<unsigned long, std::__1::allocator<char> >, false>::Storage<unsigned long&>(std::__1::in_place_t, unsigned long&)
Unexecuted instantiation: absl::container_internal::internal_compressed_tuple::Storage<unsigned long, 1ul, absl::container_internal::internal_compressed_tuple::StorageTag<std::__1::allocator<absl::str_format_internal::FormatArgImpl>, unsigned long>, false>::Storage<unsigned int>(std::__1::in_place_t, unsigned int&&)
90
0
  constexpr const T& get() const& { return value; }
Unexecuted instantiation: absl::container_internal::internal_compressed_tuple::Storage<unsigned long, 1ul, absl::container_internal::internal_compressed_tuple::StorageTag<std::__1::allocator<absl::LogSink*>, unsigned long>, false>::get() const &
Unexecuted instantiation: absl::container_internal::internal_compressed_tuple::Storage<unsigned long, 1ul, absl::container_internal::internal_compressed_tuple::StorageTag<std::__1::allocator<absl::str_format_internal::FormatArgImpl>, unsigned long>, false>::get() const &
Unexecuted instantiation: absl::container_internal::internal_compressed_tuple::Storage<unsigned long, 0ul, absl::container_internal::internal_compressed_tuple::StorageTag<unsigned long, std::__1::allocator<char> >, false>::get() const &
91
0
  constexpr T& get() & { return value; }
Unexecuted instantiation: absl::container_internal::internal_compressed_tuple::Storage<unsigned long, 1ul, absl::container_internal::internal_compressed_tuple::StorageTag<std::__1::allocator<absl::LogSink*>, unsigned long>, false>::get() &
Unexecuted instantiation: absl::container_internal::internal_compressed_tuple::Storage<absl::LogSink**, 1ul, absl::container_internal::internal_compressed_tuple::StorageTag<std::__1::allocator<absl::LogSink*>, absl::LogSink**>, false>::get() &
Unexecuted instantiation: absl::container_internal::internal_compressed_tuple::Storage<unsigned long, 1ul, absl::container_internal::internal_compressed_tuple::StorageTag<std::__1::allocator<absl::str_format_internal::FormatArgImpl>, unsigned long>, false>::get() &
Unexecuted instantiation: absl::container_internal::internal_compressed_tuple::Storage<void (*)(std::__1::basic_string_view<char, std::__1::char_traits<char> >), 0ul, absl::container_internal::internal_compressed_tuple::StorageTag<void (*)(std::__1::basic_string_view<char, std::__1::char_traits<char> >)>, false>::get() &
92
  constexpr const T&& get() const&& { return std::move(*this).value; }
93
  constexpr T&& get() && { return std::move(*this).value; }
94
};
95
96
template <typename T, size_t I, typename Tag>
97
struct ABSL_INTERNAL_COMPRESSED_TUPLE_DECLSPEC Storage<T, I, Tag, true> : T {
98
  constexpr Storage() = default;
99
100
  template <typename V>
101
0
  explicit constexpr Storage(std::in_place_t, V&& v) : T(std::forward<V>(v)) {}
Unexecuted instantiation: absl::container_internal::internal_compressed_tuple::Storage<std::__1::allocator<absl::LogSink*>, 0ul, absl::container_internal::internal_compressed_tuple::StorageTag<std::__1::allocator<absl::LogSink*>, unsigned long>, true>::Storage<std::__1::allocator<absl::LogSink*> >(std::__1::in_place_t, std::__1::allocator<absl::LogSink*>&&)
Unexecuted instantiation: absl::container_internal::internal_compressed_tuple::Storage<std::__1::allocator<absl::LogSink*>, 0ul, absl::container_internal::internal_compressed_tuple::StorageTag<std::__1::allocator<absl::LogSink*>, absl::LogSink**>, true>::Storage<std::__1::allocator<absl::LogSink*>&>(std::__1::in_place_t, std::__1::allocator<absl::LogSink*>&)
Unexecuted instantiation: absl::container_internal::internal_compressed_tuple::Storage<std::__1::allocator<char>, 1ul, absl::container_internal::internal_compressed_tuple::StorageTag<unsigned long, std::__1::allocator<char> >, true>::Storage<std::__1::allocator<char> const&>(std::__1::in_place_t, std::__1::allocator<char> const&)
Unexecuted instantiation: absl::container_internal::internal_compressed_tuple::Storage<std::__1::allocator<absl::str_format_internal::FormatArgImpl>, 0ul, absl::container_internal::internal_compressed_tuple::StorageTag<std::__1::allocator<absl::str_format_internal::FormatArgImpl>, unsigned long>, true>::Storage<std::__1::allocator<absl::str_format_internal::FormatArgImpl> const&>(std::__1::in_place_t, std::__1::allocator<absl::str_format_internal::FormatArgImpl> const&)
102
103
0
  constexpr const T& get() const& { return *this; }
Unexecuted instantiation: absl::container_internal::internal_compressed_tuple::Storage<std::__1::allocator<absl::LogSink*>, 0ul, absl::container_internal::internal_compressed_tuple::StorageTag<std::__1::allocator<absl::LogSink*>, unsigned long>, true>::get() const &
Unexecuted instantiation: absl::container_internal::internal_compressed_tuple::Storage<std::__1::allocator<absl::str_format_internal::FormatArgImpl>, 0ul, absl::container_internal::internal_compressed_tuple::StorageTag<std::__1::allocator<absl::str_format_internal::FormatArgImpl>, unsigned long>, true>::get() const &
104
0
  constexpr T& get() & { return *this; }
Unexecuted instantiation: absl::container_internal::internal_compressed_tuple::Storage<std::__1::allocator<absl::LogSink*>, 0ul, absl::container_internal::internal_compressed_tuple::StorageTag<std::__1::allocator<absl::LogSink*>, unsigned long>, true>::get() &
Unexecuted instantiation: absl::container_internal::internal_compressed_tuple::Storage<std::__1::allocator<absl::LogSink*>, 0ul, absl::container_internal::internal_compressed_tuple::StorageTag<std::__1::allocator<absl::LogSink*>, absl::LogSink**>, true>::get() &
Unexecuted instantiation: absl::container_internal::internal_compressed_tuple::Storage<std::__1::allocator<absl::str_format_internal::FormatArgImpl>, 0ul, absl::container_internal::internal_compressed_tuple::StorageTag<std::__1::allocator<absl::str_format_internal::FormatArgImpl>, unsigned long>, true>::get() &
Unexecuted instantiation: absl::container_internal::internal_compressed_tuple::Storage<std::__1::allocator<char>, 1ul, absl::container_internal::internal_compressed_tuple::StorageTag<unsigned long, std::__1::allocator<char> >, true>::get() &
105
  constexpr const T&& get() const&& { return std::move(*this); }
106
  constexpr T&& get() && { return std::move(*this); }
107
};
108
109
template <typename D, typename I, bool ShouldAnyUseBase>
110
struct ABSL_INTERNAL_COMPRESSED_TUPLE_DECLSPEC CompressedTupleImpl;
111
112
template <typename... Ts, size_t... I, bool ShouldAnyUseBase>
113
struct ABSL_INTERNAL_COMPRESSED_TUPLE_DECLSPEC
114
    CompressedTupleImpl<CompressedTuple<Ts...>, std::index_sequence<I...>,
115
                        ShouldAnyUseBase>
116
    // We use the dummy identity function through std::integral_constant to
117
    // convince MSVC of accepting and expanding I in that context. Without it
118
    // you would get:
119
    //   error C3548: 'I': parameter pack cannot be used in this context
120
    : Storage<Ts, std::integral_constant<size_t, I>::value,
121
              StorageTag<Ts...>>... {
122
  constexpr CompressedTupleImpl() = default;
123
  template <typename... Vs>
124
  explicit constexpr CompressedTupleImpl(std::in_place_t, Vs&&... args)
125
0
      : Storage<Ts, I, StorageTag<Ts...>>(std::in_place,
126
0
                                          std::forward<Vs>(args))... {}
Unexecuted instantiation: absl::container_internal::internal_compressed_tuple::CompressedTupleImpl<absl::container_internal::CompressedTuple<std::__1::allocator<absl::LogSink*>, unsigned long>, std::__1::integer_sequence<unsigned long, 0ul, 1ul>, true>::CompressedTupleImpl<std::__1::allocator<absl::LogSink*>, unsigned int>(std::__1::in_place_t, std::__1::allocator<absl::LogSink*>&&, unsigned int&&)
Unexecuted instantiation: absl::container_internal::internal_compressed_tuple::CompressedTupleImpl<absl::container_internal::CompressedTuple<std::__1::allocator<absl::LogSink*>, absl::LogSink**>, std::__1::integer_sequence<unsigned long, 0ul, 1ul>, true>::CompressedTupleImpl<std::__1::allocator<absl::LogSink*>&, decltype(nullptr)>(std::__1::in_place_t, std::__1::allocator<absl::LogSink*>&, decltype(nullptr)&&)
Unexecuted instantiation: absl::container_internal::internal_compressed_tuple::CompressedTupleImpl<absl::container_internal::CompressedTuple<unsigned long, std::__1::allocator<char> >, std::__1::integer_sequence<unsigned long, 0ul, 1ul>, true>::CompressedTupleImpl<unsigned long&, std::__1::allocator<char> const&>(std::__1::in_place_t, unsigned long&, std::__1::allocator<char> const&)
Unexecuted instantiation: absl::container_internal::internal_compressed_tuple::CompressedTupleImpl<absl::container_internal::CompressedTuple<std::__1::allocator<absl::str_format_internal::FormatArgImpl>, unsigned long>, std::__1::integer_sequence<unsigned long, 0ul, 1ul>, true>::CompressedTupleImpl<std::__1::allocator<absl::str_format_internal::FormatArgImpl> const&, unsigned int>(std::__1::in_place_t, std::__1::allocator<absl::str_format_internal::FormatArgImpl> const&, unsigned int&&)
127
  friend CompressedTuple<Ts...>;
128
};
129
130
template <typename... Ts, size_t... I>
131
struct ABSL_INTERNAL_COMPRESSED_TUPLE_DECLSPEC
132
    CompressedTupleImpl<CompressedTuple<Ts...>, std::index_sequence<I...>,
133
                        false>
134
    // We use the dummy identity function as above...
135
    : Storage<Ts, std::integral_constant<size_t, I>::value, StorageTag<Ts...>,
136
              false>... {
137
  constexpr CompressedTupleImpl() = default;
138
  template <typename... Vs>
139
  explicit constexpr CompressedTupleImpl(std::in_place_t, Vs&&... args)
140
      : Storage<Ts, I, StorageTag<Ts...>, false>(std::in_place,
141
                                                 std::forward<Vs>(args))... {}
142
  friend CompressedTuple<Ts...>;
143
};
144
145
std::false_type Or(std::initializer_list<std::false_type>);
146
std::true_type Or(std::initializer_list<bool>);
147
148
// MSVC requires this to be done separately rather than within the declaration
149
// of CompressedTuple below.
150
template <typename... Ts>
151
0
constexpr bool ShouldAnyUseBase() {
152
0
  return decltype(
153
0
      Or({std::integral_constant<bool, ShouldUseBase<Ts>()>()...})){};
154
0
}
Unexecuted instantiation: bool absl::container_internal::internal_compressed_tuple::ShouldAnyUseBase<std::__1::allocator<absl::LogSink*>, unsigned long>()
Unexecuted instantiation: bool absl::container_internal::internal_compressed_tuple::ShouldAnyUseBase<std::__1::allocator<absl::LogSink*>, absl::LogSink**>()
Unexecuted instantiation: bool absl::container_internal::internal_compressed_tuple::ShouldAnyUseBase<std::__1::allocator<absl::str_format_internal::FormatArgImpl>, unsigned long>()
Unexecuted instantiation: bool absl::container_internal::internal_compressed_tuple::ShouldAnyUseBase<void (*)(std::__1::basic_string_view<char, std::__1::char_traits<char> >)>()
Unexecuted instantiation: bool absl::container_internal::internal_compressed_tuple::ShouldAnyUseBase<unsigned long, std::__1::allocator<char> >()
155
156
template <typename T, typename V>
157
using TupleElementMoveConstructible =
158
    std::conditional_t<std::is_reference_v<T>, std::is_convertible<V, T>,
159
                       std::is_constructible<T, V&&>>;
160
161
template <bool SizeMatches, class T, class... Vs>
162
struct TupleMoveConstructible : std::false_type {};
163
164
template <class... Ts, class... Vs>
165
struct TupleMoveConstructible<true, CompressedTuple<Ts...>, Vs...>
166
    : std::integral_constant<
167
          bool,
168
          std::conjunction_v<TupleElementMoveConstructible<Ts, Vs&&>...>> {};
169
170
template <typename T>
171
struct compressed_tuple_size;
172
173
template <typename... Es>
174
struct compressed_tuple_size<CompressedTuple<Es...>>
175
    : public std::integral_constant<std::size_t, sizeof...(Es)> {};
176
177
template <class T, class... Vs>
178
struct TupleItemsMoveConstructible
179
    : std::integral_constant<
180
          bool, TupleMoveConstructible<compressed_tuple_size<T>::value ==
181
                                           sizeof...(Vs),
182
                                       T, Vs...>::value> {};
183
184
}  // namespace internal_compressed_tuple
185
186
// Helper class to perform the Empty Base Class Optimization.
187
// Ts can contain classes and non-classes, empty or not. For the ones that
188
// are empty classes, we perform the CompressedTuple. If all types in Ts are
189
// empty classes, then CompressedTuple<Ts...> is itself an empty class.
190
//
191
// To access the members, use member .get<N>() function.
192
//
193
// Eg:
194
//   absl::container_internal::CompressedTuple<int, T1, T2, T3> value(7, t1, t2,
195
//                                                                    t3);
196
//   assert(value.get<0>() == 7);
197
//   T1& t1 = value.get<1>();
198
//   const T2& t2 = value.get<2>();
199
//   ...
200
//
201
// https://en.cppreference.com/w/cpp/language/ebo
202
template <typename... Ts>
203
class ABSL_INTERNAL_COMPRESSED_TUPLE_DECLSPEC CompressedTuple
204
    : private internal_compressed_tuple::CompressedTupleImpl<
205
          CompressedTuple<Ts...>, std::index_sequence_for<Ts...>,
206
          internal_compressed_tuple::ShouldAnyUseBase<Ts...>()> {
207
 private:
208
  template <int I>
209
  using ElemT = internal_compressed_tuple::ElemT<CompressedTuple, I>;
210
211
  template <int I>
212
  using StorageT = internal_compressed_tuple::Storage<
213
      ElemT<I>, I, internal_compressed_tuple::StorageTag<Ts...>>;
214
215
 public:
216
  // There seems to be a bug in MSVC dealing in which using '=default' here will
217
  // cause the compiler to ignore the body of other constructors. The work-
218
  // around is to explicitly implement the default constructor.
219
#if defined(_MSC_VER)
220
  constexpr CompressedTuple() : CompressedTuple::CompressedTupleImpl() {}
221
#else
222
  constexpr CompressedTuple() = default;
223
#endif
224
  explicit constexpr CompressedTuple(const Ts&... base)
225
      : CompressedTuple::CompressedTupleImpl(std::in_place, base...) {}
226
227
  template <typename First, typename... Vs,
228
            std::enable_if_t<
229
                std::conjunction_v<
230
                    // Ensure we are not hiding default copy/move constructors.
231
                    std::negation<std::is_same<void(CompressedTuple),
232
                                               void(std::decay_t<First>)>>,
233
                    internal_compressed_tuple::TupleItemsMoveConstructible<
234
                        CompressedTuple<Ts...>, First, Vs...>>,
235
                bool> = true>
236
  explicit constexpr CompressedTuple(First&& first, Vs&&... base)
237
0
      : CompressedTuple::CompressedTupleImpl(std::in_place,
238
0
                                             std::forward<First>(first),
239
0
                                             std::forward<Vs>(base)...) {}
Unexecuted instantiation: _ZN4absl18container_internal15CompressedTupleIJNSt3__19allocatorIPNS_7LogSinkEEEmEEC2IS6_JjETnNS2_9enable_ifIXsr3stdE13conjunction_vINS2_8negationINS2_7is_sameIFvS7_EFvu7__decayIT_EEEEEENS0_25internal_compressed_tuple27TupleItemsMoveConstructibleIS7_JSD_DpT0_EEEEEbE4typeELb1EEEOSD_DpOSK_
Unexecuted instantiation: _ZN4absl18container_internal15CompressedTupleIJNSt3__19allocatorIPNS_7LogSinkEEEPS5_EEC2IRS6_JDnETnNS2_9enable_ifIXsr3stdE13conjunction_vINS2_8negationINS2_7is_sameIFvS8_EFvu7__decayIT_EEEEEENS0_25internal_compressed_tuple27TupleItemsMoveConstructibleIS8_JSF_DpT0_EEEEEbE4typeELb1EEEOSF_DpOSM_
Unexecuted instantiation: _ZN4absl18container_internal15CompressedTupleIJmNSt3__19allocatorIcEEEEC2IRmJRKS4_ETnNS2_9enable_ifIXsr3stdE13conjunction_vINS2_8negationINS2_7is_sameIFvS5_EFvu7__decayIT_EEEEEENS0_25internal_compressed_tuple27TupleItemsMoveConstructibleIS5_JSE_DpT0_EEEEEbE4typeELb1EEEOSE_DpOSL_
Unexecuted instantiation: _ZN4absl18container_internal15CompressedTupleIJNSt3__19allocatorINS_19str_format_internal13FormatArgImplEEEmEEC2IRKS6_JjETnNS2_9enable_ifIXsr3stdE13conjunction_vINS2_8negationINS2_7is_sameIFvS7_EFvu7__decayIT_EEEEEENS0_25internal_compressed_tuple27TupleItemsMoveConstructibleIS7_JSF_DpT0_EEEEEbE4typeELb1EEEOSF_DpOSM_
240
241
  template <int I>
242
0
  constexpr ElemT<I>& get() & {
243
0
    return StorageT<I>::get();
244
0
  }
Unexecuted instantiation: absl::container_internal::internal_compressed_tuple::Elem<absl::container_internal::CompressedTuple<std::__1::allocator<absl::LogSink*>, unsigned long>, 1>::type& absl::container_internal::CompressedTuple<std::__1::allocator<absl::LogSink*>, unsigned long>::get<1>() &
Unexecuted instantiation: absl::container_internal::internal_compressed_tuple::Elem<absl::container_internal::CompressedTuple<std::__1::allocator<absl::LogSink*>, unsigned long>, 0>::type& absl::container_internal::CompressedTuple<std::__1::allocator<absl::LogSink*>, unsigned long>::get<0>() &
Unexecuted instantiation: absl::container_internal::internal_compressed_tuple::Elem<absl::container_internal::CompressedTuple<std::__1::allocator<absl::LogSink*>, absl::LogSink**>, 0>::type& absl::container_internal::CompressedTuple<std::__1::allocator<absl::LogSink*>, absl::LogSink**>::get<0>() &
Unexecuted instantiation: absl::container_internal::internal_compressed_tuple::Elem<absl::container_internal::CompressedTuple<std::__1::allocator<absl::LogSink*>, absl::LogSink**>, 1>::type& absl::container_internal::CompressedTuple<std::__1::allocator<absl::LogSink*>, absl::LogSink**>::get<1>() &
Unexecuted instantiation: absl::container_internal::internal_compressed_tuple::Elem<absl::container_internal::CompressedTuple<std::__1::allocator<absl::str_format_internal::FormatArgImpl>, unsigned long>, 1>::type& absl::container_internal::CompressedTuple<std::__1::allocator<absl::str_format_internal::FormatArgImpl>, unsigned long>::get<1>() &
Unexecuted instantiation: absl::container_internal::internal_compressed_tuple::Elem<absl::container_internal::CompressedTuple<std::__1::allocator<absl::str_format_internal::FormatArgImpl>, unsigned long>, 0>::type& absl::container_internal::CompressedTuple<std::__1::allocator<absl::str_format_internal::FormatArgImpl>, unsigned long>::get<0>() &
Unexecuted instantiation: absl::container_internal::internal_compressed_tuple::Elem<absl::container_internal::CompressedTuple<void (*)(std::__1::basic_string_view<char, std::__1::char_traits<char> >)>, 0>::type& absl::container_internal::CompressedTuple<void (*)(std::__1::basic_string_view<char, std::__1::char_traits<char> >)>::get<0>() &
Unexecuted instantiation: absl::container_internal::internal_compressed_tuple::Elem<absl::container_internal::CompressedTuple<unsigned long, std::__1::allocator<char> >, 1>::type& absl::container_internal::CompressedTuple<unsigned long, std::__1::allocator<char> >::get<1>() &
245
246
  template <int I>
247
0
  constexpr const ElemT<I>& get() const& {
248
0
    return StorageT<I>::get();
249
0
  }
Unexecuted instantiation: absl::container_internal::internal_compressed_tuple::Elem<absl::container_internal::CompressedTuple<std::__1::allocator<absl::LogSink*>, unsigned long>, 1>::type const& absl::container_internal::CompressedTuple<std::__1::allocator<absl::LogSink*>, unsigned long>::get<1>() const &
Unexecuted instantiation: absl::container_internal::internal_compressed_tuple::Elem<absl::container_internal::CompressedTuple<std::__1::allocator<absl::LogSink*>, unsigned long>, 0>::type const& absl::container_internal::CompressedTuple<std::__1::allocator<absl::LogSink*>, unsigned long>::get<0>() const &
Unexecuted instantiation: absl::container_internal::internal_compressed_tuple::Elem<absl::container_internal::CompressedTuple<std::__1::allocator<absl::str_format_internal::FormatArgImpl>, unsigned long>, 1>::type const& absl::container_internal::CompressedTuple<std::__1::allocator<absl::str_format_internal::FormatArgImpl>, unsigned long>::get<1>() const &
Unexecuted instantiation: absl::container_internal::internal_compressed_tuple::Elem<absl::container_internal::CompressedTuple<std::__1::allocator<absl::str_format_internal::FormatArgImpl>, unsigned long>, 0>::type const& absl::container_internal::CompressedTuple<std::__1::allocator<absl::str_format_internal::FormatArgImpl>, unsigned long>::get<0>() const &
Unexecuted instantiation: absl::container_internal::internal_compressed_tuple::Elem<absl::container_internal::CompressedTuple<unsigned long, std::__1::allocator<char> >, 0>::type const& absl::container_internal::CompressedTuple<unsigned long, std::__1::allocator<char> >::get<0>() const &
250
251
  template <int I>
252
  constexpr ElemT<I>&& get() && {
253
    return std::move(*this).StorageT<I>::get();
254
  }
255
256
  template <int I>
257
  constexpr const ElemT<I>&& get() const&& {
258
    return std::move(*this).StorageT<I>::get();
259
  }
260
};
261
262
// Explicit specialization for a zero-element tuple
263
// (needed to avoid ambiguous overloads for the default constructor).
264
template <>
265
class ABSL_INTERNAL_COMPRESSED_TUPLE_DECLSPEC CompressedTuple<> {};
266
267
}  // namespace container_internal
268
ABSL_NAMESPACE_END
269
}  // namespace absl
270
271
#undef ABSL_INTERNAL_COMPRESSED_TUPLE_DECLSPEC
272
273
#endif  // ABSL_CONTAINER_INTERNAL_COMPRESSED_TUPLE_H_