1#include "semantic_vers.h"
7int main(
int argc,
char** argv) {
13 std::cout <<
"First version: " << v1 <<
"\n";
18 std::cout <<
"Second version: " << v2 <<
"\n";
23 <<
" " << (v1 > v2 ?
"True" :
"False") <<
"\n";
25 <<
" " << (v1 < v2 ?
"True" :
"False") <<
"\n";
27 <<
" " << (v1 == v2 ?
"True" :
"False") <<
"\n";
29 <<
" " << (v1 != v2 ?
"True" :
"False") <<
"\n";
31 <<
" " << (v1 <= v2 ?
"True" :
"False") <<
"\n";
33 <<
" " << (v1 >= v2 ?
"True" :
"False") <<
"\n";
Versions uses a modified semantic versioning scheme: major.minor.revision.post-tag+build.
static SemanticVersion parse(std::string s)
Parse a version string, sets major == -1 on errors.