From 483eb2f56657e8e7f419ab1a4fab8dce9ade8609 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 27 Apr 2024 20:24:20 +0200 Subject: Adding upstream version 14.2.21. Signed-off-by: Daniel Baumann --- src/boost/libs/pool/test/test_poisoned_macros.cpp | 50 +++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 src/boost/libs/pool/test/test_poisoned_macros.cpp (limited to 'src/boost/libs/pool/test/test_poisoned_macros.cpp') diff --git a/src/boost/libs/pool/test/test_poisoned_macros.cpp b/src/boost/libs/pool/test/test_poisoned_macros.cpp new file mode 100644 index 00000000..072122c2 --- /dev/null +++ b/src/boost/libs/pool/test/test_poisoned_macros.cpp @@ -0,0 +1,50 @@ +/* Copyright (C) 2011 John Maddock +* +* Use, modification and distribution is subject to the +* Boost Software License, Version 1.0. (See accompanying +* file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) +*/ + +// +// Verify that if malloc/free are macros that everything still works OK: +// + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace std{ + + void* undefined_poisoned_symbol1(unsigned x); + void undefined_poisoned_symbol2(void* x); + +} + +#define malloc(x) undefined_poisoned_symbol1(x) +#define free(x) undefined_poisoned_symbol2(x) + +#include +#include +#include +#include + +template class boost::object_pool; +template class boost::object_pool; + +template class boost::pool; +template class boost::pool; + +template class boost::pool_allocator; +template class boost::pool_allocator; +template class boost::fast_pool_allocator; +template class boost::fast_pool_allocator; + +template class boost::simple_segregated_storage; + +template class boost::singleton_pool; -- cgit v1.2.3