# throw_allocator.h File Reference

Go to the source code of this file.

## Classes

- struct __gnu_cxx::annotate_base
    Base class for checking address and label information about allocations. Create a std::map between the allocated address (void*) and a datum for annotations, which are a pair of numbers corresponding to label and allocated size. More...
- struct __gnu_cxx::condition_base
    Base struct for condition policy. More...
- struct __gnu_cxx::forced_error
    Thown by exception safety machinery. More...
- struct __gnu_cxx::limit_condition
    Base class for incremental control and throw. More...
- struct __gnu_cxx::limit_condition::always_adjustor
    Always enter the condition. More...
- struct __gnu_cxx::limit_condition::limit_adjustor
    Enter the nth condition. More...
- struct __gnu_cxx::limit_condition::never_adjustor
    Never enter the condition. More...
- struct __gnu_cxx::random_condition
    Base class for random probability control and throw. More...
- struct __gnu_cxx::random_condition::always_adjustor
    Always enter the condition. More...
- struct __gnu_cxx::random_condition::group_adjustor
    Group condition. More...
- struct __gnu_cxx::random_condition::never_adjustor
    Never enter the condition. More...
- class __gnu_cxx::throw_allocator_base< _Tp, _Cond >
    Allocator class with logging and exception generation control. Intended to be used as an allocator_type in templatized code.Note: Deallocate not allowed to throw. More...
- struct __gnu_cxx::throw_allocator_limit< _Tp >
    Allocator throwing via limit condition. More...
- struct __gnu_cxx::throw_allocator_random< _Tp >
    Allocator throwing via random condition. More...
- struct __gnu_cxx::throw_value_base< _Cond >
    Class with exception generation control. Intended to be used as a value_type in templatized code. More...
- struct __gnu_cxx::throw_value_limit
    Type throwing via limit condition. More...
- struct __gnu_cxx::throw_value_random
    Type throwing via random condition. More...
- struct std::hash< __gnu_cxx::throw_value_limit >
    Explicit specialization of std::hash for __gnu_cxx::throw_value_limit. More...
- struct std::hash< __gnu_cxx::throw_value_random >
    Explicit specialization of std::hash for __gnu_cxx::throw_value_limit. More...

## Namespaces

- namespace __gnu_cxx
- namespace std

## Functions

- void __gnu_cxx::__throw_forced_error ()
- template<typename _Tp , typename _Cond > bool __gnu_cxx::operator!= (const throw_allocator_base< _Tp, _Cond > &, const throw_allocator_base< _Tp, _Cond > &)
- template<typename _Cond > throw_value_base< _Cond > __gnu_cxx::operator* (const throw_value_base< _Cond > &__a, const throw_value_base< _Cond > &__b)
- template<typename _Cond > throw_value_base< _Cond > __gnu_cxx::operator+ (const throw_value_base< _Cond > &__a, const throw_value_base< _Cond > &__b)
- template<typename _Cond > throw_value_base< _Cond > __gnu_cxx::operator- (const throw_value_base< _Cond > &__a, const throw_value_base< _Cond > &__b)
- template<typename _Cond > bool __gnu_cxx::operator< (const throw_value_base< _Cond > &__a, const throw_value_base< _Cond > &__b)
- std::ostream & __gnu_cxx::operator<< (std::ostream &os, const annotate_base &__b)
- template<typename _Tp , typename _Cond > bool __gnu_cxx::operator== (const throw_allocator_base< _Tp, _Cond > &, const throw_allocator_base< _Tp, _Cond > &)
- template<typename _Cond > bool __gnu_cxx::operator== (const throw_value_base< _Cond > &__a, const throw_value_base< _Cond > &__b)
- template<typename _Cond > void __gnu_cxx::swap (throw_value_base< _Cond > &__a, throw_value_base< _Cond > &__b)

## Detailed Description

This file is a GNU extension to the Standard C++ Library.

Contains two exception-generating types (throw_value, throw_allocator) intended to be used as value and allocator types while testing exception safety in templatized containers and algorithms. The allocator has additional log and debug features. The exception generated is of type forced_exception_error.

Definition in file throw_allocator.h.