From d93289e0502944335fa34cc71903c42492c0a1e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ion=20Gazta=C3=B1aga?= Date: Sat, 3 Jan 2026 22:55:57 +0100 Subject: [PATCH] Make sure assert's are executed also in release mode when examples are tested in release mode. --- example/doc_adaptive_pool.cpp | 4 +++- example/doc_allocator.cpp | 4 +++- example/doc_bufferstream.cpp | 4 +++- example/doc_cached_adaptive_pool.cpp | 4 +++- example/doc_cached_node_allocator.cpp | 4 +++- example/doc_managed_aligned_allocation.cpp | 4 ++++ example/doc_managed_allocation_command.cpp | 3 +++ example/doc_managed_construction_info.cpp | 4 +++- example/doc_managed_grow.cpp | 4 +++- example/doc_managed_heap_memory.cpp | 5 ++++- example/doc_managed_multiple_allocation.cpp | 1 - example/doc_named_alloc.cpp | 1 - example/doc_node_allocator.cpp | 4 +++- example/doc_private_adaptive_pool.cpp | 4 +++- example/doc_private_node_allocator.cpp | 4 +++- example/doc_shared_ptr.cpp | 4 +++- example/doc_shared_ptr_explicit.cpp | 4 +++- example/doc_unique_ptr.cpp | 4 +++- example/doc_vectorstream.cpp | 4 +++- 19 files changed, 53 insertions(+), 17 deletions(-) diff --git a/example/doc_adaptive_pool.cpp b/example/doc_adaptive_pool.cpp index 04d5bb0..3b3f6f8 100644 --- a/example/doc_adaptive_pool.cpp +++ b/example/doc_adaptive_pool.cpp @@ -7,7 +7,9 @@ // See http://www.boost.org/libs/interprocess for documentation. // ////////////////////////////////////////////////////////////////////////////// - +#ifdef NDEBUG +#undef NDEBUG +#endif #include //[doc_adaptive_pool #include diff --git a/example/doc_allocator.cpp b/example/doc_allocator.cpp index ded7e9e..98705f8 100644 --- a/example/doc_allocator.cpp +++ b/example/doc_allocator.cpp @@ -7,7 +7,9 @@ // See http://www.boost.org/libs/interprocess for documentation. // ////////////////////////////////////////////////////////////////////////////// - +#ifdef NDEBUG +#undef NDEBUG +#endif #include //[doc_allocator #include diff --git a/example/doc_bufferstream.cpp b/example/doc_bufferstream.cpp index 9ce0e3b..0613af5 100644 --- a/example/doc_bufferstream.cpp +++ b/example/doc_bufferstream.cpp @@ -7,7 +7,9 @@ // See http://www.boost.org/libs/interprocess for documentation. // ////////////////////////////////////////////////////////////////////////////// - +#ifdef NDEBUG +#undef NDEBUG +#endif #include //[doc_bufferstream #include diff --git a/example/doc_cached_adaptive_pool.cpp b/example/doc_cached_adaptive_pool.cpp index 7bc729b..1a45e94 100644 --- a/example/doc_cached_adaptive_pool.cpp +++ b/example/doc_cached_adaptive_pool.cpp @@ -7,7 +7,9 @@ // See http://www.boost.org/libs/interprocess for documentation. // ////////////////////////////////////////////////////////////////////////////// - +#ifdef NDEBUG +#undef NDEBUG +#endif #include //[doc_cached_adaptive_pool #include diff --git a/example/doc_cached_node_allocator.cpp b/example/doc_cached_node_allocator.cpp index 49514e6..3a918c0 100644 --- a/example/doc_cached_node_allocator.cpp +++ b/example/doc_cached_node_allocator.cpp @@ -7,7 +7,9 @@ // See http://www.boost.org/libs/interprocess for documentation. // ////////////////////////////////////////////////////////////////////////////// - +#ifdef NDEBUG +#undef NDEBUG +#endif #include //[doc_cached_node_allocator #include diff --git a/example/doc_managed_aligned_allocation.cpp b/example/doc_managed_aligned_allocation.cpp index b36a0ed..b17e681 100644 --- a/example/doc_managed_aligned_allocation.cpp +++ b/example/doc_managed_aligned_allocation.cpp @@ -7,6 +7,10 @@ // See http://www.boost.org/libs/interprocess for documentation. // ////////////////////////////////////////////////////////////////////////////// + +#ifdef NDEBUG +#undef NDEBUG +#endif //[doc_managed_aligned_allocation #include #include diff --git a/example/doc_managed_allocation_command.cpp b/example/doc_managed_allocation_command.cpp index fb88856..b6f4bdd 100644 --- a/example/doc_managed_allocation_command.cpp +++ b/example/doc_managed_allocation_command.cpp @@ -8,6 +8,9 @@ // ////////////////////////////////////////////////////////////////////////////// +#ifdef NDEBUG +#undef NDEBUG +#endif //[doc_managed_allocation_command #include #include diff --git a/example/doc_managed_construction_info.cpp b/example/doc_managed_construction_info.cpp index 84dae3a..a2d7fc1 100644 --- a/example/doc_managed_construction_info.cpp +++ b/example/doc_managed_construction_info.cpp @@ -7,7 +7,9 @@ // See http://www.boost.org/libs/interprocess for documentation. // ////////////////////////////////////////////////////////////////////////////// - +#ifdef NDEBUG +#undef NDEBUG +#endif //[doc_managed_construction_info #include #include diff --git a/example/doc_managed_grow.cpp b/example/doc_managed_grow.cpp index 78cb892..d1bb752 100644 --- a/example/doc_managed_grow.cpp +++ b/example/doc_managed_grow.cpp @@ -7,7 +7,9 @@ // See http://www.boost.org/libs/interprocess for documentation. // ////////////////////////////////////////////////////////////////////////////// - +#ifdef NDEBUG +#undef NDEBUG +#endif //[doc_managed_grow #include #include diff --git a/example/doc_managed_heap_memory.cpp b/example/doc_managed_heap_memory.cpp index 944f1fb..f5421c1 100644 --- a/example/doc_managed_heap_memory.cpp +++ b/example/doc_managed_heap_memory.cpp @@ -7,13 +7,16 @@ // See http://www.boost.org/libs/interprocess for documentation. // ////////////////////////////////////////////////////////////////////////////// - +#ifdef NDEBUG +#undef NDEBUG +#endif #include //[doc_managed_heap_memory #include #include #include #include +#include using namespace boost::interprocess; typedef boost::container::list > diff --git a/example/doc_managed_multiple_allocation.cpp b/example/doc_managed_multiple_allocation.cpp index 08aab71..bd32c3d 100644 --- a/example/doc_managed_multiple_allocation.cpp +++ b/example/doc_managed_multiple_allocation.cpp @@ -14,7 +14,6 @@ //[doc_managed_multiple_allocation #include #include //boost::move -#include //assert #include //std::memset #include //std::nothrow #include //std::vector diff --git a/example/doc_named_alloc.cpp b/example/doc_named_alloc.cpp index 96120eb..ce24707 100644 --- a/example/doc_named_alloc.cpp +++ b/example/doc_named_alloc.cpp @@ -13,7 +13,6 @@ #include #include //std::system #include -#include #include //<- #include "../test/get_process_id_name.hpp" diff --git a/example/doc_node_allocator.cpp b/example/doc_node_allocator.cpp index 4c59489..e0fba34 100644 --- a/example/doc_node_allocator.cpp +++ b/example/doc_node_allocator.cpp @@ -7,7 +7,9 @@ // See http://www.boost.org/libs/interprocess for documentation. // ////////////////////////////////////////////////////////////////////////////// - +#ifdef NDEBUG +#undef NDEBUG +#endif #include //[doc_node_allocator #include diff --git a/example/doc_private_adaptive_pool.cpp b/example/doc_private_adaptive_pool.cpp index 616bc15..87ad703 100644 --- a/example/doc_private_adaptive_pool.cpp +++ b/example/doc_private_adaptive_pool.cpp @@ -7,7 +7,9 @@ // See http://www.boost.org/libs/interprocess for documentation. // ////////////////////////////////////////////////////////////////////////////// - +#ifdef NDEBUG +#undef NDEBUG +#endif #include //[doc_private_adaptive_pool #include diff --git a/example/doc_private_node_allocator.cpp b/example/doc_private_node_allocator.cpp index 60188f3..8cafea5 100644 --- a/example/doc_private_node_allocator.cpp +++ b/example/doc_private_node_allocator.cpp @@ -7,7 +7,9 @@ // See http://www.boost.org/libs/interprocess for documentation. // ////////////////////////////////////////////////////////////////////////////// - +#ifdef NDEBUG +#undef NDEBUG +#endif #include //[doc_private_node_allocator #include diff --git a/example/doc_shared_ptr.cpp b/example/doc_shared_ptr.cpp index c051540..ba9def3 100644 --- a/example/doc_shared_ptr.cpp +++ b/example/doc_shared_ptr.cpp @@ -8,7 +8,9 @@ // See http://www.boost.org/libs/interprocess for documentation. // ////////////////////////////////////////////////////////////////////////////// - +#ifdef NDEBUG +#undef NDEBUG +#endif #include //[doc_shared_ptr diff --git a/example/doc_shared_ptr_explicit.cpp b/example/doc_shared_ptr_explicit.cpp index 6789913..74648de 100644 --- a/example/doc_shared_ptr_explicit.cpp +++ b/example/doc_shared_ptr_explicit.cpp @@ -8,7 +8,9 @@ // See http://www.boost.org/libs/interprocess for documentation. // ////////////////////////////////////////////////////////////////////////////// - +#ifdef NDEBUG +#undef NDEBUG +#endif #include //[doc_shared_ptr_explicit diff --git a/example/doc_unique_ptr.cpp b/example/doc_unique_ptr.cpp index 9564fdd..197f7c0 100644 --- a/example/doc_unique_ptr.cpp +++ b/example/doc_unique_ptr.cpp @@ -8,7 +8,9 @@ // See http://www.boost.org/libs/interprocess for documentation. // ////////////////////////////////////////////////////////////////////////////// - +#ifdef NDEBUG +#undef NDEBUG +#endif #include //[doc_unique_ptr diff --git a/example/doc_vectorstream.cpp b/example/doc_vectorstream.cpp index 68bcac9..da1df29 100644 --- a/example/doc_vectorstream.cpp +++ b/example/doc_vectorstream.cpp @@ -7,7 +7,9 @@ // See http://www.boost.org/libs/interprocess for documentation. // ////////////////////////////////////////////////////////////////////////////// - +#ifdef NDEBUG +#undef NDEBUG +#endif #include //[doc_vectorstream #include