Commit 0a9ec38f authored by Remy Jette's avatar Remy Jette Committed by Remy Jette

Remove HEDLEY annotation from exception::what()

The latest MSVC compiler throws the following warning on
nlohmann::detail::exception::what() if /analyze is enabled:

```
vcruntime_exception.h(93) : warning C28204: 'what' has an override at
`nlohmann\json\develop\single_include\nlohmann\json.hpp(2644)`
and only the override is annotated for return: when an override is
annotated, the base (this function) should be similarly annotated.
```

See https://godbolt.org/z/r331h4
parent 176d8e26
......@@ -49,7 +49,6 @@ class exception : public std::exception
{
public:
/// returns the explanatory string
JSON_HEDLEY_RETURNS_NON_NULL
const char* what() const noexcept override
{
return m.what();
......
......@@ -2640,7 +2640,6 @@ class exception : public std::exception
{
public:
/// returns the explanatory string
JSON_HEDLEY_RETURNS_NON_NULL
const char* what() const noexcept override
{
return m.what();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment