Jamie Seward
33c6511dd0
Remove JSON_HAS_STRING_VIEW
...
Instead implement @gregmarr's PR comments that perfect forwarding should be used. Also cleaned up cpp language standard detection.
2017-10-23 00:43:26 -07:00
Niels Lohmann
89650c99dd
🚧 checking if #714 is now fixed with MSVC
...
Hopefully, #764 fixed this.
2017-10-22 11:16:33 +02:00
Niels Lohmann
b0c380b0f8
📝 cleanup after the last PRs
2017-10-22 09:12:35 +02:00
Niels Lohmann
be4fba7baf
Merge branch 'develop' of https://github.com/nlohmann/json into develop
2017-10-22 08:53:46 +02:00
Niels Lohmann
f193427e91
🔨 some simplifications
2017-10-22 08:53:43 +02:00
Niels Lohmann
24b6e028a9
✅ improved test coverage
2017-10-22 08:53:27 +02:00
Niels Lohmann
3094640446
Merge pull request #764 from pjkundert/develop-simplify-istream
...
Simplified istream handing #367
2017-10-22 08:52:28 +02:00
Niels Lohmann
ef40673acb
Merge branch 'develop' into develop-simplify-istream
2017-10-22 08:52:15 +02:00
Jamie Seward
d468f8c4e6
Use consistent logic to determine if string_view exists
2017-10-21 16:36:05 -07:00
Jamie Seward
59cde1ad6e
Fix for _HAS_CXX17 == 0
...
Copied from solution to https://github.com/nlohmann/json/issues/464
2017-10-21 16:29:37 -07:00
Jamie Seward
1a66679929
Add string_view support
...
This avoids unnecessary string copies on often used
find().
2017-10-21 15:20:13 -07:00
Niels Lohmann
33df3250c3
Merge pull request #793 from sonulohani/develop
...
Error : 'identifier "size_t" is undefined' in linux
2017-10-21 10:58:27 +02:00
Sonu Lohani
92da334862
Error : 'identifier "size_t" is undefined' in linux
2017-10-21 12:52:44 +05:30
Niels Lohmann
2e281ba64b
Merge pull request #788 from jseward/develop
...
Fix Visual Studio 2017 warnings
2017-10-18 15:04:24 +02:00
Jamie Seward
a99fcb4e7d
Add comments and newline
2017-10-17 22:53:35 -07:00
Jamie Seward
917d9d8bc3
Fix Visual Studio 2017 warnings
2017-10-16 23:23:55 -07:00
Niels Lohmann
7c8f0a4186
Merge pull request #785 from jseward/develop
...
Fix warning C4706 on Visual Studio 2017 - fixes #784
2017-10-16 19:48:17 +02:00
Niels Lohmann
b27a142ec0
Merge pull request #783 from eld00d/patch-1
...
Set GENERATE_TAGFILE in Doxyfile
2017-10-16 17:54:28 +02:00
Perry Kundert
a8cc7a1bc8
Consistently use std::char_traits int_type-->char conversion intrinsics
2017-10-16 08:06:10 -07:00
Jamie Seward
af99090742
Disable warning C4389: '==': signed/unsigned mismatch
...
Lots of tests have this warning.
Also moved out of for loop, doesn't need to be done every loop.
2017-10-16 01:02:48 -07:00
Jamie Seward
8ba7f69ab4
Fix whitespace
2017-10-16 00:49:59 -07:00
Jamie Seward
8a4af820c7
Fix warning C4706
2017-10-16 00:41:58 -07:00
Jamie Seward
19f8f1c075
Add missing "u8"
...
This causes test-udt to crash due to bad iterator
2017-10-16 00:21:38 -07:00
Jamie Seward
5ec44fe9e3
Add /W4 for MSVS
2017-10-15 22:56:38 -07:00
Nate Vargas
727ee7d03e
Set GENERATE_TAGFILE in Doxyfile
...
Allows documentation to be linked from other projects to https://nlohmann.github.io/json using Doxygen with the tag:
TAGFILES = $(SOME_PATH)/nlohmann_json.tag=https://nlohmann.github.io/json
2017-10-14 19:06:38 -05:00
Niels Lohmann
d300a8e268
🚨 fixed warnings #776
2017-10-13 08:46:29 +02:00
Perry Kundert
0b803d0a5f
Simplify the json/src/benchmarks.cpp to allow more optimal code gen.
...
o For some unknown reason, the complexity of the benchmark platform
prevented some C++ compilers from generating optimal code, properly
reflective of the real performance in actual deployment.
o Added the json_benchmarks_simple target, which performs the same
suite of tests as json_benchmarks.
o Simplified the benchmark platform, and emit an "Average" TPS
(Transactions Per Second) value reflective of aggregate parse/output
performance.
2017-10-07 15:50:19 -07:00
Perry Kundert
23440eb86e
Remove outdated commentary about the value of eof(), retain input type
...
o We assume the same character int_type as the unerlying std::istream
o There are no assumptions on the value of eof(), other than that it
will not be a valid unsigned char value.
o To retain performance, we do not allow swapping out the underlying
std::streambuf during our use of the std::istream for parsing.
2017-10-06 12:54:43 -07:00
Perry Kundert
45e1e3d48a
Revert some unnecessary member initializer changes.
2017-10-06 07:53:31 -07:00
Perry Kundert
5e480b56d8
Further simplify character type handling
2017-10-06 07:37:49 -07:00
Perry Kundert
1b43a45bec
Implement correct handling of std::streambuf int_type, eof()
...
o Make no assumptions about eof(), other than that it is somewhere
outside of the valid range of char_type.
2017-10-05 16:16:41 -07:00
Perry Kundert
184dab60e6
Accelerate access to underlying std::istream streambuf
2017-10-05 16:16:41 -07:00
Perry Kundert
f775922ca8
Specify initializers for yytest, token_string using initializer-lists
...
o We can retain -Weffc++ and specify default initializers by using
initializer lists. The risks are low (of additional non-conformat
compilers), because there is already one other such initialization
used in the code-base.
2017-10-05 16:16:41 -07:00
Perry Kundert
546e148b24
Further performance improvements, and corrections in get_token_string
...
o An (-'ve valued, typically -1) EOF must never be allowed in
token_string, as it be converted to 255 -- a legitimate value.
o Comparing against a specific eof() (-1, typically) is more costly than
detecting +'ve/-'ve. Since EOF is the only non-positive value allowed
we can use the simpler test.
o Removed unnecessary test for token_string size, as it is already
tested in the method, and must never occur in correct code; used an
assert instead.
2017-10-05 16:16:41 -07:00
Perry Kundert
8665e25942
Rename get_string to move_string to imply side-effect
2017-10-05 16:16:41 -07:00
Perry Kundert
e0d890cc23
Corrected unnnecessary const restriction on returned std::string
2017-10-05 16:16:41 -07:00
Perry Kundert
97a388802d
Improve performance by constructing yytext as a std::string
...
o Return its contents when necessary. In many cases, this avoids
construction of multiple copies of the yytext token. Exceeds
performance of current develop branch.
2017-10-05 16:15:46 -07:00
Perry Kundert
7c523338c5
Remove unnnecessary NUL termination of yytext (as it may contain NULs)
2017-10-05 16:01:41 -07:00
Perry Kundert
14ca1f6f09
Restore istream performance #764
...
o Use std::streambuf I/O instead of std::istream; does not maintain
(unused) istream flags.
o Further simplify get/unget handling.
o Restore original handling of NUL in input stream; ignored during
token_string escaping.
2017-10-05 16:01:41 -07:00
Perry Kundert
12efeadc2e
Further simplify istream handling; use native unget
2017-10-05 16:01:41 -07:00
Perry Kundert
f585fe4eec
Test to confirm parsing of multiple JSON records in a istream #367
2017-10-05 16:01:41 -07:00
Perry Kundert
90adf6ec20
Simplify get_token_string, unnecessary buffering, handle Byte Order Mark
2017-10-05 16:01:41 -07:00
Niels Lohmann
0c0851dbea
📝 comment how to integrate tsl::ordered_map ( #546 )
2017-10-05 20:36:18 +02:00
Niels Lohmann
bab4a15748
📝 comment how to integrate fifo_map ( #485 )
2017-10-05 20:33:27 +02:00
Niels Lohmann
60439aff05
📝 different cmake call
2017-10-05 19:43:59 +02:00
Niels Lohmann
73d1b55aba
🔧 executing tests in parallel
2017-10-05 19:43:39 +02:00
Niels Lohmann
615366447a
🔧 removing -Weffc++ warnings
2017-10-05 19:43:19 +02:00
Niels Lohmann
73727c989c
Merge branch 'feature/coveralls' into develop
2017-10-05 19:08:28 +02:00
Niels Lohmann
75f4678b96
🔨 added filter script for branch coverage
2017-10-05 19:08:15 +02:00
Niels Lohmann
c204ac82e0
🔨 adjusted Coverity script to work without Makefile
2017-10-05 07:13:59 +02:00