22
22
#include " absl/base/attributes.h"
23
23
#include " absl/log/absl_check.h"
24
24
#include " absl/strings/string_view.h"
25
+ #include " absl/types/span.h"
25
26
#include " base/internal/data.h"
26
27
#include " base/kind.h"
27
28
#include " base/type.h"
@@ -69,13 +70,17 @@ class WrapperType : public Type, base_internal::InlineData {
69
70
const Handle <Type>& wrapped () const ;
70
71
71
72
private:
73
+ friend class Type ;
72
74
friend class BoolWrapperType ;
73
75
friend class BytesWrapperType ;
74
76
friend class DoubleWrapperType ;
75
77
friend class IntWrapperType ;
76
78
friend class StringWrapperType ;
77
79
friend class UintWrapperType ;
78
80
81
+ // See Type::aliases().
82
+ absl::Span<const absl::string_view> aliases () const ;
83
+
79
84
using Base::Base;
80
85
};
81
86
@@ -189,6 +194,7 @@ class DoubleWrapperType final : public WrapperType {
189
194
const Handle <DoubleType>& wrapped () const { return DoubleType::Get (); }
190
195
191
196
private:
197
+ friend class WrapperType ;
192
198
friend class TypeFactory ;
193
199
template <size_t Size , size_t Align>
194
200
friend struct base_internal ::AnyData;
@@ -202,6 +208,9 @@ class DoubleWrapperType final : public WrapperType {
202
208
<< base_internal::kInlineVariantShift );
203
209
204
210
constexpr DoubleWrapperType () : WrapperType(kMetadata ) {}
211
+
212
+ // See Type::aliases().
213
+ absl::Span<const absl::string_view> aliases () const ;
205
214
};
206
215
207
216
class IntWrapperType final : public WrapperType {
@@ -226,6 +235,7 @@ class IntWrapperType final : public WrapperType {
226
235
const Handle <IntType>& wrapped () const { return IntType::Get (); }
227
236
228
237
private:
238
+ friend class WrapperType ;
229
239
friend class TypeFactory ;
230
240
template <size_t Size , size_t Align>
231
241
friend struct base_internal ::AnyData;
@@ -239,6 +249,9 @@ class IntWrapperType final : public WrapperType {
239
249
<< base_internal::kInlineVariantShift );
240
250
241
251
constexpr IntWrapperType () : WrapperType(kMetadata ) {}
252
+
253
+ // See Type::aliases().
254
+ absl::Span<const absl::string_view> aliases () const ;
242
255
};
243
256
244
257
class StringWrapperType final : public WrapperType {
@@ -300,6 +313,7 @@ class UintWrapperType final : public WrapperType {
300
313
const Handle <UintType>& wrapped () const { return UintType::Get (); }
301
314
302
315
private:
316
+ friend class WrapperType ;
303
317
friend class TypeFactory ;
304
318
template <size_t Size , size_t Align>
305
319
friend struct base_internal ::AnyData;
@@ -313,6 +327,9 @@ class UintWrapperType final : public WrapperType {
313
327
<< base_internal::kInlineVariantShift );
314
328
315
329
constexpr UintWrapperType () : WrapperType(kMetadata ) {}
330
+
331
+ // See Type::aliases().
332
+ absl::Span<const absl::string_view> aliases () const ;
316
333
};
317
334
318
335
extern template class Handle <WrapperType>;
0 commit comments