Fix deprecated warning ignores in allocator_access.hpp, and add compile test for pmr allocator

This commit is contained in:
Braden Ganetsky
2024-03-17 20:12:06 -05:00
parent 8cc2fdad76
commit a973490f53
3 changed files with 43 additions and 6 deletions

View File

@@ -0,0 +1,22 @@
//
// Testing stdlib polymorphic allocators
//
// Copyright 2024 Braden Ganetsky
//
// Distributed under the Boost Software License, Version 1.0.
// See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt
//
#include <boost/core/allocator_access.hpp>
#include <boost/config.hpp>
#ifndef BOOST_NO_CXX17_HDR_MEMORY_RESOURCE
#include <memory_resource>
void pmr_allocator_destroy_compiles(std::pmr::polymorphic_allocator<int>& alloc, int* p)
{
boost::allocator_destroy(alloc, p);
}
#endif // !defined(BOOST_NO_CXX17_HDR_MEMORY_RESOURCE)