You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
The text was updated successfully, but these errors were encountered:
EstherWx
changed the title
Throw exception in functions which is specified noexcept
Throw exception in functions which is specified as noexcept
Dec 25, 2023
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?
The text was updated successfully, but these errors were encountered: