Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
json
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
json
Commits
6c9a401e
Commit
6c9a401e
authored
Oct 24, 2017
by
Jamie Seward
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove old non-perfect forwarding find and count
parent
16ffdbcb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
48 deletions
+3
-48
src/json.hpp
src/json.hpp
+3
-48
No files found.
src/json.hpp
View file @
6c9a401e
...
...
@@ -10884,7 +10884,7 @@ class basic_json
@note This method always returns @ref end() when executed on a JSON type
that is not an object.
@param[in] key key value of the element to search for
@param[in] key key value of the element to search for
.
@return Iterator to an element with key equivalent to @a key. If no such
element is found or the JSON value is not an object, past-the-end (see
...
...
@@ -10896,39 +10896,6 @@ class basic_json
@since version 1.0.0
*/
iterator
find
(
typename
object_t
::
key_type
key
)
{
auto
result
=
end
();
if
(
is_object
())
{
result
.
m_it
.
object_iterator
=
m_value
.
object
->
find
(
key
);
}
return
result
;
}
/*!
@brief find an element in a JSON object
@copydoc find(typename object_t::key_type)
*/
const_iterator
find
(
typename
object_t
::
key_type
key
)
const
{
auto
result
=
cend
();
if
(
is_object
())
{
result
.
m_it
.
object_iterator
=
m_value
.
object
->
find
(
key
);
}
return
result
;
}
#ifdef JSON_HAS_CPP_14
/*!
@brief find an element in a JSON object
@copydoc find(typename object_t::key_type)
*/
template
<
typename
KeyT
>
iterator
find
(
KeyT
&&
key
)
{
...
...
@@ -10944,7 +10911,7 @@ class basic_json
/*!
@brief find an element in a JSON object
@copydoc find(
typename object_t::key_type
)
@copydoc find(
KeyT&&
)
*/
template
<
typename
KeyT
>
const_iterator
find
(
KeyT
&&
key
)
const
...
...
@@ -10958,7 +10925,6 @@ class basic_json
return
result
;
}
#endif
/*!
@brief returns the number of occurrences of a key in a JSON object
...
...
@@ -10981,24 +10947,13 @@ class basic_json
@since version 1.0.0
*/
size_type
count
(
typename
object_t
::
key_type
key
)
const
{
// return 0 for all nonobject types
return
is_object
()
?
m_value
.
object
->
count
(
key
)
:
0
;
}
#ifdef JSON_HAS_CPP_14
/*!
@brief returns the number of occurrences of a key in a JSON object
@copydoc count(typename object_t::key_type)
*/
template
<
typename
KeyT
>
size_type
count
(
KeyT
&&
key
)
const
{
// return 0 for all nonobject types
return
is_object
()
?
m_value
.
object
->
count
(
std
::
forward
<
KeyT
>
(
key
))
:
0
;
}
#endif
/// @}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment