Commit Graph
6 Commits
Author SHA1 Message Date
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 LohmannandFlorian Albrechtskirchinger 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
Niels Lohmann 0498202a03 🎨 replace alternative operators (and, not, or) 2020-06-03 14:20:36 +02:00
Niels Lohmann 858e75c4df 🚨 fixed some clang-tidy warnings 2018-10-07 18:39:18 +02:00
Théo DELRIEU 1ea8cd128c fix void_t for older compilers 2018-09-07 12:17:33 +02:00
Théo DELRIEU f6febbe359 split meta.hpp, add detected_t (used to define concepts) 2018-08-16 11:58:42 +02:00