From 9b1a6e6d32915cfc24eacd5d6b4ba68d1d74eb74 Mon Sep 17 00:00:00 2001 From: Ivan Maidanski Date: Fri, 14 Apr 2023 09:06:56 +0300 Subject: Allow gc_allocator and friends to be defined in namespace boehmgc The client should define GC_NAMESPACE_ALLOCATOR before include gc_allocator.h to have all symbols of the latter to be defined in namespace boehmgc. * docs/README.macros (GC_NAMESPACE_ALLOCATOR): Document. * include/gc/gc_allocator.h [GC_NAMESPACE_ALLOCATOR] (GC_true_type, GC_false_type, GC_type_traits, GC_DECLARE_PTRFREE, GC_selective_alloc, gc_allocator, gc_allocator_ignore_off_page, traceable_allocator): Define symbols (all) in boehmgc namespace. * tests/cpp.cc (GC_NAMESPACE_ALLOCATOR): Define macro (before include gc_allocator.h). * tests/cpp.cc (gc_allocator, gc_allocator_ignore_off_page, traceable_allocator): Using the symbol of namespace boehmgc. --- tests/cpp.cc | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tests') diff --git a/tests/cpp.cc b/tests/cpp.cc index 0aa9d835..4d97b8e0 100644 --- a/tests/cpp.cc +++ b/tests/cpp.cc @@ -27,7 +27,11 @@ #include #include +#define GC_NAMESPACE_ALLOCATOR #include "gc/gc_allocator.h" +using boehmgc::gc_allocator; +using boehmgc::gc_allocator_ignore_off_page; +using boehmgc::traceable_allocator; # include "private/gcconfig.h" -- cgit v1.2.1