debug.h File Reference

#include <cassert>
#include <stddef.h>
#include <bits/stl_iterator_base_types.h>
#include <bits/type_traits.h>

Go to the source code of this file.

Namespaces

namespace  __gnu_debug

Defines

#define _GLIBCXX_DEBUG_DEBUG_H   1
#define _GLIBCXX_DEBUG_VERIFY(_Condition, _ErrorMessage)
#define __glibcxx_check_valid_range(_First, _Last)
#define __glibcxx_check_insert(_Position)
#define __glibcxx_check_insert_range(_Position, _First, _Last)
#define __glibcxx_check_erase(_Position)
#define __glibcxx_check_erase_range(_First, _Last)
#define __glibcxx_check_subscript(_N)
#define __glibcxx_check_nonempty()
#define __glibcxx_check_strict_weak_ordering(_First, _Last)   _GLIBCXX_DEBUG_ASSERT(_First == _Last || !(*_First < *_First))
#define __glibcxx_check_strict_weak_ordering_pred(_First, _Last, _Pred)   _GLIBCXX_DEBUG_ASSERT(_First == _Last || !_Pred(*_First, *_First))
#define __glibcxx_check_sorted(_First, _Last)
#define __glibcxx_check_sorted_pred(_First, _Last, _Pred)
#define __glibcxx_check_partitioned(_First, _Last, _Value)
#define __glibcxx_check_partitioned_pred(_First, _Last, _Value, _Pred)
#define __glibcxx_check_heap(_First, _Last)
#define __glibcxx_check_heap_pred(_First, _Last, _Pred)
#define __glibcxx_check_string(_String)
#define __glibcxx_check_string_len(_String, _Len)
#define _GLIBCXX_DEBUG_ASSERT(_Condition)
#define _GLIBCXX_DEBUG_PEDASSERT(_Condition)
#define __glibcxx_requires_cond(_Cond, _Msg)
#define __glibcxx_requires_valid_range(_First, _Last)
#define __glibcxx_requires_sorted(_First, _Last)
#define __glibcxx_requires_sorted_pred(_First, _Last, _Pred)
#define __glibcxx_requires_partitioned(_First, _Last, _Value)
#define __glibcxx_requires_partitioned_pred(_First, _Last, _Value, _Pred)
#define __glibcxx_requires_heap(_First, _Last)
#define __glibcxx_requires_heap_pred(_First, _Last, _Pred)
#define __glibcxx_requires_nonempty()
#define __glibcxx_requires_string(_String)
#define __glibcxx_requires_string_len(_String, _Len)
#define __glibcxx_requires_subscript(_N)


Define Documentation

#define __glibcxx_check_erase _Position   ) 
 

Value:

