Niels Lohmann
9110918cf8
Fix typos ( #4748 )
...
* ✏️ fix typos
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
* ✏️ address review comments
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
* ✏️ address review comments
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
---------
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
2025-05-04 10:28:24 +02:00
Niels Lohmann
1705bfe914
🔖 set version to 3.12.0 ( #4727 )
...
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
2025-04-11 10:41:14 +02:00
Niels Lohmann
f06604fce0
Bump the copyright years ( #4606 )
...
* 📄 bump the copyright years
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
* 📄 bump the copyright years
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
* 📄 bump the copyright years
Signed-off-by: Niels Lohmann <niels.lohmann@gmail.com >
---------
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
Signed-off-by: Niels Lohmann <niels.lohmann@gmail.com >
2025-01-19 17:04:17 +01:00
Niels Lohmann
6057b31df7
Overwork astyle call ( #4573 )
...
* 🔧 overwork astyle call
* 🔧 overwork astyle call
* 🔧 overwork astyle call
* 🔧 overwork astyle call
* 🔧 overwork astyle call
* 🔧 overwork astyle call
* 🔧 overwork astyle call
* 🔧 overwork astyle call
* 🔧 overwork astyle call
* 🔧 overwork astyle call
* 🔧 overwork astyle call
* Use ubuntu-latest image to run Valgrind (#4575 )
* 🔧 use Clang image to run valgrind
* 🔧 use Clang image to run valgrind
* 🔧 use Clang image to run valgrind
* 🔧 use Ubuntu image to run valgrind
* Use Clang image to run iwyu (#4574 )
* 🔧 use Clang image to run iwyu
* 🔧 use Clang image to run iwyu
* 🔧 overwork astyle call
* 🔧 overwork astyle call
* 🔧 overwork astyle call
* 🔧 overwork astyle call
* 🔧 overwork astyle call
* 🔧 overwork astyle call
* 🔧 overwork astyle call
* 🔧 overwork astyle call
* 🔧 overwork astyle call
* 🔧 overwork astyle call
* 🔧 overwork astyle call
* 🎨 format code
* 🔨 clean up
2024-12-29 17:06:03 +01:00
Niels Lohmann
620034ecec
♻️ allow patch and diff to be used with arbitrary string types ( #4536 )
2024-12-13 07:24:50 +01:00
Niels Lohmann
1b9a9d1f21
Update licenses ( #4521 )
...
* 📄 update licenses
* 📄 update licenses
2024-11-29 17:38:42 +01:00
Niels Lohmann
3d6c664de2
Allow comparing default initialized iterators ( #4512 )
2024-11-26 06:35:14 +01:00
Captain Crutches
fde9a86c5a
Make iterator_proxy_value a forward_iterator ( #4371 ) ( #4372 )
...
* Make iteration_proxy_value model forward_iterator
* Amalgamate
* Suppress tidy warning
2024-11-15 09:28:40 +01:00
Niels Lohmann
9cca280a4d
JSON for Modern C++ 3.11.3 ( #4222 )
2023-11-28 22:36:31 +01:00
Niels Lohmann
f56c6e2e30
Update documentation for the next release ( #4216 )
2023-11-26 15:51:19 +01:00
Niels Lohmann
836b7beca4
Fix CI, again ( #4083 )
2023-09-07 20:41:12 +02:00
Niels Lohmann
ab06fc9951
Fix Clang-Tidy warnings ( #4047 )
2023-06-08 18:46:48 +02:00
Raphael Grimm
bbe337c3a3
Prevent memory leak when exception is thrown in adl_serializer::to_json ( #3901 )
...
Co-authored-by: barcode <barcode@example.com >
2023-03-08 13:43:45 +01:00
Niels Lohmann
f7973f46d6
Use official Clang/GCC containers ( #3703 )
2022-08-27 17:28:50 +02:00
Niels Lohmann
9d69186291
🔖 set version to 3.11.2
2022-08-12 15:04:06 +02:00
Niels Lohmann
f2020da0dd
🔖 set version to 3.11.1
2022-08-01 23:27:58 +02:00
Niels Lohmann
ce0e13ccea
🔖 set version to 3.11.0
2022-07-31 23:19:06 +02:00
Florian Albrechtskirchinger
d909f80960
Add versioned, ABI-tagged inline namespace and namespace macros ( #3590 )
...
* Add versioned inline namespace
Add a versioned inline namespace to prevent ABI issues when linking code
using multiple library versions.
* Add namespace macros
* Encode ABI information in inline namespace
Add _diag suffix to inline namespace if JSON_DIAGNOSTICS is enabled, and
_ldvcmp suffix if JSON_USE_LEGACY_DISCARDED_VALUE_COMPARISON is enabled.
* Move ABI-affecting macros into abi_macros.hpp
* Move std_fs namespace definition into std_fs.hpp
* Remove std_fs namespace from unit test
* Format more files in tests directory
* Add unit tests
* Update documentation
* Fix GDB pretty printer
* fixup! Add namespace macros
* Derive ABI prefix from NLOHMANN_JSON_VERSION_*
2022-07-30 21:59:13 +02:00
Niels Lohmann
527da54dcb
Use REUSE framework ( #3546 )
...
* 📄 add licenses
* 👷 add REUSE compliance check
* 📝 add badge for REUSE
Co-authored-by: Florian Albrechtskirchinger <falbrechtskirchinger@gmail.com >
2022-07-20 12:38:07 +02:00
郑少锟
87cda1d664
Use std::iterator_traits
to extract iterator_category
( #3544 )
...
* Use `std::iterator_traits` to extract `iterator_category`
In third-party STL implementations, `array_t::iterator` might be a pointer (e.g., `vector` in [EASTL](https://github.com/electronicarts/EASTL )) rather than a class, in which case directly using `array_t::iterator::iterator_category` is invalid. This commit fixes it with `std::iterator_traits`, which handles pointers correctly.
* add the changes to the single-header version
2022-06-18 19:14:03 +02:00
Florian Albrechtskirchinger
6b97599a27
Fix C++20/gcc-12 issues (Part 2) ( #3446 )
...
* Add C++20 3-way comparison operator and fix broken comparisons
Fixes #3207 .
Fixes #3409 .
* Fix iterators to meet (more) std::ranges requirements
Fixes #3130 .
Related discussion: #3408
* Add note about CMake standard version selection to unit tests
Document how CMake chooses which C++ standard version to use when
building tests.
* Update documentation
* CI: add legacy discarded value comparison
* Fix internal linkage errors when building a module
2022-05-29 13:08:06 +02:00
Florian Albrechtskirchinger
616caea27a
Re-template json_pointer on string type ( #3415 )
...
* Make exception context optional
Change exception context parameter to pointer and replace context with
nullptr where appropriate.
* Support escaping other string types
* Add string concatenation function
Add variadic concat() function for concatenating char *, char, and
string types.
* Replace string concatenations using + with concat()
* Template json_pointer on string type
Change json_pointer from being templated on basic_json to being
templated on string type.
* Add unit test for #3388
Closes #3388 .
* Fix regression test for #2958
* Add backwards compatibility with json_pointer<basic_json>
* Update json_pointer docs
* Allow comparing different json_pointers
* Update version numbers
2022-04-12 14:18:16 +02:00
Florian Albrechtskirchinger
700b95f447
Make iterator operator++/--(int) equality-preserving ( #3332 )
...
Commit f28fc22
introduced const qualifiers on post-(inc-/dec-)rement
operators of iterators. These qualifiers prevent the use of basic_json
in place of std::ranges::range, which requires the post-increment
operator to be equality-preserving.
These changes appear to be the result of ICC compiler suggestions, and
no further explanation is discernible from the PR discussion (#858 ).
Further testing revealed, that clang-tidy also suggests adding const to
prevent "accidental mutation of a temporary object".
As an alternative, this commit partially reverts f28fc22
, removing all
added const qualifiers from return types and adds lvalue reference
qualifiers to the operator member functions instead.
Unit tests ensure the operators remain equality-preserving and
accidental mutation of temporaries following post-(inc-/dec-)rement is
prohibited.
Fixes #3331 .
2022-03-08 10:10:50 +01:00
Niels Lohmann
7440786b81
Update CI ( #3088 )
...
* 👷 prepare GitHub actions for new Docker image
* 👷 use experimental docker image
* 👷 use Clang-Analyzer 14
* 🔇 suppress readability-identifier-length
* 🔇 suppress more Clang-Tidy warnings
* ♻️ simplify code
* 🔇 suppress more Clang-Tidy warnings
* 🔇 suppress more Clang-Tidy warnings
* 🚨 fix warning
* 🚨 fix warning
* 🚨 fix warning
* 👷 use new Docker image
2021-10-29 21:27:34 +02:00
Ferry Huberts
e7a69b8d31
Adjust more files after actually building like the CI
...
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl >
2021-08-13 14:00:00 +02:00
Ferry Huberts
44d60f8d14
All: fix warnings when compiling with -Wswitch-enum
...
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl >
2021-08-12 16:33:50 +02:00
Niels Lohmann
6f551930e5
🚨 add new CI and fix warnings ( #2561 )
...
* ⚗️ move CI targets to CMake
* ♻️ add target for cpplint
* ♻️ add target for self-contained binaries
* ♻️ add targets for iwyu and infer
* 🔊 add version output
* ♻️ add target for oclint
* 🚨 fix warnings
* ♻️ rename targets
* ♻️ use iwyu properly
* 🚨 fix warnings
* ♻️ use iwyu properly
* ♻️ add target for benchmarks
* ♻️ add target for CMake flags
* 👷 use GitHub Actions
* ⚗️ try to install Clang 11
* ⚗️ try to install GCC 11
* ⚗️ try to install Clang 11
* ⚗️ try to install GCC 11
* ⚗️ add clang analyze target
* 🔥 remove Google Benchmark
* ⬆️ Google Benchmark 1.5.2
* 🔥 use fetchcontent
* 🐧 add target to download a Linux version of CMake
* 🔨 fix dependency
* 🚨 fix includes
* 🚨 fix comment
* 🔧 adjust flags for GCC 11.0.0 20210110 (experimental)
* 🐳 user Docker image to run CI
* 🔧 add target for Valgrind
* 👷 add target for Valgrind tests
* ⚗️ add Dart
* ⏪ remove Dart
* ⚗️ do not call ctest in test subdirectory
* ⚗️ download test data explicitly
* ⚗️ only execute Valgrind tests
* ⚗️ fix labels
* 🔥 remove unneeded jobs
* 🔨 cleanup
* 🐛 fix OCLint call
* ✅ add targets for offline and git-independent tests
* ✅ add targets for C++ language versions and reproducible tests
* 🔨 clean up
* 👷 add CI steps for cppcheck and cpplint
* 🚨 fix warnings from Clang-Tidy
* 👷 add CI steps for Clang-Tidy
* 🚨 fix warnings
* 🔧 select proper binary
* 🚨 fix warnings
* 🚨 suppress some unhelpful warnings
* 🚨 fix warnings
* 🎨 fix format
* 🚨 fix warnings
* 👷 add CI steps for Sanitizers
* 🚨 fix warnings
* ⚡ add optimization to sanitizer build
* 🚨 fix warnings
* 🚨 add missing header
* 🚨 fix warnings
* 👷 add CI step for coverage
* 👷 add CI steps for disabled exceptions and implicit conversions
* 🚨 fix warnings
* 👷 add CI steps for checking indentation
* 🐛 fix variable use
* 💚 fix build
* ➖ remove CircleCI
* 👷 add CI step for diagnostics
* 🚨 fix warning
* 🔥 clean Travis
2021-03-24 07:15:18 +01:00
Niels Lohmann
4917e7c259
Merge branch 'develop' of https://github.com/nlohmann/json into diagnostics
...
Conflicts:
include/nlohmann/detail/input/parser.hpp
single_include/nlohmann/json.hpp
2021-02-07 17:45:09 +01:00
Niels Lohmann
6d4eed5aeb
🚨 fix warning
2021-01-30 12:51:54 +01:00
Niels Lohmann
ffdeb77468
🚨 fix warnings #2615
2021-01-27 12:54:46 +01:00
Niels Lohmann
74cc0ab470
♻️ remove diagnostics_t class
2021-01-25 13:47:50 +01:00
Niels Lohmann
e160749003
♻️ move diagnostic code in header
2021-01-09 19:21:18 +01:00
Niels Lohmann
7b047861b0
🚧 add diagnostics to exceptions
2021-01-02 13:44:41 +01:00
Niels Lohmann
bdb2469c31
🚨 fix warnings
2020-12-29 21:36:30 +01:00
Niels Lohmann
433da31334
⚗️ try to use GCC 10
2020-12-29 20:16:51 +01:00
Niels Lohmann
dfedefb993
🚨 fix warnings
2020-12-26 17:56:16 +01:00
Niels Lohmann
9d726c25d5
♻️ remove "#define private public"
2020-08-12 13:30:06 +02:00
Niels Lohmann
8d295235a5
🔥 remove unused boolean_operators.hpp header
2020-07-11 19:20:44 +02:00
Niels Lohmann
dc06f100be
Merge branch 'develop' of https://github.com/nlohmann/json into clang_windows
...
Conflicts:
include/nlohmann/detail/input/binary_reader.hpp
include/nlohmann/detail/input/json_sax.hpp
include/nlohmann/detail/input/lexer.hpp
include/nlohmann/detail/input/parser.hpp
include/nlohmann/detail/json_pointer.hpp
include/nlohmann/detail/output/serializer.hpp
include/nlohmann/json.hpp
single_include/nlohmann/json.hpp
2020-07-11 14:04:40 +02:00
Niels Lohmann
98b1c6d302
🚩 use JSON_ASSERT(x) instead of assert(x)
2020-07-06 12:22:31 +02:00
Niels Lohmann
ac3922c7aa
Merge branch 'develop' of https://github.com/nlohmann/json into clang_windows
...
Conflicts:
include/nlohmann/detail/input/binary_reader.hpp
include/nlohmann/detail/input/input_adapters.hpp
include/nlohmann/detail/input/lexer.hpp
include/nlohmann/detail/output/binary_writer.hpp
include/nlohmann/json.hpp
single_include/nlohmann/json.hpp
2020-06-27 13:14:48 +02:00
Niels Lohmann
c5ee222982
Merge pull request #2211 from nlohmann/fix_warnings
...
Fix Clang-Tidy warnings
2020-06-27 12:34:18 +02:00
chenguoping
0ecf297457
drop std::enable_if part
2020-06-23 09:14:55 +08:00
Niels Lohmann
8b3d2399a4
🚨 remove warnings
2020-06-22 22:32:21 +02:00
chenguoping
aeef50709e
to allow for ADL in int_to_string() function
2020-06-22 20:17:56 +08:00
chenguoping
691fb0c57a
fix issue#2059
2020-06-16 15:35:26 +08:00
Niels Lohmann
0498202a03
🎨 replace alternative operators (and, not, or)
2020-06-03 14:20:36 +02:00
Niels Lohmann
904642f261
♻️ rename internal_binary_t with binary_t
2020-05-17 22:50:27 +02:00
Niels Lohmann
9adb1c0235
🏁 do not include <ciso646> unless old MSVC is used #2089
2020-05-07 09:43:41 +02:00
Michael Reilly
012c9665ac
Add binary type support to all binary file formats, as well as an internally represented binary type
2020-04-14 10:22:45 -04:00