-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Closed
Labels
Feature RequestMissing Feature/WrapperMissing Feature/WrapperLang: C++Native implementation issueNative implementation issue
Milestone
Description
What language and solver does this apply to? C++
Describe the problem you are trying to solve.
Hi, I'd like to check the OR-Tools version during compilation to make sure it's compatible with the C++ code that uses it.
Describe the solution you'd like
Use constexpr for int version functions
constexpr int OrToolsMajorVersion();
constexpr int OrToolsMinorVersion();
constexpr int OrToolsPatchVersion();so users can do
static_assert(
operations_research::OrToolsMajorVersion() == 9 &&
operations_research::OrToolsMinorVersion() == 3,
"Incompatible OR-Tools version"
);Describe alternatives you've considered
Another option would be to export the OR_TOOLS_MAJOR, OR_TOOLS_MINOR, and OR_TOOLS_PATCH constants.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Feature RequestMissing Feature/WrapperMissing Feature/WrapperLang: C++Native implementation issueNative implementation issue