1
0
forked from boostorg/core

Remove null check in allocate

This commit is contained in:
Glen Fernandes
2019-04-25 02:32:31 -04:00
parent 2eaed5b9e9
commit ba79489ea1

View File

@ -78,9 +78,6 @@ struct default_allocator {
if (n > max_size()) {
boost::throw_exception(std::bad_alloc());
}
if (!n) {
return 0;
}
void* p = ::operator new(sizeof(T) * n, std::nothrow);
if (!p) {
boost::throw_exception(std::bad_alloc());