mirror of
https://github.com/boostorg/container.git
synced 2026-02-25 04:12:27 +00:00
- Replaced default standard exception classes with Boost.Container own classes, reducing considerably the included files overhead
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
#include <boost/container/detail/min_max.hpp>
|
||||
#include <boost/intrusive/detail/math.hpp>
|
||||
#include <boost/container/throw_exception.hpp>
|
||||
#include <new>
|
||||
|
||||
|
||||
#include <cstddef>
|
||||
@@ -135,8 +136,14 @@ void *monotonic_buffer_resource::allocate_from_current(std::size_t aligner, std:
|
||||
|
||||
void* monotonic_buffer_resource::do_allocate(std::size_t bytes, std::size_t alignment)
|
||||
{
|
||||
if(alignment > memory_resource::max_align)
|
||||
if(alignment > memory_resource::max_align){
|
||||
(void)bytes; (void)alignment;
|
||||
#if defined(BOOST_CONTAINER_USER_DEFINED_THROW_CALLBACKS) || defined(BOOST_NO_EXCEPTIONS)
|
||||
throw_bad_alloc();
|
||||
#else
|
||||
throw std::bad_alloc();
|
||||
#endif
|
||||
}
|
||||
|
||||
//See if there is room in current buffer
|
||||
std::size_t aligner = 0u;
|
||||
|
||||
Reference in New Issue
Block a user