|
commons 0.1.5
Header-only C++23 library of common/shared types for the C++ libraries
|
A semver range constraint (npm ^/~, comparisons, space-separated intersection).
More...
#include <version_constraint.hpp>
Public Member Functions | |
| bool | satisfies (const SemVer &v) const |
True when v satisfies every matcher (logical AND). | |
| const std::string & | raw () const noexcept |
| The original range string this constraint was parsed from. | |
| std::string | to_string () const |
| The canonical text form — the raw range string. | |
| bool | operator== (const VersionConstraint &o) const |
| Equality by raw string (there is no semantic normalization). | |
Static Public Member Functions | |
| static VersionConstraint | parse (const std::string_view s) |
| Parse a range string into a constraint. | |
A semver range constraint (npm ^/~, comparisons, space-separated intersection).
|
inlinestatic |
Parse a range string into a constraint.
Throws std::invalid_argument if any token holds a malformed version; an empty input is *.