mirror of
https://github.com/mutouyun/cpp-ipc.git
synced 2025-12-06 16:56:45 +08:00
fix: [test] fatal error C1083 cannot open include file 'memory_resource'
This commit is contained in:
parent
a392b88787
commit
4c9c8bb875
@ -1,6 +1,8 @@
|
||||
|
||||
#include <vector>
|
||||
#if defined(LIBIMP_CPP_17) && defined(__cpp_lib_memory_resource)
|
||||
#include <memory_resource>
|
||||
#endif
|
||||
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
@ -11,8 +13,10 @@ TEST(allocator, detail) {
|
||||
EXPECT_FALSE(pmr::detail::has_allocate<int>::value);
|
||||
EXPECT_FALSE(pmr::detail::has_allocate<std::vector<int>>::value);
|
||||
EXPECT_TRUE (pmr::detail::has_allocate<std::allocator<int>>::value);
|
||||
#if defined(LIBIMP_CPP_17) && defined(__cpp_lib_memory_resource)
|
||||
EXPECT_TRUE (pmr::detail::has_allocate<std::pmr::memory_resource>::value);
|
||||
EXPECT_TRUE (pmr::detail::has_allocate<std::pmr::polymorphic_allocator<int>>::value);
|
||||
#endif
|
||||
}
|
||||
|
||||
TEST(allocator, construct) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user