Compile-time checks against KOS's current version.
More...
|
#define | KOS_VERSION_ABOVE(major, minor, patch) KOS_VERSION_MAKE_ABOVE(major, minor, patch, KOS_VERSION) |
| Compile-time check for being above a given KOS version.
|
|
#define | KOS_VERSION_MIN(major, minor, patch) KOS_VERSION_MAKE_MIN(major, minor, patch, KOS_VERSION) |
| Compile-time check for a minimum KOS version.
|
|
#define | KOS_VERSION_IS(major, minor, patch) KOS_VERSION_MAKE_IS(major, minor, patch, KOS_VERSION) |
| Compile-time check for an exact KOS version.
|
|
#define | KOS_VERSION_MAX(major, minor, patch) KOS_VERSION_MAKE_MAX(major, minor, patch, KOS_VERSION) |
| Compile-time check for a maximum KOS version.
|
|
#define | KOS_VERSION_BELOW(major, minor, patch) KOS_VERSION_MAKE_BELOW(major, minor, patch, KOS_VERSION) |
| Compile-time check for being below a given KOS version.
|
|
Compile-time checks against KOS's current version.
This API provides several utility macros to check for a particular exact, min, or max compile-time version for KOS.
They are meant to be used with the preprocessor like so:
#if KOS_VERSION_MIN(2, 0, 0)
#elif KOS_VERSION_BELOW(2, 5, 1)
#elif KOS_VERSION_IS(3, 1, 2)
#endif
◆ KOS_VERSION_ABOVE
Compile-time check for being above a given KOS version.
Checks to see whether the current KOS version is higher than the given version.
- Parameters
-
major | Major version component. |
minor | Minor version component. |
patch | Patch version component. |
- Return values
-
true | KOS's version is higher. |
false | KOS's version is the same or lower. |
◆ KOS_VERSION_BELOW
Compile-time check for being below a given KOS version.
Checks to see whether the current KOS version is lower than the given version.
- Parameters
-
major | Major version component. |
minor | Minor version component. |
patch | Patch version component. |
- Return values
-
true | KOS's version is lower. |
false | KOS's version is the same or higher. |
◆ KOS_VERSION_IS
Compile-time check for an exact KOS version.
Checks to see whether the current KOS version matches the given version.
- Parameters
-
major | Major version component. |
minor | Minor version component. |
patch | Patch version component. |
- Return values
-
true | KOS's version is the same. |
false | KOS's version is different. |
◆ KOS_VERSION_MAX
Compile-time check for a maximum KOS version.
Checks to see whether the current KOS version is the same or lower than the given version.
- Parameters
-
major | Major version component. |
minor | Minor version component. |
patch | Patch version component. |
- Return values
-
true | KOS's version is the the same or lower. |
false | KOS's version is higher. |
◆ KOS_VERSION_MIN
Compile-time check for a minimum KOS version.
Checks to see whether the current KOS version is the same or higher than the given version.
- Parameters
-
major | Major version component. |
minor | Minor version component. |
patch | Patch version component. |
- Return values
-
true | KOS's version is the same or higher. |
false | KOS's version is lower. |