mirror of
https://github.com/boostorg/core.git
synced 2025-11-29 05:40:14 +01:00
Fix deprecated warning ignores in allocator_access.hpp, and add compile test for pmr allocator
This commit is contained in:
22
test/allocator_pmr_test.cpp
Normal file
22
test/allocator_pmr_test.cpp
Normal 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)
|
||||
Reference in New Issue
Block a user