std_json
std_json copied to clipboard
value(..., const char*) should take std::string_view ?
I see there are these signatures mentioned in the current proposal:
string_type value(const typename object_type::key_type &, const char * default_value) const;
string_type value(const json_pointer &, const char * default_value) const;
Couldn't these take string_view
instead?
There is a proposal p0506r2 to change string
and const char*
into string_view
, maybe it's fit here too.
Yes, this is on my todo list. Niels' library is based on C++11, which is perfectly fine. For the proposal, which will be based on C++17 (at least), it certainly makes sense. I just did not find the time during the last months to work on it much, but will continue in the (near) future.