Skip to content

Commit 3000309

Browse files
committed
Unblock __cpp_lib_constexpr_dynamic_alloc for all compilers that suppport constexpr allocations
1 parent 9b9c2bc commit 3000309

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

stl/inc/xmemory

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1274,7 +1274,7 @@ struct _Fake_proxy_ptr_impl { // fake replacement for a container proxy smart po
12741274

12751275
struct _Basic_container_proxy_ptr12 {
12761276
// smart pointer components for a _Container_proxy * that don't depend on the allocator
1277-
_Container_proxy* _Ptr;
1277+
_Container_proxy* _Ptr = nullptr;
12781278

12791279
constexpr void _Release() noexcept { // disengage this _Basic_container_proxy_ptr12
12801280
_Ptr = nullptr;

stl/inc/yvals_core.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1183,10 +1183,9 @@
11831183
#define __cpp_lib_constexpr_algorithms 201806L
11841184
#define __cpp_lib_constexpr_complex 201711L
11851185

1186-
#if defined(__cpp_constexpr_dynamic_alloc) \
1187-
&& defined(__clang__) // TRANSITION, MSVC support for constexpr dynamic allocation
1186+
#ifdef __cpp_constexpr_dynamic_alloc
11881187
#define __cpp_lib_constexpr_dynamic_alloc 201907L
1189-
#endif // defined(__cpp_constexpr_dynamic_alloc) && defined(__clang__)
1188+
#endif // __cpp_constexpr_dynamic_alloc
11901189

11911190
#define __cpp_lib_constexpr_functional 201907L
11921191
#define __cpp_lib_constexpr_iterator 201811L

tests/std/tests/VSO_0157762_feature_test_macros/test.compile.pass.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -411,8 +411,7 @@ STATIC_ASSERT(__cpp_lib_constexpr_complex == 201711L);
411411
#endif
412412
#endif
413413

414-
#if _HAS_CXX20 && defined(__cpp_constexpr_dynamic_alloc) \
415-
&& defined(__clang__) // TRANSITION, MSVC support for constexpr dynamic allocation
414+
#if _HAS_CXX20 && defined(__cpp_constexpr_dynamic_alloc)
416415
#ifndef __cpp_lib_constexpr_dynamic_alloc
417416
#error __cpp_lib_constexpr_dynamic_alloc is not defined
418417
#elif __cpp_lib_constexpr_dynamic_alloc != 201907L

0 commit comments

Comments
 (0)