File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -1281,6 +1281,14 @@ _LIBCPP_FUNC_VIS extern "C" void __sanitizer_annotate_contiguous_container(
1281
1281
#define _LIBCPP_HAS_NO_IS_AGGREGATE
1282
1282
#endif
1283
1283
1284
+ #ifndef _LIBCPP_TRIVIALLY_RELOCATABLE
1285
+ #if __has_extension(trivially_relocatable)
1286
+ #define _LIBCPP_TRIVIALLY_RELOCATABLE (x ) [[clang::trivially_relocatable(x)]]
1287
+ #else
1288
+ #define _LIBCPP_TRIVIALLY_RELOCATABLE (x )
1289
+ #endif
1290
+ #endif
1291
+
1284
1292
#if !defined(__cpp_coroutines) || __cpp_coroutines < 201703L
1285
1293
#define _LIBCPP_HAS_NO_COROUTINES
1286
1294
#endif
Original file line number Diff line number Diff line change @@ -581,7 +581,7 @@ using __optional_sfinae_assign_base_t = __sfinae_assign_base<
581
581
>;
582
582
583
583
template <class _Tp >
584
- class optional
584
+ class _LIBCPP_TRIVIALLY_RELOCATABLE (is_trivially_relocatable<_Tp>::value) optional
585
585
: private __optional_move_assign_base<_Tp>
586
586
, private __optional_sfinae_ctor_base_t <_Tp>
587
587
, private __optional_sfinae_assign_base_t <_Tp>
You can’t perform that action at this time.
0 commit comments