Merge branch 'develop' into feature/json-pointer

This commit is contained in:
Niels 2016-04-16 12:19:31 +02:00
commit 3a3e064287
5 changed files with 412 additions and 431 deletions

View file

@ -66,7 +66,7 @@ cppcheck:
# create scanner with re2c
re2c: src/json.hpp.re2c
$(RE2C) -b -s -i --no-generation-date $< | $(SED) '1d' > src/json.hpp
$(RE2C) --bit-vectors --nested-ifs --no-debug-info $< | $(SED) '1d' > src/json.hpp
# pretty printer
pretty:
@ -74,7 +74,7 @@ pretty:
--indent-switches --indent-preproc-block --indent-preproc-define \
--indent-col1-comments --pad-oper --pad-header --align-pointer=type \
--align-reference=type --add-brackets --convert-tabs --close-templates \
--lineend=linux --preserve-date --suffix=none \
--lineend=linux --preserve-date --suffix=none --formatted \
src/json.hpp src/json.hpp.re2c test/unit.cpp test/fuzz.cpp benchmarks/benchmarks.cpp doc/examples/*.cpp

View file

@ -410,6 +410,7 @@ I deeply appreciate the help of the following people.
- [Lv Zheng](https://github.com/lv-zheng) fixed a namespace issue with `int64_t` and `uint64_t`.
- [abc100m](https://github.com/abc100m) analyzed the issues with GCC 4.8 and proposed a [partial solution](https://github.com/nlohmann/json/pull/212).
- [zewt](https://github.com/zewt) added useful notes to the README file about Android.
- [Róbert Márki](https://github.com/robertmrk) added a fix to use move iterators.
Thanks a lot for helping out!
@ -427,7 +428,7 @@ $ make
$ ./json_unit "*"
===============================================================================
All tests passed (3344278 assertions in 29 test cases)
All tests passed (3344299 assertions in 29 test cases)
```
For more information, have a look at the file [.travis.yml](https://github.com/nlohmann/json/blob/master/.travis.yml).

File diff suppressed because it is too large Load diff

View file

@ -7000,13 +7000,13 @@ class basic_json
}
/// return a reference to the value pointed to by the iterator
reference operator*()
reference operator*() const
{
return const_cast<reference>(base_iterator::operator*());
}
/// dereference the iterator
pointer operator->()
pointer operator->() const
{
return const_cast<pointer>(base_iterator::operator->());
}

View file

@ -12499,4 +12499,15 @@ TEST_CASE("regression tests")
CHECK(j3b.dump() == "1E04");
CHECK(j3c.dump() == "1e04");
}
SECTION("issue #233 - Can't use basic_json::iterator as a base iterator for std::move_iterator")
{
json source = {"a", "b", "c"};
json expected = {"a", "b"};
json dest;
std::copy_n(std::make_move_iterator(source.begin()), 2, std::back_inserter(dest));
CHECK(dest == expected);
}
}