Skip to content

Commit d93289e

Browse files
committed
Make sure assert's are executed also in release mode when examples are tested in release mode.
1 parent d62ead4 commit d93289e

19 files changed

Lines changed: 53 additions & 17 deletions

example/doc_adaptive_pool.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77
// See http://www.boost.org/libs/interprocess for documentation.
88
//
99
//////////////////////////////////////////////////////////////////////////////
10-
10+
#ifdef NDEBUG
11+
#undef NDEBUG
12+
#endif
1113
#include <boost/interprocess/detail/workaround.hpp>
1214
//[doc_adaptive_pool
1315
#include <boost/interprocess/managed_shared_memory.hpp>

example/doc_allocator.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77
// See http://www.boost.org/libs/interprocess for documentation.
88
//
99
//////////////////////////////////////////////////////////////////////////////
10-
10+
#ifdef NDEBUG
11+
#undef NDEBUG
12+
#endif
1113
#include <boost/interprocess/detail/workaround.hpp>
1214
//[doc_allocator
1315
#include <boost/interprocess/managed_shared_memory.hpp>

example/doc_bufferstream.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77
// See http://www.boost.org/libs/interprocess for documentation.
88
//
99
//////////////////////////////////////////////////////////////////////////////
10-
10+
#ifdef NDEBUG
11+
#undef NDEBUG
12+
#endif
1113
#include <boost/interprocess/detail/workaround.hpp>
1214
//[doc_bufferstream
1315
#include <boost/interprocess/managed_shared_memory.hpp>

example/doc_cached_adaptive_pool.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77
// See http://www.boost.org/libs/interprocess for documentation.
88
//
99
//////////////////////////////////////////////////////////////////////////////
10-
10+
#ifdef NDEBUG
11+
#undef NDEBUG
12+
#endif
1113
#include <boost/interprocess/detail/workaround.hpp>
1214
//[doc_cached_adaptive_pool
1315
#include <boost/interprocess/managed_shared_memory.hpp>

example/doc_cached_node_allocator.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77
// See http://www.boost.org/libs/interprocess for documentation.
88
//
99
//////////////////////////////////////////////////////////////////////////////
10-
10+
#ifdef NDEBUG
11+
#undef NDEBUG
12+
#endif
1113
#include <boost/interprocess/detail/workaround.hpp>
1214
//[doc_cached_node_allocator
1315
#include <boost/interprocess/managed_shared_memory.hpp>

example/doc_managed_aligned_allocation.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@
77
// See http://www.boost.org/libs/interprocess for documentation.
88
//
99
//////////////////////////////////////////////////////////////////////////////
10+
11+
#ifdef NDEBUG
12+
#undef NDEBUG
13+
#endif
1014
//[doc_managed_aligned_allocation
1115
#include <boost/interprocess/managed_shared_memory.hpp>
1216
#include <cassert>

example/doc_managed_allocation_command.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
//
99
//////////////////////////////////////////////////////////////////////////////
1010

11+
#ifdef NDEBUG
12+
#undef NDEBUG
13+
#endif
1114
//[doc_managed_allocation_command
1215
#include <boost/interprocess/managed_shared_memory.hpp>
1316
#include <cassert>

example/doc_managed_construction_info.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77
// See http://www.boost.org/libs/interprocess for documentation.
88
//
99
//////////////////////////////////////////////////////////////////////////////
10-
10+
#ifdef NDEBUG
11+
#undef NDEBUG
12+
#endif
1113
//[doc_managed_construction_info
1214
#include <boost/interprocess/managed_shared_memory.hpp>
1315
#include <cassert>

example/doc_managed_grow.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77
// See http://www.boost.org/libs/interprocess for documentation.
88
//
99
//////////////////////////////////////////////////////////////////////////////
10-
10+
#ifdef NDEBUG
11+
#undef NDEBUG
12+
#endif
1113
//[doc_managed_grow
1214
#include <boost/interprocess/managed_shared_memory.hpp>
1315
#include <boost/interprocess/managed_mapped_file.hpp>

example/doc_managed_heap_memory.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,16 @@
77
// See http://www.boost.org/libs/interprocess for documentation.
88
//
99
//////////////////////////////////////////////////////////////////////////////
10-
10+
#ifdef NDEBUG
11+
#undef NDEBUG
12+
#endif
1113
#include <boost/interprocess/detail/workaround.hpp>
1214
//[doc_managed_heap_memory
1315
#include <boost/container/list.hpp>
1416
#include <boost/interprocess/managed_heap_memory.hpp>
1517
#include <boost/interprocess/allocators/allocator.hpp>
1618
#include <cstddef>
19+
#include <cassert>
1720

1821
using namespace boost::interprocess;
1922
typedef boost::container::list<int, allocator<int, managed_heap_memory::segment_manager> >

0 commit comments

Comments
 (0)