From 166c3167bc608a63e2312930a9b722f8d697d2c5 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Fri, 4 May 2018 23:42:51 +0300 Subject: Add support for standard version constraint shortcut operators --- libbutl/standard-version.mxx | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'libbutl/standard-version.mxx') diff --git a/libbutl/standard-version.mxx b/libbutl/standard-version.mxx index b161063..fa74e01 100644 --- a/libbutl/standard-version.mxx +++ b/libbutl/standard-version.mxx @@ -157,12 +157,14 @@ LIBBUTL_MODEXPORT namespace butl // Create empty version. // standard_version () {} // = default; @@ MOD VC - - private: - void - parse_snapshot (const std::string&, std::size_t&); }; + // Try to parse a string as a standard version returning nullopt if invalid. + // + LIBBUTL_SYMEXPORT optional + parse_standard_version (const std::string&, + standard_version::flags = standard_version::none); + inline bool operator< (const standard_version& x, const standard_version& y) noexcept { @@ -220,6 +222,7 @@ LIBBUTL_MODEXPORT namespace butl // The build2 "standard version" constraint: // // ('==' | '>' | '<' | '>=' | '<=') + // ('^' | '~') // ('(' | '[') (')' | ']') // struct LIBBUTL_SYMEXPORT standard_version_constraint -- cgit v1.1