We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Please add version numbers in header files, that can be used at compile time.
For example:
#define RYML_VERSION "0.7.0" #define RYML_VERSION_MAJOR 0 #define RYML_VERSION_MINOR 7 #define RYML_VERSION_PATCH 0
This helps when code using ryml needs to be different for v0.6.0 and v0.7.0, due to api breaking changes.
To illustrate, right now my application code looks like:
ryml::ParserOptions opts; opts.locations(true); #if OTEL_HAVE_RYML == 6 ryml::Parser parser(opts); #endif #if OTEL_HAVE_RYML == 7 ryml::Parser::handler_type event_handler; ryml::Parser parser(&event_handler, opts); #endif ryml::Tree tree; ryml::csubstr filename; ryml::csubstr csubstr_content; std::unique_ptr<Document> doc; filename = ryml::to_csubstr(source); csubstr_content = ryml::to_csubstr(content); try { #if OTEL_HAVE_RYML == 6 tree = parser.parse_in_arena(filename, csubstr_content); #endif #if OTEL_HAVE_RYML == 7 tree = parse_in_arena(&parser, filename, csubstr_content); #endif tree.resolve(); } catch (...)
where OTEL_HAVE_RYML is evaluated by CMake, based on what find_package() actually found.
OTEL_HAVE_RYML
It is desirable to rely on RYML_VERSION_MAJOR, RYML_VERSION_MINOR and RYML_VERSION_PATCH found in the ryml header files instead.
RYML_VERSION_MAJOR
RYML_VERSION_MINOR
RYML_VERSION_PATCH
The text was updated successfully, but these errors were encountered:
Fixes biojppm#458
949bd4a
74974a4
Successfully merging a pull request may close this issue.
Please add version numbers in header files, that can be used at compile time.
For example:
This helps when code using ryml needs to be different for v0.6.0 and v0.7.0, due to api breaking changes.
To illustrate, right now my application code looks like:
where
OTEL_HAVE_RYML
is evaluated by CMake, based on what find_package() actually found.It is desirable to rely on
RYML_VERSION_MAJOR
,RYML_VERSION_MINOR
andRYML_VERSION_PATCH
found in the ryml header files instead.The text was updated successfully, but these errors were encountered: