std_json icon indicating copy to clipboard operation
std_json copied to clipboard

value(..., const char*) should take std::string_view ?

Open Talkless opened this issue 7 years ago • 1 comments

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.

Talkless avatar Nov 17 '17 14:11 Talkless

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.

mariokonrad avatar Nov 18 '17 12:11 mariokonrad