Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext

Class new_allocator<>

boost::container::new_allocator<void> — Specialization of new_allocator for void types.

Synopsis

// In header: <boost/container/new_allocator.hpp>


class new_allocator<> {
public:
  // types
  typedef                    ;                            
  typedef                  ;                               
  typedef            ;                         
  typedef  ;  // A integral constant of type bool with value true. 
  typedef  ;                         // A integral constant of type bool with value true. 
  typedef                  ;                             
  typedef            ;                       
  typedef             ;                             
  typedef          ;                       

  // member classes/structs/unions
  
  struct rebind {
    // types
    typedef  ;
  };

  // construct/copy/destruct
  () ;
  () ;
  template<typename T2> () ;
   () ;

  // public member functions
   ();
   (, ) ;
   () ;

  // friend functions
   (, ) ;
   (, ) ;
   (, ) ;
};

Description

new_allocator public construct/copy/destruct

  1. () ;

    Default constructor Never throws

  2. () ;

    Constructor from other new_allocator. Never throws

  3. template<typename T2> () ;

    Constructor from related new_allocator. Never throws

  4.  () ;

    Copy assignment operator from other new_allocator. Never throws

new_allocator public member functions

  1.  ( count);

    Allocates memory for an array of count elements. Throws bad_alloc if there is no enough memory

  2.  ( ptr,  n) ;

    Deallocates previously allocated memory. Never throws

  3.  () ;

    Returns the maximum number of elements that could be allocated. Never throws

new_allocator friend functions

  1.  (, ) ;

    Swaps two allocators, does nothing because this new_allocator is stateless

  2.  (, ) ;

    An new_allocator always compares to true, as memory allocated with one instance can be deallocated by another instance

  3.  (, ) ;

    An new_allocator always compares to false, as memory allocated with one instance can be deallocated by another instance


PrevUpHomeNext