_GLIBCXX_DEBUG_VERIFY(_Position._M_dereferenceable(),           \
              _M_message(::__gnu_debug::__msg_erase_bad)    \
                      ._M_sequence(*this, "this")           \
              ._M_iterator(_Position, #_Position));     \
_GLIBCXX_DEBUG_VERIFY(_Position._M_attached_to(this),           \
              _M_message(::__gnu_debug::__msg_erase_different) \
              ._M_sequence(*this, "this")           \
              ._M_iterator(_Position, #_Position))
Verify that we can erase the element referenced by the iterator _Position. We can erase the element if the _Position iterator is dereferenceable and references this sequence.

Definition at line 102 of file debug.h.

Referenced by __gnu_debug_def::vector< _Tp, _Allocator >::erase(), __gnu_debug::basic_string< _CharT, _Traits, _Allocator >::erase(), __gnu_debug_def::set< _Key, _Compare, _Allocator >::erase(), __gnu_debug_def::multiset< _Key, _Compare, _Allocator >::erase(), __gnu_debug_def::multimap< _Key, _Tp, _Compare, _Allocator >::erase(), __gnu_debug_def::map< _Key, _Tp, _Compare, _Allocator >::erase(), __gnu_debug_def::list< _Tp, _Allocator >::erase(), __gnu_debug_def::hash_set< _Value, _HashFcn, _EqualKey, _Alloc >::erase(), __gnu_debug_def::hash_multiset< _Value, _HashFcn, _EqualKey, _Alloc >::erase(), __gnu_debug_def::hash_multimap< _Value, _Tp, _HashFcn, _EqualKey, _Alloc >::erase(), __gnu_debug_def::hash_map< _Value, _Tp, _HashFcn, _EqualKey, _Alloc >::erase(), and __gnu_debug_def::deque< _Tp, _Allocator >::erase().

#define __glibcxx_check_erase_range _First,
_Last   ) 
 

Value:

__glibcxx_check_valid_range(_First,_Last);              \
_GLIBCXX_DEBUG_VERIFY(_First._M_attached_to(this),          \
              _M_message(::__gnu_debug::__msg_erase_different) \
                      ._M_sequence(*this, "this")           \
              ._M_iterator(_First, #_First)         \
              ._M_iterator(_Last, #_Last))
Verify that we can erase the elements in the iterator range [_First, _Last). We can erase the elements if [_First, _Last) is a valid iterator range within this sequence.

Definition at line 116 of file debug.h.

Referenced by __gnu_debug_def::vector< _Tp, _Allocator >::erase(), __gnu_debug::basic_string< _CharT, _Traits, _Allocator >::erase(), __gnu_debug_def::set< _Key, _Compare, _Allocator >::erase(), __gnu_debug_def::multiset< _Key, _Compare, _Allocator >::erase(), __gnu_debug_def::multimap< _Key, _Tp, _Compare, _Allocator >::erase(), __gnu_debug_def::map< _Key, _Tp, _Compare, _Allocator >::erase(), __gnu_debug_def::list< _Tp, _Allocator >::erase(), __gnu_debug_def::hash_set< _Value, _HashFcn, _EqualKey, _Alloc >::erase(), __gnu_debug_def::hash_multiset< _Value, _HashFcn, _EqualKey, _Alloc >::erase(), __gnu_debug_def::hash_multimap< _Value, _Tp, _HashFcn, _EqualKey, _Alloc >::erase(), __gnu_debug_def::hash_map< _Value, _Tp, _HashFcn, _EqualKey, _Alloc >::erase(), __gnu_debug_def::deque< _Tp, _Allocator >::erase(), and __gnu_debug::basic_string< _CharT, _Traits, _Allocator >::replace().

#define __glibcxx_check_heap _First,
_Last   ) 
 

Value:

__glibcxx_check_valid_range(_First,_Last);              \
_GLIBCXX_DEBUG_VERIFY(::std::__is_heap(_First, _Last),      \
              _M_message(::__gnu_debug::__msg_not_heap) \
              ._M_iterator(_First, #_First)         \
              ._M_iterator(_Last, #_Last))

Definition at line 193 of file debug.h.

#define __glibcxx_check_heap_pred _First,
_Last,
_Pred   ) 
 

Value:

__glibcxx_check_valid_range(_First,_Last);              \
_GLIBCXX_DEBUG_VERIFY(::std::__is_heap(_First, _Last, _Pred),       \
              _M_message(::__gnu_debug::__msg_not_heap_pred) \
                      ._M_iterator(_First, #_First)         \
              ._M_iterator(_Last, #_Last)           \
              ._M_string(#_Pred))
Verify that the iterator range [_First, _Last) is a heap w.r.t. the predicate _Pred.

Definition at line 202 of file debug.h.

#define __glibcxx_check_insert _Position   ) 
 

Value:

_GLIBCXX_DEBUG_VERIFY(!_Position._M_singular(),             \
              _M_message(::__gnu_debug::__msg_insert_singular) \
              ._M_sequence(*this, "this")           \
              ._M_iterator(_Position, #_Position));     \
_GLIBCXX_DEBUG_VERIFY(_Position._M_attached_to(this),           \
              _M_message(::__gnu_debug::__msg_insert_different) \
              ._M_sequence(*this, "this")           \
              ._M_iterator(_Position, #_Position))
Verify that we can insert into *this with the iterator _Position. Insertion into a container at a specific position requires that the iterator be nonsingular (i.e., either dereferenceable or past-the-end) and that it reference the sequence we are inserting into. Note that this macro is only valid when the container is a _Safe_sequence and the iterator is a _Safe_iterator.

Definition at line 64 of file debug.h.

Referenced by __gnu_debug_def::vector< _Tp, _Allocator >::insert(), __gnu_debug::basic_string< _CharT, _Traits, _Allocator >::insert(), __gnu_debug_def::set< _Key, _Compare, _Allocator >::insert(), __gnu_debug_def::multiset< _Key, _Compare, _Allocator >::insert(), __gnu_debug_def::multimap< _Key, _Tp, _Compare, _Allocator >::insert(), __gnu_debug_def::map< _Key, _Tp, _Compare, _Allocator >::insert(), __gnu_debug_def::list< _Tp, _Allocator >::insert(), __gnu_debug_def::deque< _Tp, _Allocator >::insert(), and __gnu_debug_def::list< _Tp, _Allocator >::splice().

#define __glibcxx_check_insert_range _Position,
_First,
_Last   ) 
 

Value:

__glibcxx_check_valid_range(_First,_Last);              \
_GLIBCXX_DEBUG_VERIFY(!_Position._M_singular(),             \
              _M_message(::__gnu_debug::__msg_insert_singular) \
                      ._M_sequence(*this, "this")           \
              ._M_iterator(_Position, #_Position));     \
_GLIBCXX_DEBUG_VERIFY(_Position._M_attached_to(this),           \
              _M_message(::__gnu_debug::__msg_insert_different) \
              ._M_sequence(*this, "this")           \
              ._M_iterator(_Position, #_Position))
Verify that we can insert the values in the iterator range [_First, _Last) into *this with the iterator _Position. Insertion into a container at a specific position requires that the iterator be nonsingular (i.e., either dereferenceable or past-the-end), that it reference the sequence we are inserting into, and that the iterator range [_First, Last) is a valid (possibly empty) range. Note that this macro is only valid when the container is a _Safe_sequence and the iterator is a _Safe_iterator.

We would like to be able to check for noninterference of _Position and the range [_First, _Last), but that can't (in general) be done.

Definition at line 87 of file debug.h.

Referenced by __gnu_debug_def::vector< _Tp, _Allocator >::insert(), __gnu_debug::basic_string< _CharT, _Traits, _Allocator >::insert(), __gnu_debug_def::list< _Tp, _Allocator >::insert(), and __gnu_debug_def::deque< _Tp, _Allocator >::insert().

 
#define __glibcxx_check_nonempty  ) 
 

Value:

_GLIBCXX_DEBUG_VERIFY(! this->empty(),                  \
              _M_message(::__gnu_debug::__msg_empty)    \
                      ._M_sequence(*this, "this"))

Definition at line 133 of file debug.h.

Referenced by __gnu_debug_def::vector< _Tp, _Allocator >::back(), __gnu_debug_def::list< _Tp, _Allocator >::back(), __gnu_debug_def::deque< _Tp, _Allocator >::back(), __gnu_debug_def::vector< _Tp, _Allocator >::front(), __gnu_debug_def::list< _Tp, _Allocator >::front(), __gnu_debug_def::deque< _Tp, _Allocator >::front(), __gnu_debug_def::vector< _Tp, _Allocator >::pop_back(), __gnu_debug_def::list< _Tp, _Allocator >::pop_back(), __gnu_debug_def::deque< _Tp, _Allocator >::pop_back(), __gnu_debug_def::list< _Tp, _Allocator >::pop_front(), and __gnu_debug_def::deque< _Tp, _Allocator >::pop_front().

#define __glibcxx_check_partitioned _First,
_Last,
_Value   ) 
 

Value:

__glibcxx_check_valid_range(_First,_Last);              \
_GLIBCXX_DEBUG_VERIFY(::__gnu_debug::__check_partitioned(_First, _Last, \
                             _Value),   \
              _M_message(::__gnu_debug::__msg_unpartitioned) \
              ._M_iterator(_First, #_First)         \
              ._M_iterator(_Last, #_Last)           \
              ._M_string(#_Value))
Verify that the iterator range [_First, _Last) is partitioned w.r.t. the value _Value.

Definition at line 171 of file debug.h.

#define __glibcxx_check_partitioned_pred _First,
_Last,
_Value,
_Pred   ) 
 

Value:

__glibcxx_check_valid_range(_First,_Last);              \
_GLIBCXX_DEBUG_VERIFY(::__gnu_debug::__check_partitioned(_First, _Last, \
                             _Value, _Pred), \
              _M_message(::__gnu_debug::__msg_unpartitioned_pred) \
              ._M_iterator(_First, #_First)         \
              ._M_iterator(_Last, #_Last)           \
              ._M_string(#_Pred)                \
                      ._M_string(#_Value))
Verify that the iterator range [_First, _Last) is partitioned w.r.t. the value _Value and predicate _Pred.

Definition at line 182 of file debug.h.

#define __glibcxx_check_sorted _First,
_Last   ) 
 

Value:

__glibcxx_check_valid_range(_First,_Last);              \
__glibcxx_check_strict_weak_ordering(_First,_Last);         \
_GLIBCXX_DEBUG_VERIFY(::__gnu_debug::__check_sorted(_First, _Last), \
              _M_message(::__gnu_debug::__msg_unsorted) \
                      ._M_iterator(_First, #_First)         \
              ._M_iterator(_Last, #_Last))

Definition at line 150 of file debug.h.

Referenced by __gnu_debug_def::list< _Tp, _Allocator >::merge().

#define __glibcxx_check_sorted_pred _First,
_Last,
_Pred   ) 
 

Value:

__glibcxx_check_valid_range(_First,_Last);              \
__glibcxx_check_strict_weak_ordering_pred(_First,_Last,_Pred);          \
_GLIBCXX_DEBUG_VERIFY(::__gnu_debug::__check_sorted(_First, _Last, _Pred), \
              _M_message(::__gnu_debug::__msg_unsorted_pred) \
                      ._M_iterator(_First, #_First)         \
              ._M_iterator(_Last, #_Last)           \
              ._M_string(#_Pred))
Verify that the iterator range [_First, _Last) is sorted by the predicate _Pred.

Definition at line 160 of file debug.h.

Referenced by __gnu_debug_def::list< _Tp, _Allocator >::merge().

#define __glibcxx_check_strict_weak_ordering _First,
_Last   )     _GLIBCXX_DEBUG_ASSERT(_First == _Last || !(*_First < *_First))
 

Definition at line 140 of file debug.h.

#define __glibcxx_check_strict_weak_ordering_pred _First,
_Last,
_Pred   )     _GLIBCXX_DEBUG_ASSERT(_First == _Last || !_Pred(*_First, *_First))
 

Definition at line 145 of file debug.h.

#define __glibcxx_check_string _String   ) 
 

Definition at line 215 of file debug.h.

Referenced by __gnu_debug::basic_string< _CharT, _Traits, _Allocator >::append(), __gnu_debug::basic_string< _CharT, _Traits, _Allocator >::assign(), __gnu_debug::basic_string< _CharT, _Traits, _Allocator >::compare(), __gnu_debug::basic_string< _CharT, _Traits, _Allocator >::find(), __gnu_debug::basic_string< _CharT, _Traits, _Allocator >::find_first_not_of(), __gnu_debug::basic_string< _CharT, _Traits, _Allocator >::find_first_of(), __gnu_debug::basic_string< _CharT, _Traits, _Allocator >::find_last_not_of(), __gnu_debug::basic_string< _CharT, _Traits, _Allocator >::find_last_of(), __gnu_debug::basic_string< _CharT, _Traits, _Allocator >::insert(), __gnu_debug::operator!=(), __gnu_debug::operator+(), __gnu_debug::basic_string< _CharT, _Traits, _Allocator >::operator+=(), __gnu_debug::operator<(), __gnu_debug::operator<=(), __gnu_debug::basic_string< _CharT, _Traits, _Allocator >::operator=(), __gnu_debug::operator==(), __gnu_debug::operator>(), __gnu_debug::operator>=(), __gnu_debug::basic_string< _CharT, _Traits, _Allocator >::replace(), and __gnu_debug::basic_string< _CharT, _Traits, _Allocator >::rfind().

#define __glibcxx_check_string_len _String,
_Len   ) 
 

Definition at line 216 of file debug.h.

Referenced by __gnu_debug::basic_string< _CharT, _Traits, _Allocator >::append(), __gnu_debug::basic_string< _CharT, _Traits, _Allocator >::assign(), __gnu_debug::basic_string< _CharT, _Traits, _Allocator >::compare(), __gnu_debug::basic_string< _CharT, _Traits, _Allocator >::copy(), __gnu_debug::basic_string< _CharT, _Traits, _Allocator >::find_first_not_of(), __gnu_debug::basic_string< _CharT, _Traits, _Allocator >::replace(), and __gnu_debug::basic_string< _CharT, _Traits, _Allocator >::rfind().

#define __glibcxx_check_subscript _N   ) 
 

Value:

_GLIBCXX_DEBUG_VERIFY(_N < this->size(),                \
              _M_message(::__gnu_debug::__msg_subscript_oob) \
                      ._M_sequence(*this, "this")           \
              ._M_integer(_N, #_N)              \
              ._M_integer(this->size(), "size"))

Definition at line 125 of file debug.h.

Referenced by __gnu_debug_def::vector< _Tp, _Allocator >::operator[](), __gnu_debug::basic_string< _CharT, _Traits, _Allocator >::operator[](), __gnu_debug_def::deque< _Tp, _Allocator >::operator[](), and __gnu_debug_def::bitset< _Nb >::operator[]().

#define __glibcxx_check_valid_range _First,
_Last   ) 
 

Value:

_GLIBCXX_DEBUG_VERIFY(::__gnu_debug::__valid_range(_First, _Last),  \
              _M_message(::__gnu_debug::__msg_valid_range)  \
              ._M_iterator(_First, #_First)         \
              ._M_iterator(_Last, #_Last))

Definition at line 51 of file debug.h.

Referenced by __gnu_debug::basic_string< _CharT, _Traits, _Allocator >::append(), __gnu_debug_def::vector< _Tp, _Allocator >::assign(), __gnu_debug::basic_string< _CharT, _Traits, _Allocator >::assign(), __gnu_debug_def::list< _Tp, _Allocator >::assign(), __gnu_debug_def::deque< _Tp, _Allocator >::assign(), __gnu_debug_def::set< _Key, _Compare, _Allocator >::insert(), __gnu_debug_def::multiset< _Key, _Compare, _Allocator >::insert(), __gnu_debug_def::multimap< _Key, _Tp, _Compare, _Allocator >::insert(), __gnu_debug_def::map< _Key, _Tp, _Compare, _Allocator >::insert(), __gnu_debug_def::hash_set< _Value, _HashFcn, _EqualKey, _Alloc >::insert(), __gnu_debug_def::hash_multiset< _Value, _HashFcn, _EqualKey, _Alloc >::insert(), __gnu_debug_def::hash_multimap< _Value, _Tp, _HashFcn, _EqualKey, _Alloc >::insert(), __gnu_debug_def::hash_map< _Value, _Tp, _HashFcn, _EqualKey, _Alloc >::insert(), __gnu_debug::basic_string< _CharT, _Traits, _Allocator >::replace(), and __gnu_debug_def::list< _Tp, _Allocator >::splice().

#define __glibcxx_requires_cond _Cond,
_Msg   ) 
 

Definition at line 258 of file debug.h.

Referenced by std::istreambuf_iterator< _CharT, _Traits >::operator *(), std::istream_iterator< _Tp, _CharT, _Traits, _Dist >::operator *(), std::istreambuf_iterator< _CharT, _Traits >::operator++(), std::istream_iterator< _Tp, _CharT, _Traits, _Dist >::operator++(), and std::ostream_iterator< _Tp, _CharT, _Traits >::operator=().

#define __glibcxx_requires_heap _First,
_Last   ) 
 

Definition at line 264 of file debug.h.

Referenced by std::pop_heap().

#define __glibcxx_requires_heap_pred _First,
_Last,
_Pred   ) 
 

Definition at line 265 of file debug.h.

Referenced by std::pop_heap(), std::push_heap(), and std::sort_heap().

 
#define __glibcxx_requires_nonempty  ) 
 

Definition at line 266 of file debug.h.

Referenced by std::queue< _Tp, _Sequence >::back(), std::queue< _Tp, _Sequence >::front(), std::stack< _Tp, _Sequence >::pop(), std::priority_queue< _Tp, _Sequence, _Compare >::pop(), std::queue< _Tp, _Sequence >::pop(), std::stack< _Tp, _Sequence >::top(), and std::priority_queue< _Tp, _Sequence, _Compare >::top().

#define __glibcxx_requires_partitioned _First,
_Last,
_Value   ) 
 

Definition at line 262 of file debug.h.

Referenced by std::binary_search(), std::equal_range(), std::lower_bound(), and std::upper_bound().

#define __glibcxx_requires_partitioned_pred _First,
_Last,
_Value,
_Pred   ) 
 

Definition at line 263 of file debug.h.

Referenced by std::binary_search(), std::equal_range(), std::lower_bound(), and std::upper_bound().

#define __glibcxx_requires_sorted _First,
_Last   ) 
 

Definition at line 260 of file debug.h.

Referenced by std::includes(), std::inplace_merge(), std::merge(), std::set_difference(), std::set_intersection(), std::set_symmetric_difference(), and std::set_union().

#define __glibcxx_requires_sorted_pred _First,
_Last,
_Pred   ) 
 

Definition at line 261 of file debug.h.

Referenced by std::includes(), std::inplace_merge(), std::merge(), std::set_difference(), std::set_intersection(), std::set_symmetric_difference(), and std::set_union().

#define __glibcxx_requires_string _String   ) 
 

Definition at line 267 of file debug.h.

Referenced by std::basic_string< char >::append(), std::basic_string< char >::assign(), std::basic_string< _CharT, _Traits, _Alloc >::compare(), std::basic_string< char >::find(), std::basic_string< char >::find_first_not_of(), std::basic_string< char >::find_first_of(), std::basic_string< char >::find_last_not_of(), std::basic_string< char >::find_last_of(), std::basic_string< char >::insert(), std::operator+(), std::basic_string< char >::replace(), and std::basic_string< char >::rfind().

#define __glibcxx_requires_string_len _String,
_Len   ) 
 

Definition at line 268 of file debug.h.

Referenced by std::basic_string< _CharT, _Traits, _Alloc >::append(), std::basic_string< _CharT, _Traits, _Alloc >::assign(), std::basic_string< _CharT, _Traits, _Alloc >::compare(), std::basic_string< _CharT, _Traits, _Alloc >::copy(), std::basic_string< _CharT, _Traits, _Alloc >::find(), std::basic_string< _CharT, _Traits, _Alloc >::find_first_not_of(), std::basic_string< _CharT, _Traits, _Alloc >::find_first_of(), std::basic_string< _CharT, _Traits, _Alloc >::find_last_not_of(), std::basic_string< _CharT, _Traits, _Alloc >::find_last_of(), std::basic_string< _CharT, _Traits, _Alloc >::insert(), std::basic_string< _CharT, _Traits, _Alloc >::replace(), and std::basic_string< _CharT, _Traits, _Alloc >::rfind().

#define __glibcxx_requires_subscript _N   ) 
 

Definition at line 269 of file debug.h.

Referenced by std::valarray< _Tp >::operator[]().

#define __glibcxx_requires_valid_range _First,
_Last   ) 
 

Definition at line 259 of file debug.h.

Referenced by std::accumulate(), std::adjacent_difference(), std::adjacent_find(), std::copy(), std::copy_backward(), std::count(), __gnu_cxx::count(), std::count_if(), __gnu_cxx::count_if(), std::equal(), std::fill(), std::find(), std::find_end(), std::find_first_of(), std::find_if(), std::for_each(), std::generate(), std::inner_product(), __gnu_cxx::is_heap(), __gnu_cxx::is_sorted(), std::lexicographical_compare(), __gnu_cxx::lexicographical_compare_3way(), std::make_heap(), std::max_element(), std::min_element(), std::mismatch(), std::next_permutation(), std::nth_element(), std::partial_sort(), std::partial_sort_copy(), std::partial_sum(), std::partition(), std::pop_heap(), std::prev_permutation(), std::priority_queue< _Tp, _Sequence, _Compare >::priority_queue(), std::push_heap(), __gnu_cxx::random_sample(), __gnu_cxx::random_sample_n(), std::random_shuffle(), std::remove(), std::remove_copy(), std::remove_copy_if(), std::remove_if(), std::replace(), std::basic_string< char >::replace(), std::replace_copy(), std::replace_copy_if(), std::replace_if(), std::reverse(), std::reverse_copy(), std::rotate(), std::rotate_copy(), std::search(), std::search_n(), std::sort(), std::sort_heap(), std::stable_partition(), std::stable_sort(), std::swap_ranges(), std::transform(), std::unique(), and std::unique_copy().

#define _GLIBCXX_DEBUG_ASSERT _Condition   ) 
 

Macros used by the implementation outside of debug wrappers to verify certain properties. The __glibcxx_requires_xxx macros are merely wrappers around the __glibcxx_check_xxx wrappers when we are compiling with debug mode, but disappear when we are in release mode so that there is no checking performed in, e.g., the standard library algorithms.

Definition at line 256 of file debug.h.

Referenced by __gnu_debug::__check_string(), __gnu_debug::__check_valid_range(), std::valarray< _Tp >::max(), std::valarray< _Tp >::min(), std::valarray< _Tp >::operator=(), std::basic_string< char >::operator[](), and std::valarray< _Tp >::sum().

#define _GLIBCXX_DEBUG_DEBUG_H   1
 

Definition at line 32 of file debug.h.

#define _GLIBCXX_DEBUG_PEDASSERT _Condition   ) 
 

Definition at line 257 of file debug.h.

Referenced by std::basic_string< char >::erase(), std::basic_string< char >::insert(), and std::basic_string< char >::replace().

#define _GLIBCXX_DEBUG_VERIFY _Condition,
_ErrorMessage   ) 
 

Value:

do {                                    \
    if (! (_Condition))                         \
      ::__gnu_debug::_Error_formatter::_M_at(__FILE__, __LINE__)    \
      ._ErrorMessage._M_error();                    \
  } while (false)
Macros used by the implementation to verify certain properties. These macros may only be used directly by the debug wrappers. Note that these are macros (instead of the more obviously "correct" choice of making them functions) because we need line and file information at the call site, to minimize the distance between the user error and where the error is reported.

Definition at line 43 of file debug.h.

Referenced by __gnu_debug::_Safe_iterator< _Iterator, _Sequence >::_Safe_iterator(), __gnu_debug_def::bitset< _Nb >::reference::flip(), __gnu_debug::_Safe_iterator< _Iterator, _Sequence >::operator *(), __gnu_debug_def::bitset< _Nb >::reference::operator bool(), __gnu_debug::operator!=(), __gnu_debug::_Safe_iterator< _Iterator, _Sequence >::operator++(), __gnu_debug::_Safe_iterator< _Iterator, _Sequence >::operator+=(), __gnu_debug::operator-(), __gnu_debug::_Safe_iterator< _Iterator, _Sequence >::operator--(), __gnu_debug::_Safe_iterator< _Iterator, _Sequence >::operator-=(), __gnu_debug::_Safe_iterator< _Iterator, _Sequence >::operator->(), __gnu_debug::operator<(), __gnu_debug::operator<=(), __gnu_debug::_Safe_iterator< _Iterator, _Sequence >::operator=(), __gnu_debug_def::bitset< _Nb >::reference::operator=(), __gnu_debug::operator==(), __gnu_debug::operator>(), __gnu_debug::operator>=(), __gnu_debug::basic_string< _CharT, _Traits, _Allocator >::operator[](), __gnu_debug::_Safe_iterator< _Iterator, _Sequence >::operator[](), __gnu_debug_def::bitset< _Nb >::reference::operator~(), and __gnu_debug_def::list< _Tp, _Allocator >::splice().


Generated on Tue Jan 30 17:31:56 2007 for GNU C++ STL by doxygen 1.3.6