Skip to content

osdeverr/semverpp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

semverpp - Semantic Versioning for C++

This library implements the Semantic Versioning specification in C++, allowing you to easily compare software versions.

Setting up

Use semverpp as a Re dependency by adding the following to your re.yml:

deps:
    # <...>
    - github:osdeverr/[email protected] [semverpp]

Additionally, you can install it as a global package by running re pkg install github:osdeverr/[email protected] as semverpp and later use it by adding it as a dependency like that:

deps:
    # <...>
    - global:semverpp [semverpp]

Usage

#include <semverpp/version.hpp>

/* <...> */

semverpp::version version{"1.2.3"};
// or semverpp::version version{1, 2, 3}

assert(version > semverpp::version{"1.2"} && version < semverpp::version{"1.3"});
assert(version == semverpp::version{"1.2.3+some.build.metadata"});

assert(semverpp::version{"1.2.3-beta"} > semverpp::version{"1.2.3-alpha"});

About

Semantic Versioning for C++

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages