Add pedantic check for correct binary version

The check assumes that a change in patch version number (major and minor
are same) does not effect the binary interface of the library.
This commit is contained in:
Sven Fink 2020-12-08 09:22:11 +01:00
parent 2ac810c843
commit 503bc22d4d

View File

@ -10,6 +10,7 @@
#define NLOHMANN_JSON_SCHEMA_HPP__
#include "json-schema-decl.hpp"
#include <nlohmann/json-schema-version.hpp>
#include <nlohmann/json.hpp>
@ -21,6 +22,13 @@
# error "expected existing NLOHMANN_JSON_VERSION_MAJOR preproc variable, please update to NLohmann's JSON 3.8.0"
#endif
namespace _detail
{
using namespace nlohmann::json_schema;
static const auto version_ok __attribute((unused)) =
about::check_library_version<about::VERSION_MAJOR, about::VERSION_MINOR>();
} // namespace _detail
// make yourself a home - welcome to nlohmann's namespace
namespace nlohmann
{