What is the issue you have?
const typename object_t::key_type& key() const
nlohmann/json.hpp:11996:5: warning: non-void function does not return a value in all control paths [-Wreturn-type]
static ReferenceType get_ref_impl(ThisType& obj)
nlohmann/json.hpp:20017:5: warning: non-void function does not return a value in all control paths [-Wreturn-type]
reference operator[](T* key)
nlohmann/json.hpp:20925:5: warning: non-void function does not return a value in all control paths [-Wreturn-type]
const_reference operator[](const typename object_t::key_type& key) const
nlohmann/json.hpp:20877:5: warning: non-void function does not return a value in all control paths [-Wreturn-type]
and many more... mostly looking like:
ReturnType fooBar( xxx )
{
if (JSON_HEDLEY_LIKELY( xxx ))
{
return xxx;
}
JSON_THROW( xxx );
}
Please describe the steps to reproduce the issue.
- use custom JSON_THROW_USER without exceptions
- compile
What is the expected behavior?
no warnings
Which compiler and operating system are you using?
- Compiler: clang
- Operating system: ubuntu 21.04
Which version of the library did you use?
i'm not sure if this is intentional behavior. however, it floods the compiler output.
is there a trick to keep in mind when adding your own JSON_THROW?
ps: thanks for the awesome library. great work
What is the issue you have?
const typename object_t::key_type& key() const
nlohmann/json.hpp:11996:5: warning: non-void function does not return a value in all control paths [-Wreturn-type]
static ReferenceType get_ref_impl(ThisType& obj)
nlohmann/json.hpp:20017:5: warning: non-void function does not return a value in all control paths [-Wreturn-type]
reference operator[](T* key)
nlohmann/json.hpp:20925:5: warning: non-void function does not return a value in all control paths [-Wreturn-type]
const_reference operator[](const typename object_t::key_type& key) const
nlohmann/json.hpp:20877:5: warning: non-void function does not return a value in all control paths [-Wreturn-type]
and many more... mostly looking like:
Please describe the steps to reproduce the issue.
What is the expected behavior?
no warnings
Which compiler and operating system are you using?
Which version of the library did you use?
developbranchi'm not sure if this is intentional behavior. however, it floods the compiler output.
is there a trick to keep in mind when adding your own JSON_THROW?
ps: thanks for the awesome library. great work