Skip to content

-fno-expection not respected anymore in 3.9.1 #2725

Closed
@ingomueller-net

Description

@ingomueller-net

The solutions described in #296 doe not seem to work anymore in 3.9.1. When compiling with -fno-exceptions (with or without JSON_NOEXCEPTIONS set), I get the following error (using Clang 12.0):

/data/3rdparty/json/single_include/nlohmann/json.hpp:16457:9: error: cannot use 'throw' with exceptions disabled
        throw std::out_of_range("key not found");
        ^
/data/3rdparty/json/single_include/nlohmann/json.hpp:16470:9: error: cannot use 'throw' with exceptions disabled
        throw std::out_of_range("key not found");
        ^
2 errors generated.

Using v3.8.0 works as expected (I have only tried without JSON_NOEXCEPTIONS).

Metadata

Metadata

Assignees

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions