From 4c9c8bb875ec695050341a51714603c1b0284ab0 Mon Sep 17 00:00:00 2001 From: mutouyun Date: Mon, 14 Nov 2022 21:46:17 +0800 Subject: [PATCH] fix: [test] fatal error C1083 cannot open include file 'memory_resource' --- test/pmr/test_pmr_allocator.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/pmr/test_pmr_allocator.cpp b/test/pmr/test_pmr_allocator.cpp index d90abf9..266e23c 100644 --- a/test/pmr/test_pmr_allocator.cpp +++ b/test/pmr/test_pmr_allocator.cpp @@ -1,6 +1,8 @@ #include +#if defined(LIBIMP_CPP_17) && defined(__cpp_lib_memory_resource) #include +#endif #include "gtest/gtest.h" @@ -11,8 +13,10 @@ TEST(allocator, detail) { EXPECT_FALSE(pmr::detail::has_allocate::value); EXPECT_FALSE(pmr::detail::has_allocate>::value); EXPECT_TRUE (pmr::detail::has_allocate>::value); +#if defined(LIBIMP_CPP_17) && defined(__cpp_lib_memory_resource) EXPECT_TRUE (pmr::detail::has_allocate::value); EXPECT_TRUE (pmr::detail::has_allocate>::value); +#endif } TEST(allocator, construct) {