Skip to content

Alternative exception handling is unusable with Visual C++ #19

@trueqbit

Description

@trueqbit

The current check for whether exceptions are enabled - #if defined(__EXCEPTIONS) - is not working with Visual C++.

This is a compiler/vendor specific macro. There are official C++ feature test macros available, where __cpp_exceptions is the one to be used here.

Also, in case exceptions are disabled, functions using JSON_THROW() are ending up without a return value, which is pretty bad in production code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions