1
0
mirror of https://github.com/nlohmann/json.git synced 2025-07-28 12:02:00 +03:00

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
This commit is contained in:
Remy Jette
2021-03-15 17:30:58 -07:00
committed by Remy Jette
parent 176d8e261a
commit 0a9ec38f44
2 changed files with 0 additions and 2 deletions

View File

@ -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();