When a function is specified noexcept , the compiler does not generate any code to throw exceptions and any uncaught exception will result in a call to std::terminate.
in allocator.h, ~MemoryPoolAllocator() is specified noexcept, but it calls delete, which will throw exception.
~MemoryPoolAllocator() RAPIDJSON_NOEXCEPT {
...
RAPIDJSON_DELETE(a);
}
define RAPIDJSON_DELETE(x) delete x
And MemoryPoolAllocator& operator=(), too.
Is it intentional to do so?
Could we move "RAPIDJSON_NOEXCEPT" here?
When a function is specified noexcept , the compiler does not generate any code to throw exceptions and any uncaught exception will result in a call to std::terminate.
in allocator.h, ~MemoryPoolAllocator() is specified noexcept, but it calls delete, which will throw exception. ~MemoryPoolAllocator() RAPIDJSON_NOEXCEPT { ... RAPIDJSON_DELETE(a); }
define RAPIDJSON_DELETE(x) delete x
And MemoryPoolAllocator& operator=(), too.
Is it intentional to do so? Could we move "RAPIDJSON_NOEXCEPT" here?