Ticket #2095: boost_pool_no_exceptions.diff

File boost_pool_no_exceptions.diff, 1.3 KB (added by anonymous, 14 years ago)
  • boost/pool/pool_alloc.hpp

    diff -r 510d5bd079ad boost/pool/pool_alloc.hpp
    a b  
    1414// new, std::bad_alloc
    1515#include <new>
    1616
     17#include <boost/throw_exception.hpp>
    1718#include <boost/pool/poolfwd.hpp>
    1819
    1920// boost::singleton_pool
     
    9596          singleton_pool<pool_allocator_tag, sizeof(T), UserAllocator, Mutex,
    9697              NextSize>::ordered_malloc(n) );
    9798      if (ret == 0)
    98         throw std::bad_alloc();
     99          boost::throw_exception(std::bad_alloc());
    99100      return ret;
    100101    }
    101102    static pointer allocate(const size_type n, const void * const)
     
    182183              singleton_pool<fast_pool_allocator_tag, sizeof(T),
    183184                  UserAllocator, Mutex, NextSize>::ordered_malloc(n) );
    184185      if (ret == 0)
    185         throw std::bad_alloc();
     186          boost::throw_exception(std::bad_alloc());
    186187      return ret;
    187188    }
    188189    static pointer allocate(const size_type n, const void * const)
     
    193194          singleton_pool<fast_pool_allocator_tag, sizeof(T),
    194195              UserAllocator, Mutex, NextSize>::malloc() );
    195196      if (ret == 0)
    196         throw std::bad_alloc();
     197          boost::throw_exception(std::bad_alloc());
    197198      return ret;
    198199    }
    199200    static void deallocate(const pointer ptr, const size_type n)