TRLC Platform Library  1.0.0
Header-only C++ library for compile-time platform detection and abstraction
Version

Greater than or equal comparison Compares two compiler versions using lexicographic ordering. Useful for checking if a compiler meets minimum version requirements for specific language features or optimizations.

Parameters
otherVersion to compare against
Returns
true if this version >= other (major.minor.patch ordering)
Note
This operator is constexpr and can be used in compile-time contexts
See also
operator<() for less-than comparison
Since
1.0.0

requirement checking

constexpr auto version = trlc::platform::getCompilerVersion();
if constexpr (version >= trlc::platform::CompilerVersion{7, 0}) {
// Use features available in version 7.0+
}
static CompilerVersion getCompilerVersion()
Gets the compiler version at compile time.
Definition: compiler.hpp:357