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:
parent
2ac810c843
commit
503bc22d4d
@ -10,6 +10,7 @@
|
|||||||
#define NLOHMANN_JSON_SCHEMA_HPP__
|
#define NLOHMANN_JSON_SCHEMA_HPP__
|
||||||
|
|
||||||
#include "json-schema-decl.hpp"
|
#include "json-schema-decl.hpp"
|
||||||
|
#include <nlohmann/json-schema-version.hpp>
|
||||||
|
|
||||||
#include <nlohmann/json.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"
|
# error "expected existing NLOHMANN_JSON_VERSION_MAJOR preproc variable, please update to NLohmann's JSON 3.8.0"
|
||||||
#endif
|
#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
|
// make yourself a home - welcome to nlohmann's namespace
|
||||||
namespace nlohmann
|
namespace nlohmann
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user