## Class bad_alloc

boost::log::bad_alloc — Base class for memory allocation errors.

## Synopsis

    // In header: <boost/log/exceptions.hpp>

    class bad_alloc : public bad_alloc {
    public:
      // construct/copy/destruct
      explicit bad_alloc(const char *);
      explicit bad_alloc(std::string const &);
      ~bad_alloc();

      // public member functions
      const char * what() const;
    };

## Description

Exceptions derived from this class indicate problems with memory allocation.

### `bad_alloc` public construct/copy/destruct

1.     explicit bad_alloc(const char * descr);

   Initializing constructor. Creates an exception with the specified error message.

2.     explicit bad_alloc(std::string const & descr);

   Initializing constructor. Creates an exception with the specified error message.

3.     ~bad_alloc();

   Destructor

### `bad_alloc` public member functions

1.     const char * what() const;

   Error message accessor.