Skip to content

Commit 7bf8bf0

Browse files
mstorsjomemfrob
authored andcommitted
[libcxx] [test] Fix experimental/memory.resource.adaptor.mem/db_deallocate on Windows
The checks within the libc++experimental memory_resource class uses this limit: _MaxAlign = _LIBCPP_ALIGNOF(max_align_t); Therefore, only use max_align_t for this limit instead of using `__STDCPP_DEFAULT_NEW_ALIGNMENT__` if available. Differential Revision: https://reviews.llvm.org/D105905
1 parent 18486c4 commit 7bf8bf0

File tree

1 file changed

+0
-7
lines changed
  • libcxx/test/libcxx/experimental/memory/memory.resource.adaptor/memory.resource.adaptor.mem

1 file changed

+0
-7
lines changed

libcxx/test/libcxx/experimental/memory/memory.resource.adaptor/memory.resource.adaptor.mem/db_deallocate.pass.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@
1414

1515
// T* polymorphic_allocator<T>::deallocate(T*, size_t size)
1616

17-
// XFAIL: LIBCXX-WINDOWS-FIXME
18-
1917
int AssertCount = 0;
2018

2119
#define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : (void)::AssertCount++)
@@ -38,13 +36,8 @@ int main(int, char**)
3836
ex::resource_adaptor<Alloc> r(Alloc{P});
3937
ex::memory_resource & m1 = r;
4038

41-
#ifdef __STDCPP_DEFAULT_NEW_ALIGNMENT__
42-
std::size_t maxSize = std::numeric_limits<std::size_t>::max()
43-
- __STDCPP_DEFAULT_NEW_ALIGNMENT__;
44-
#else
4539
std::size_t maxSize = std::numeric_limits<std::size_t>::max()
4640
- alignof(std::max_align_t);
47-
#endif
4841

4942
m1.deallocate(nullptr, maxSize);
5043
assert(AssertCount == 0);

0 commit comments

Comments
 (0)