| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
#ifndef _GLIBCXX_DEBUG_MACRO_SWITCH_H |
| 30 |
#define _GLIBCXX_DEBUG_MACRO_SWITCH_H 1 |
| 31 |
|
| 32 |
|
| 33 |
|
| 34 |
|
| 35 |
|
| 36 |
|
| 37 |
|
| 38 |
|
| 39 |
|
| 40 |
#include <debug/assertions.h> |
| 41 |
|
| 42 |
|
| 43 |
|
| 44 |
|
| 45 |
|
| 46 |
|
| 47 |
|
| 48 |
namespace std |
| 49 |
{ |
| 50 |
namespace __debug { } |
| 51 |
} |
| 52 |
|
| 53 |
|
| 54 |
|
| 55 |
|
| 56 |
namespace __gnu_debug |
| 57 |
{ |
| 58 |
using namespace std::__debug; |
| 59 |
|
| 60 |
template<typename _Ite, typename _Seq, typename _Cat> |
| 61 |
struct _Safe_iterator; |
| 62 |
} |
| 63 |
|
| 64 |
#if ! defined _GLIBCXX_DEBUG || ! _GLIBCXX_HOSTED |
| 65 |
|
| 66 |
# define __glibcxx_requires_cond(_Cond,_Msg) |
| 67 |
# define __glibcxx_requires_valid_range(_First,_Last) |
| 68 |
# define __glibcxx_requires_can_increment(_First,_Size) |
| 69 |
# define __glibcxx_requires_can_increment_range(_First1,_Last1,_First2) |
| 70 |
# define __glibcxx_requires_can_decrement_range(_First1,_Last1,_First2) |
| 71 |
# define __glibcxx_requires_sorted(_First,_Last) |
| 72 |
# define __glibcxx_requires_sorted_pred(_First,_Last,_Pred) |
| 73 |
# define __glibcxx_requires_sorted_set(_First1,_Last1,_First2) |
| 74 |
# define __glibcxx_requires_sorted_set_pred(_First1,_Last1,_First2,_Pred) |
| 75 |
# define __glibcxx_requires_partitioned_lower(_First,_Last,_Value) |
| 76 |
# define __glibcxx_requires_partitioned_upper(_First,_Last,_Value) |
| 77 |
# define __glibcxx_requires_partitioned_lower_pred(_First,_Last,_Value,_Pred) |
| 78 |
# define __glibcxx_requires_partitioned_upper_pred(_First,_Last,_Value,_Pred) |
| 79 |
# define __glibcxx_requires_heap(_First,_Last) |
| 80 |
# define __glibcxx_requires_heap_pred(_First,_Last,_Pred) |
| 81 |
# define __glibcxx_requires_string(_String) |
| 82 |
# define __glibcxx_requires_string_len(_String,_Len) |
| 83 |
# define __glibcxx_requires_irreflexive(_First,_Last) |
| 84 |
# define __glibcxx_requires_irreflexive2(_First,_Last) |
| 85 |
# define __glibcxx_requires_irreflexive_pred(_First,_Last,_Pred) |
| 86 |
# define __glibcxx_requires_irreflexive_pred2(_First,_Last,_Pred) |
| 87 |
|
| 88 |
#else |
| 89 |
|
| 90 |
# include <debug/macros.h> |
| 91 |
|
| 92 |
# define __glibcxx_requires_cond(_Cond,_Msg) _GLIBCXX_DEBUG_VERIFY(_Cond,_Msg) |
| 93 |
# define __glibcxx_requires_valid_range(_First,_Last) \ |
| 94 |
__glibcxx_check_valid_range(_First,_Last) |
| 95 |
# define __glibcxx_requires_can_increment(_First,_Size) \ |
| 96 |
__glibcxx_check_can_increment(_First,_Size) |
| 97 |
# define __glibcxx_requires_can_increment_range(_First1,_Last1,_First2) \ |
| 98 |
__glibcxx_check_can_increment_range(_First1,_Last1,_First2) |
| 99 |
# define __glibcxx_requires_can_decrement_range(_First1,_Last1,_First2) \ |
| 100 |
__glibcxx_check_can_decrement_range(_First1,_Last1,_First2) |
| 101 |
# define __glibcxx_requires_sorted(_First,_Last) \ |
| 102 |
__glibcxx_check_sorted(_First,_Last) |
| 103 |
# define __glibcxx_requires_sorted_pred(_First,_Last,_Pred) \ |
| 104 |
__glibcxx_check_sorted_pred(_First,_Last,_Pred) |
| 105 |
# define __glibcxx_requires_sorted_set(_First1,_Last1,_First2) \ |
| 106 |
__glibcxx_check_sorted_set(_First1,_Last1,_First2) |
| 107 |
# define __glibcxx_requires_sorted_set_pred(_First1,_Last1,_First2,_Pred) \ |
| 108 |
__glibcxx_check_sorted_set_pred(_First1,_Last1,_First2,_Pred) |
| 109 |
# define __glibcxx_requires_partitioned_lower(_First,_Last,_Value) \ |
| 110 |
__glibcxx_check_partitioned_lower(_First,_Last,_Value) |
| 111 |
# define __glibcxx_requires_partitioned_upper(_First,_Last,_Value) \ |
| 112 |
__glibcxx_check_partitioned_upper(_First,_Last,_Value) |
| 113 |
# define __glibcxx_requires_partitioned_lower_pred(_First,_Last,_Value,_Pred) \ |
| 114 |
__glibcxx_check_partitioned_lower_pred(_First,_Last,_Value,_Pred) |
| 115 |
# define __glibcxx_requires_partitioned_upper_pred(_First,_Last,_Value,_Pred) \ |
| 116 |
__glibcxx_check_partitioned_upper_pred(_First,_Last,_Value,_Pred) |
| 117 |
# define __glibcxx_requires_heap(_First,_Last) \ |
| 118 |
__glibcxx_check_heap(_First,_Last) |
| 119 |
# define __glibcxx_requires_heap_pred(_First,_Last,_Pred) \ |
| 120 |
__glibcxx_check_heap_pred(_First,_Last,_Pred) |
| 121 |
# if __cplusplus < 201103L |
| 122 |
# define __glibcxx_requires_string(_String) \ |
| 123 |
_GLIBCXX_DEBUG_PEDASSERT(_String != 0) |
| 124 |
# define __glibcxx_requires_string_len(_String,_Len) \ |
| 125 |
_GLIBCXX_DEBUG_PEDASSERT(_String != 0 || _Len == 0) |
| 126 |
# else |
| 127 |
# define __glibcxx_requires_string(_String) \ |
| 128 |
_GLIBCXX_DEBUG_PEDASSERT(_String != nullptr) |
| 129 |
# define __glibcxx_requires_string_len(_String,_Len) \ |
| 130 |
_GLIBCXX_DEBUG_PEDASSERT(_String != nullptr || _Len == 0) |
| 131 |
# endif |
| 132 |
# define __glibcxx_requires_irreflexive(_First,_Last) \ |
| 133 |
__glibcxx_check_irreflexive(_First,_Last) |
| 134 |
# define __glibcxx_requires_irreflexive2(_First,_Last) \ |
| 135 |
__glibcxx_check_irreflexive2(_First,_Last) |
| 136 |
# define __glibcxx_requires_irreflexive_pred(_First,_Last,_Pred) \ |
| 137 |
__glibcxx_check_irreflexive_pred(_First,_Last,_Pred) |
| 138 |
# define __glibcxx_requires_irreflexive_pred2(_First,_Last,_Pred) \ |
| 139 |
__glibcxx_check_irreflexive_pred2(_First,_Last,_Pred) |
| 140 |
|
| 141 |
# include <debug/functions.h> |
| 142 |
|
| 143 |
#endif |
| 144 |
|
| 145 |
#endif |