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
a0e05793
Commit
a0e05793
authored
Jul 09, 2017
by
Niels Lohmann
Committed by
GitHub
Jul 09, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #650 from olegendo/develop
Don't include <iostream>, use std::make_shared
parents
1b2fabe8
e3bb156f
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
8 deletions
+10
-8
src/json.hpp
src/json.hpp
+8
-8
test/src/unit-readme.cpp
test/src/unit-readme.cpp
+1
-0
test/src/unit-unicode.cpp
test/src/unit-unicode.cpp
+1
-0
No files found.
src/json.hpp
View file @
a0e05793
...
...
@@ -43,7 +43,7 @@ SOFTWARE.
#include <functional> // function, hash, less
#include <initializer_list> // initializer_list
#include <iomanip> // hex
#include <ios
tream>
// istream, ostream
#include <ios
fwd>
// istream, ostream
#include <iterator> // advance, begin, back_inserter, bidirectional_iterator_tag, distance, end, inserter, iterator, iterator_traits, next, random_access_iterator_tag, reverse_iterator
#include <limits> // numeric_limits
#include <locale> // locale
...
...
@@ -6634,17 +6634,17 @@ class basic_json
static
std
::
shared_ptr
<
output_adapter
<
CharType
>>
create
(
std
::
vector
<
CharType
>&
vec
)
{
return
std
::
shared_ptr
<
output_adapter
>
(
new
output_vector_adapter
<
CharType
>
(
vec
)
);
return
std
::
make_shared
<
output_vector_adapter
<
CharType
>>
(
vec
);
}
static
std
::
shared_ptr
<
output_adapter
<
CharType
>>
create
(
std
::
ostream
&
s
)
{
return
std
::
shared_ptr
<
output_adapter
>
(
new
output_stream_adapter
<
CharType
>
(
s
)
);
return
std
::
make_shared
<
output_stream_adapter
<
CharType
>>
(
s
);
}
static
std
::
shared_ptr
<
output_adapter
<
CharType
>>
create
(
std
::
string
&
s
)
{
return
std
::
shared_ptr
<
output_adapter
>
(
new
output_string_adapter
<
CharType
>
(
s
)
);
return
std
::
make_shared
<
output_string_adapter
<
CharType
>>
(
s
);
}
};
...
...
@@ -6675,7 +6675,7 @@ class basic_json
std
::
vector
<
CharType
>&
v
;
};
///
p
utput adapter for output streams
///
o
utput adapter for output streams
template
<
typename
CharType
>
class
output_stream_adapter
:
public
output_adapter
<
CharType
>
{
...
...
@@ -8767,19 +8767,19 @@ class basic_json
/// input adapter for input stream
static
std
::
shared_ptr
<
input_adapter
>
create
(
std
::
istream
&
i
)
{
return
std
::
shared_ptr
<
input_adapter
>
(
new
cached_input_stream_adapter
<
16384
>
(
i
)
);
return
std
::
make_shared
<
cached_input_stream_adapter
<
16384
>>
(
i
);
}
/// input adapter for input stream
static
std
::
shared_ptr
<
input_adapter
>
create
(
std
::
istream
&&
i
)
{
return
std
::
shared_ptr
<
input_adapter
>
(
new
cached_input_stream_adapter
<
16384
>
(
i
)
);
return
std
::
make_shared
<
cached_input_stream_adapter
<
16384
>>
(
i
);
}
/// input adapter for buffer
static
std
::
shared_ptr
<
input_adapter
>
create
(
const
char
*
b
,
size_t
l
)
{
return
std
::
shared_ptr
<
input_adapter
>
(
new
input_buffer_adapter
(
b
,
l
)
);
return
std
::
make_shared
<
input_buffer_adapter
>
(
b
,
l
);
}
// derived support
...
...
test/src/unit-readme.cpp
View file @
a0e05793
...
...
@@ -36,6 +36,7 @@ using nlohmann::json;
#include <list>
#include <unordered_map>
#include <unordered_set>
#include <iostream>
TEST_CASE
(
"README"
,
"[hide]"
)
{
...
...
test/src/unit-unicode.cpp
View file @
a0e05793
...
...
@@ -33,6 +33,7 @@ SOFTWARE.
using
nlohmann
::
json
;
#include <fstream>
#include <iostream>
extern
size_t
calls
;
size_t
calls
=
0
;
...
...
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