👌 apply review comments

parent 5c1c79b6
...@@ -7,9 +7,9 @@ const_reference at(size_type idx) const; ...@@ -7,9 +7,9 @@ const_reference at(size_type idx) const;
// (2) // (2)
template<typename KeyT> template<typename KeyT>
reference at(KeyT && key); reference at(const KeyT& key);
template<typename KeyT> template<typename KeyT>
const_reference at(KeyT && key) const; const_reference at(const KeyT& key) const;
// (3) // (3)
reference at(const json_pointer& ptr); reference at(const json_pointer& ptr);
......
...@@ -10,12 +10,6 @@ template<typename KeyT> ...@@ -10,12 +10,6 @@ template<typename KeyT>
reference operator[](KeyT && key); reference operator[](KeyT && key);
template<typename KeyT> template<typename KeyT>
const_reference operator[](KeyT && key) const; const_reference operator[](KeyT && key) const;
template<typename T>
reference operator[](T* key);
template<typename T>
const_reference operator[](T* key) const;
reference operator[](const std::string_view& key); // since C++17
const_reference operator[](const std::string_view& key) const; // since C++17
// (3) // (3)
reference operator[](const json_pointer& ptr); reference operator[](const json_pointer& ptr);
...@@ -32,9 +26,6 @@ const_reference operator[](const json_pointer& ptr) const; ...@@ -32,9 +26,6 @@ const_reference operator[](const json_pointer& ptr) const;
: A type for an object key other than `basic_json::json_pointer`. This can also be a string literal or a string view : A type for an object key other than `basic_json::json_pointer`. This can also be a string literal or a string view
(C++17). (C++17).
`T`
: string literal convertible to `object_t::key_type`
## Parameters ## Parameters
`idx` (in) `idx` (in)
...@@ -195,6 +186,6 @@ Strong exception safety: if an exception occurs, the original value stays intact ...@@ -195,6 +186,6 @@ Strong exception safety: if an exception occurs, the original value stays intact
## Version history ## Version history
1. Added in version 1.0.0. 1. Added in version 1.0.0.
2. Added in version 1.0.0. Overloads for `T* key` added in version 1.1.0. Template and overload for `std::string_view` 2. Added in version 1.0.0. Overloads for `T* key` added in version 1.1.0. Template `T* key` replaced by template `KeyT`
added in version 3.10.0. in version 3.10.0 which now also supports `std::string_view`.
3. Added in version 2.0.0. 3. Added in version 2.0.0.
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