1//===----------------------------------------------------------------------===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
9#ifndef _LIBCPP___CONFIGURATION_ATTRIBUTES_H
10#define _LIBCPP___CONFIGURATION_ATTRIBUTES_H
11
12#include <__config_site>
13#include <__configuration/hardening.h>
14#include <__configuration/language.h>
15#include <__configuration/utility.h>
16
17#ifndef _LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER
18# pragma GCC system_header
19#endif
20
21#ifndef __has_declspec_attribute
22# define __has_declspec_attribute(__x) 0
23#endif
24
25// Attributes relevant for layout ABI
26// ----------------------------------
27
28#if __has_cpp_attribute(msvc::no_unique_address)
29// MSVC implements [[no_unique_address]] as a silent no-op currently.
30// (If/when MSVC breaks its C++ ABI, it will be changed to work as intended.)
31// However, MSVC implements [[msvc::no_unique_address]] which does what
32// [[no_unique_address]] is supposed to do, in general.
33# define _LIBCPP_NO_UNIQUE_ADDRESS [[msvc::no_unique_address]]
34#else
35# define _LIBCPP_NO_UNIQUE_ADDRESS [[__no_unique_address__]]
36#endif
37
38#define _LIBCPP_PACKED __attribute__((__packed__))
39
40// Attributes affecting overload resolution
41// ----------------------------------------
42
43#if __has_attribute(__enable_if__)
44# define _LIBCPP_PREFERRED_OVERLOAD __attribute__((__enable_if__(true, "")))
45#endif
46
47// Visibility attributes
48// ---------------------
49
50#if defined(_LIBCPP_OBJECT_FORMAT_COFF)
51
52# ifdef _DLL
53# define _LIBCPP_CRT_FUNC __declspec(dllimport)
54# else
55# define _LIBCPP_CRT_FUNC
56# endif
57
58# if defined(_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS) || (defined(__MINGW32__) && !defined(_LIBCPP_BUILDING_LIBRARY))
59# define _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS
60# define _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS
61# define _LIBCPP_OVERRIDABLE_FUNC_VIS
62# define _LIBCPP_EXPORTED_FROM_ABI
63# elif defined(_LIBCPP_BUILDING_LIBRARY)
64# if defined(__MINGW32__)
65# define _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS __declspec(dllexport)
66# define _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS
67# else
68# define _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS
69# define _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS __declspec(dllexport)
70# endif
71# define _LIBCPP_OVERRIDABLE_FUNC_VIS __declspec(dllexport)
72# define _LIBCPP_EXPORTED_FROM_ABI __declspec(dllexport)
73# else
74# define _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS __declspec(dllimport)
75# define _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS
76# define _LIBCPP_OVERRIDABLE_FUNC_VIS
77# define _LIBCPP_EXPORTED_FROM_ABI __declspec(dllimport)
78# endif
79
80# define _LIBCPP_HIDDEN
81# define _LIBCPP_TEMPLATE_DATA_VIS
82# define _LIBCPP_NAMESPACE_VISIBILITY
83
84#else
85
86# if !defined(_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS)
87# define _LIBCPP_VISIBILITY(vis) __attribute__((__visibility__(vis)))
88# else
89# define _LIBCPP_VISIBILITY(vis)
90# endif
91
92# define _LIBCPP_HIDDEN _LIBCPP_VISIBILITY("hidden")
93# define _LIBCPP_TEMPLATE_DATA_VIS _LIBCPP_VISIBILITY("default")
94# define _LIBCPP_EXPORTED_FROM_ABI _LIBCPP_VISIBILITY("default")
95# define _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS _LIBCPP_VISIBILITY("default")
96# define _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS
97
98// TODO: Make this a proper customization point or remove the option to override it.
99# ifndef _LIBCPP_OVERRIDABLE_FUNC_VIS
100# define _LIBCPP_OVERRIDABLE_FUNC_VIS _LIBCPP_VISIBILITY("default")
101# endif
102
103# if !defined(_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS) && __has_attribute(__type_visibility__)
104# define _LIBCPP_NAMESPACE_VISIBILITY __attribute__((__type_visibility__("default")))
105# elif !defined(_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS)
106# define _LIBCPP_NAMESPACE_VISIBILITY __attribute__((__visibility__("default")))
107# else
108# define _LIBCPP_NAMESPACE_VISIBILITY
109# endif
110
111#endif // defined(_LIBCPP_OBJECT_FORMAT_COFF)
112
113// hide_from_abi
114// -------------
115
116#define _LIBCPP_ALWAYS_INLINE __attribute__((__always_inline__))
117
118#if __has_attribute(exclude_from_explicit_instantiation)
119# define _LIBCPP_EXCLUDE_FROM_EXPLICIT_INSTANTIATION __attribute__((__exclude_from_explicit_instantiation__))
120#else
121// Try to approximate the effect of exclude_from_explicit_instantiation
122// (which is that entities are not assumed to be provided by explicit
123// template instantiations in the dylib) by always inlining those entities.
124# define _LIBCPP_EXCLUDE_FROM_EXPLICIT_INSTANTIATION _LIBCPP_ALWAYS_INLINE
125#endif
126
127#if _LIBCPP_HARDENING_MODE == _LIBCPP_HARDENING_MODE_FAST
128# define _LIBCPP_HARDENING_SIG f
129#elif _LIBCPP_HARDENING_MODE == _LIBCPP_HARDENING_MODE_EXTENSIVE
130# define _LIBCPP_HARDENING_SIG s
131#elif _LIBCPP_HARDENING_MODE == _LIBCPP_HARDENING_MODE_DEBUG
132# define _LIBCPP_HARDENING_SIG d
133#else
134# define _LIBCPP_HARDENING_SIG n // "none"
135#endif
136
137#if _LIBCPP_ASSERTION_SEMANTIC == _LIBCPP_ASSERTION_SEMANTIC_OBSERVE
138# define _LIBCPP_ASSERTION_SEMANTIC_SIG o
139#elif _LIBCPP_ASSERTION_SEMANTIC == _LIBCPP_ASSERTION_SEMANTIC_QUICK_ENFORCE
140# define _LIBCPP_ASSERTION_SEMANTIC_SIG q
141#elif _LIBCPP_ASSERTION_SEMANTIC == _LIBCPP_ASSERTION_SEMANTIC_ENFORCE
142# define _LIBCPP_ASSERTION_SEMANTIC_SIG e
143#else
144# define _LIBCPP_ASSERTION_SEMANTIC_SIG i // `ignore`
145#endif
146
147#if !_LIBCPP_HAS_EXCEPTIONS
148# define _LIBCPP_EXCEPTIONS_SIG n
149#else
150# define _LIBCPP_EXCEPTIONS_SIG e
151#endif
152
153// clang-format off
154#define _LIBCPP_ODR_SIGNATURE \
155 _LIBCPP_CONCAT(_LIBCPP_CONCAT(_LIBCPP_CONCAT(_LIBCPP_CONCAT( \
156 _LIBCPP_HARDENING_SIG, \
157 _LIBCPP_VERSION), \
158 _LIBCPP_ASSERTION_SEMANTIC_SIG), \
159 _LIBCPP_EXCEPTIONS_SIG), \
160 _LIBCPP_STD_VER)
161// clang-format on
162
163// This macro marks a symbol as being hidden from libc++'s ABI. This is achieved
164// on two levels:
165// 1. The symbol is given hidden visibility, which ensures that users won't start exporting
166// symbols from their dynamic library by means of using the libc++ headers. This ensures
167// that those symbols stay private to the dynamic library in which it is defined.
168//
169// 2. The symbol is given an ABI tag that encodes the ODR-relevant properties of the library.
170// This ensures that no ODR violation can arise from mixing two TUs compiled with different
171// versions or configurations of libc++ (such as exceptions vs no-exceptions). Indeed, if the
172// program contains two definitions of a function, the ODR requires them to be token-by-token
173// equivalent, and the linker is allowed to pick either definition and discard the other one.
174//
175// For example, if a program contains a copy of `vector::at()` compiled with exceptions enabled
176// *and* a copy of `vector::at()` compiled with exceptions disabled (by means of having two TUs
177// compiled with different settings), the two definitions are both visible by the linker and they
178// have the same name, but they have a meaningfully different implementation (one throws an exception
179// and the other aborts the program). This violates the ODR and makes the program ill-formed, and in
180// practice what will happen is that the linker will pick one of the definitions at random and will
181// discard the other one. This can quite clearly lead to incorrect program behavior.
182//
183// A similar reasoning holds for many other properties that are ODR-affecting. Essentially any
184// property that causes the code of a function to differ from the code in another configuration
185// can be considered ODR-affecting. In practice, we don't encode all such properties in the ABI
186// tag, but we encode the ones that we think are most important: library version, exceptions, and
187// hardening mode.
188//
189// Note that historically, solving this problem has been achieved in various ways, including
190// force-inlining all functions or giving internal linkage to all functions. Both these previous
191// solutions suffer from drawbacks that lead notably to code bloat.
192//
193// Note that we use _LIBCPP_EXCLUDE_FROM_EXPLICIT_INSTANTIATION to ensure that we don't depend
194// on _LIBCPP_HIDE_FROM_ABI methods of classes explicitly instantiated in the dynamic library.
195//
196// Also note that the _LIBCPP_HIDE_FROM_ABI_VIRTUAL macro should be used on virtual functions
197// instead of _LIBCPP_HIDE_FROM_ABI. That macro does not use an ABI tag. Indeed, the mangled
198// name of a virtual function is part of its ABI, since some architectures like arm64e can sign
199// the virtual function pointer in the vtable based on the mangled name of the function. Since
200// we use an ABI tag that changes with each released version, the mangled name of the virtual
201// function would change, which is incorrect. Note that it doesn't make much sense to change
202// the implementation of a virtual function in an ABI-incompatible way in the first place,
203// since that would be an ABI break anyway. Hence, the lack of ABI tag should not be noticeable.
204//
205// The macro can be applied to record and enum types. When the tagged type is nested in
206// a record this "parent" record needs to have the macro too. Another use case for applying
207// this macro to records and unions is to apply an ABI tag to inline constexpr variables.
208// This can be useful for inline variables that are implementation details which are expected
209// to change in the future.
210//
211// TODO: We provide a escape hatch with _LIBCPP_NO_ABI_TAG for folks who want to avoid increasing
212// the length of symbols with an ABI tag. In practice, we should remove the escape hatch and
213// use compression mangling instead, see https://github.com/itanium-cxx-abi/cxx-abi/issues/70.
214#ifndef _LIBCPP_NO_ABI_TAG
215# define _LIBCPP_HIDE_FROM_ABI \
216 _LIBCPP_HIDDEN _LIBCPP_EXCLUDE_FROM_EXPLICIT_INSTANTIATION \
217 __attribute__((__abi_tag__(_LIBCPP_TOSTRING(_LIBCPP_ODR_SIGNATURE))))
218#else
219# define _LIBCPP_HIDE_FROM_ABI _LIBCPP_HIDDEN _LIBCPP_EXCLUDE_FROM_EXPLICIT_INSTANTIATION
220#endif
221#define _LIBCPP_HIDE_FROM_ABI_VIRTUAL _LIBCPP_HIDDEN _LIBCPP_EXCLUDE_FROM_EXPLICIT_INSTANTIATION
222
223// This macro makes sure that private classes which aren't necessarily part of the ABI change their name every release.
224// The intention is _not_ to put it on every private class, but only on classes where type name stability implies ABI
225// stability. This is essentially the case for classes that are only accessed through the vtable after instantiation,
226// for example the control blocks of `shared_ptr`. These classes can change in ABI breaking ways as long as their name
227// (and hence their vtable symbol) changes too. Note that the vtable and RTTI are not marked with
228// [[gnu::visibility("hidden")]], since the vtable and RTTI should still be deduplicated across dylibs with the same
229// instatiations.
230#define _LIBCPP_HIDE_STRUCT_FROM_ABI [[__gnu__::__abi_tag__(_LIBCPP_TOSTRING(_LIBCPP_ODR_SIGNATURE))]]
231
232// Optional attributes
233// -------------------
234
235// these are useful for a better QoI, but not required to be available
236
237#define _LIBCPP_NOALIAS __attribute__((__malloc__))
238#define _LIBCPP_NODEBUG [[__gnu__::__nodebug__]]
239#define _LIBCPP_NO_SANITIZE(...) __attribute__((__no_sanitize__(__VA_ARGS__)))
240#define _LIBCPP_INIT_PRIORITY_MAX __attribute__((__init_priority__(100)))
241#define _LIBCPP_ATTRIBUTE_FORMAT(archetype, format_string_index, first_format_arg_index) \
242 __attribute__((__format__(archetype, format_string_index, first_format_arg_index)))
243
244#if __has_attribute(__no_sanitize__) && !defined(_LIBCPP_COMPILER_GCC)
245# define _LIBCPP_NO_CFI __attribute__((__no_sanitize__("cfi")))
246#else
247# define _LIBCPP_NO_CFI
248#endif
249
250#if __has_attribute(__using_if_exists__)
251# define _LIBCPP_USING_IF_EXISTS __attribute__((__using_if_exists__))
252#else
253# define _LIBCPP_USING_IF_EXISTS
254#endif
255
256#if __has_cpp_attribute(_Clang::__no_destroy__)
257# define _LIBCPP_NO_DESTROY [[_Clang::__no_destroy__]]
258#else
259# define _LIBCPP_NO_DESTROY
260#endif
261
262#if __has_attribute(__diagnose_if__)
263# define _LIBCPP_DIAGNOSE_WARNING(...) __attribute__((__diagnose_if__(__VA_ARGS__, "warning")))
264#else
265# define _LIBCPP_DIAGNOSE_WARNING(...)
266#endif
267
268#if __has_attribute(__diagnose_if__)
269# define _LIBCPP_DIAGNOSE_IF(...) __attribute__((__diagnose_if__(__VA_ARGS__)))
270#else
271# define _LIBCPP_DIAGNOSE_IF(...)
272#endif
273
274#define _LIBCPP_DIAGNOSE_NULLPTR_IF(condition, condition_description) \
275 _LIBCPP_DIAGNOSE_IF( \
276 condition, \
277 "null passed to callee that requires a non-null argument" condition_description, \
278 "warning", \
279 "nonnull")
280
281#if __has_cpp_attribute(_Clang::__lifetimebound__)
282# define _LIBCPP_LIFETIMEBOUND [[_Clang::__lifetimebound__]]
283#else
284# define _LIBCPP_LIFETIMEBOUND
285#endif
286
287// This is to work around https://llvm.org/PR156809
288#ifndef _LIBCPP_CXX03_LANG
289# define _LIBCPP_CTOR_LIFETIMEBOUND _LIBCPP_LIFETIMEBOUND
290#else
291# define _LIBCPP_CTOR_LIFETIMEBOUND
292#endif
293
294#if __has_cpp_attribute(_Clang::__noescape__)
295# define _LIBCPP_NOESCAPE [[_Clang::__noescape__]]
296#else
297# define _LIBCPP_NOESCAPE
298#endif
299
300#if __has_cpp_attribute(_Clang::__no_specializations__)
301# define _LIBCPP_NO_SPECIALIZATIONS \
302 [[_Clang::__no_specializations__("Users are not allowed to specialize this standard library entity")]]
303#else
304# define _LIBCPP_NO_SPECIALIZATIONS
305#endif
306
307#if __has_cpp_attribute(_Clang::__preferred_name__)
308# define _LIBCPP_PREFERRED_NAME(x) [[_Clang::__preferred_name__(x)]]
309#else
310# define _LIBCPP_PREFERRED_NAME(x)
311#endif
312
313#if __has_cpp_attribute(_Clang::__scoped_lockable__)
314# define _LIBCPP_SCOPED_LOCKABLE [[_Clang::__scoped_lockable__]]
315#else
316# define _LIBCPP_SCOPED_LOCKABLE
317#endif
318
319#if __has_cpp_attribute(_Clang::__capability__)
320# define _LIBCPP_CAPABILITY(...) [[_Clang::__capability__(__VA_ARGS__)]]
321#else
322# define _LIBCPP_CAPABILITY(...)
323#endif
324
325#if __has_attribute(__acquire_capability__)
326# define _LIBCPP_ACQUIRE_CAPABILITY(...) __attribute__((__acquire_capability__(__VA_ARGS__)))
327#else
328# define _LIBCPP_ACQUIRE_CAPABILITY(...)
329#endif
330
331#if __has_cpp_attribute(_Clang::__try_acquire_capability__)
332# define _LIBCPP_TRY_ACQUIRE_CAPABILITY(...) [[_Clang::__try_acquire_capability__(__VA_ARGS__)]]
333#else
334# define _LIBCPP_TRY_ACQUIRE_CAPABILITY(...)
335#endif
336
337#if __has_cpp_attribute(_Clang::__acquire_shared_capability__)
338# define _LIBCPP_ACQUIRE_SHARED_CAPABILITY [[_Clang::__acquire_shared_capability__]]
339#else
340# define _LIBCPP_ACQUIRE_SHARED_CAPABILITY
341#endif
342
343#if __has_cpp_attribute(_Clang::__try_acquire_shared_capability__)
344# define _LIBCPP_TRY_ACQUIRE_SHARED_CAPABILITY(...) [[_Clang::__try_acquire_shared_capability__(__VA_ARGS__)]]
345#else
346# define _LIBCPP_TRY_ACQUIRE_SHARED_CAPABILITY(...)
347#endif
348
349#if __has_attribute(__release_capability__)
350# define _LIBCPP_RELEASE_CAPABILITY(...) __attribute__((__release_capability__(__VA_ARGS__)))
351#else
352# define _LIBCPP_RELEASE_CAPABILITY(...)
353#endif
354
355#if __has_cpp_attribute(_Clang::__release_shared_capability__)
356# define _LIBCPP_RELEASE_SHARED_CAPABILITY [[_Clang::__release_shared_capability__]]
357#else
358# define _LIBCPP_RELEASE_SHARED_CAPABILITY
359#endif
360
361#if __has_attribute(__requires_capability__)
362# define _LIBCPP_REQUIRES_CAPABILITY(...) __attribute__((__requires_capability__(__VA_ARGS__)))
363#else
364# define _LIBCPP_REQUIRES_CAPABILITY(...)
365#endif
366
367#if __has_cpp_attribute(_Clang::__no_thread_safety_analysis__)
368# define _LIBCPP_NO_THREAD_SAFETY_ANALYSIS [[_Clang::__no_thread_safety_analysis__]]
369#else
370# define _LIBCPP_NO_THREAD_SAFETY_ANALYSIS
371#endif
372
373#if defined(_LIBCPP_ABI_MICROSOFT) && __has_declspec_attribute(empty_bases)
374# define _LIBCPP_DECLSPEC_EMPTY_BASES __declspec(empty_bases)
375#else
376# define _LIBCPP_DECLSPEC_EMPTY_BASES
377#endif
378
379// Allow for build-time disabling of unsigned integer sanitization
380#if __has_attribute(no_sanitize) && !defined(_LIBCPP_COMPILER_GCC)
381# define _LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK __attribute__((__no_sanitize__("unsigned-integer-overflow")))
382#else
383# define _LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK
384#endif
385
386#if __has_feature(nullability)
387# define _LIBCPP_DIAGNOSE_NULLPTR _Nonnull
388#else
389# define _LIBCPP_DIAGNOSE_NULLPTR
390#endif
391
392#if defined(__CUDACC__) || defined(__CUDA_ARCH__) || defined(__CUDA_LIBDEVICE__)
393// The CUDA SDK contains an unfortunate definition for the __noinline__ macro,
394// which breaks the regular __attribute__((__noinline__)) syntax. Therefore,
395// when compiling for CUDA we use the non-underscored version of the noinline
396// attribute.
397//
398// This is a temporary workaround and we still expect the CUDA SDK team to solve
399// this issue properly in the SDK headers.
400//
401// See https://github.com/llvm/llvm-project/pull/73838 for more details.
402# define _LIBCPP_NOINLINE __attribute__((noinline))
403#elif __has_attribute(__noinline__)
404# define _LIBCPP_NOINLINE __attribute__((__noinline__))
405#else
406# define _LIBCPP_NOINLINE
407#endif
408
409// Deprecation macros
410// ------------------
411
412// Deprecations warnings are always enabled, except when users explicitly opt-out
413// by defining _LIBCPP_DISABLE_DEPRECATION_WARNINGS.
414#if !defined(_LIBCPP_DISABLE_DEPRECATION_WARNINGS)
415# if __has_attribute(__deprecated__)
416# define _LIBCPP_DEPRECATED __attribute__((__deprecated__))
417# define _LIBCPP_DEPRECATED_(m) __attribute__((__deprecated__(m)))
418# elif _LIBCPP_STD_VER >= 14
419# define _LIBCPP_DEPRECATED [[deprecated]]
420# define _LIBCPP_DEPRECATED_(m) [[deprecated(m)]]
421# else
422# define _LIBCPP_DEPRECATED
423# define _LIBCPP_DEPRECATED_(m)
424# endif
425#else
426# define _LIBCPP_DEPRECATED
427# define _LIBCPP_DEPRECATED_(m)
428#endif
429
430#if !defined(_LIBCPP_CXX03_LANG)
431# define _LIBCPP_DEPRECATED_IN_CXX11 _LIBCPP_DEPRECATED
432#else
433# define _LIBCPP_DEPRECATED_IN_CXX11
434#endif
435
436#if _LIBCPP_STD_VER >= 14
437# define _LIBCPP_DEPRECATED_IN_CXX14 _LIBCPP_DEPRECATED
438#else
439# define _LIBCPP_DEPRECATED_IN_CXX14
440#endif
441
442#if _LIBCPP_STD_VER >= 17
443# define _LIBCPP_DEPRECATED_IN_CXX17 _LIBCPP_DEPRECATED
444#else
445# define _LIBCPP_DEPRECATED_IN_CXX17
446#endif
447
448#if _LIBCPP_STD_VER >= 20
449# define _LIBCPP_DEPRECATED_IN_CXX20 _LIBCPP_DEPRECATED
450#else
451# define _LIBCPP_DEPRECATED_IN_CXX20
452#endif
453
454#if _LIBCPP_STD_VER >= 23
455# define _LIBCPP_DEPRECATED_IN_CXX23 _LIBCPP_DEPRECATED
456#else
457# define _LIBCPP_DEPRECATED_IN_CXX23
458#endif
459
460#if _LIBCPP_STD_VER >= 26
461# define _LIBCPP_DEPRECATED_IN_CXX26 _LIBCPP_DEPRECATED
462# define _LIBCPP_DEPRECATED_IN_CXX26_(m) _LIBCPP_DEPRECATED_(m)
463#else
464# define _LIBCPP_DEPRECATED_IN_CXX26
465# define _LIBCPP_DEPRECATED_IN_CXX26_(m)
466#endif
467
468#if _LIBCPP_HAS_CHAR8_T
469# define _LIBCPP_DEPRECATED_WITH_CHAR8_T _LIBCPP_DEPRECATED
470#else
471# define _LIBCPP_DEPRECATED_WITH_CHAR8_T
472#endif
473
474#if __has_cpp_attribute(_Clang::__no_field_protection__)
475# define _LIBCPP_DISABLE_POINTER_FIELD_PROTECTION [[_Clang::__no_field_protection__]]
476#else
477# define _LIBCPP_DISABLE_POINTER_FIELD_PROTECTION
478#endif
479
480// TODO(LLVM 25): Remove this escape hatch
481#ifndef _LIBCPP_DISABLE_UNUSED_STRUCT_WARNINGS
482# define _LIBCPP_WARN_UNUSED [[__gnu__::__warn_unused__]]
483#else
484# define _LIBCPP_WARN_UNUSED
485#endif
486
487#endif // _LIBCPP___CONFIGURATION_ATTRIBUTES_H
488