Skip to content
New issue

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

Version Comparison Macros for C++ #6379

Open
jleibs opened this issue May 17, 2024 · 1 comment
Open

Version Comparison Macros for C++ #6379

jleibs opened this issue May 17, 2024 · 1 comment
Labels
🌊 C++ API C or C++ logging API enhancement New feature or request 🏎️ Quick Issue Can be fixed in a few hours or less user-request This is a pressing issue for one of our users
Milestone

Comments

@jleibs
Copy link
Member

jleibs commented May 17, 2024

It would be beneficial to provide a method to check versions using macro/preprocessors for cases where the code must support multiple versions.

Although there is the RERUN_SDK_HEADER_VERSION preprocessor available, its value is a string (e.g., "0.15.0"), making comparison difficult. It would be more practical to change it to a comparable value like 001500 or to provide separate version numbers for major, minor, and patches that can be compared using a utility macro such as:

#define RERUN_SDK_HEADER_VERSION_MAJOR 0
#define RERUN_SDK_HEADER_VERSION_MINOR 15
#define RERUN_SDK_HEADER_VERSION_PATCH 0
#define RERUN_SDK_HEADER_VERSION_GT(major, minor, patch) ...
@jleibs jleibs added enhancement New feature or request user-request This is a pressing issue for one of our users 🌊 C++ API C or C++ logging API labels May 17, 2024
@Wumpf Wumpf added the 🏎️ Quick Issue Can be fixed in a few hours or less label May 17, 2024
@Wumpf Wumpf added this to the 0.17 milestone May 17, 2024
@emilk
Copy link
Member

emilk commented Jun 11, 2024

We have a similar need in Python

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🌊 C++ API C or C++ logging API enhancement New feature or request 🏎️ Quick Issue Can be fixed in a few hours or less user-request This is a pressing issue for one of our users
Projects
None yet
Development

No branches or pull requests

3 participants