GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Categories
  • Newsletter
  • Submit
  • Login
  • Awesome C++
  • Containers

This view

  • Original page
  • New address

GeezerVison is showing cpp.libhunt.com — semver Alternatives - C++ Containers | LibHunt

  • Subscribe
  • Submit
  • Categories
  • About
  • Login

semver

Semantic Versioning for modern C++

Neargye logo
github.com    Source Code    Docs    Changelog
Suggest Changes
Take the C++ Developer Survey - About 6 minutes on the tools, libraries and AI you use with C++. You get the results by email. Take the survey »
Popularity
3.6
Stable
Activity
6.9
-
Stars 359
Watchers 8
Forks 47
Last Commit 15 days ago

Description

C++ library compare and manipulate versions are available as extensions to the ..-. format complying with Semantic Versioning 2.0.0

Programming language: C++
License: MIT License
Tags: Containers     Header Only     C++17     Semver    
Latest version: v1.0.0-rc

semver alternatives and similar libraries

Based on the "Containers" category.
Alternatively, view semver alternatives based on common mentions on social networks and blogs.

  • pybind11

    9.5 9.1 semver VS pybind11
    Seamless operability between C++11 and Python
    pybind logo
  • FunctionalPlus

    6.6 5.5 L4 semver VS FunctionalPlus
    Functional Programming Library for C++. Write concise and readable C++ code.
    Dobiasd logo
  • SaaSHub - Software Alternatives and Reviews

    SaaSHub helps you find the best software and product alternatives
    Promo www.saashub.com
    SaaSHub Logo
  • PEGTL

    6.6 9.4 semver VS PEGTL
    Parsing Expression Grammar Template Library
    taocpp logo
  • sparsehash

    6.2 0.0 L1 semver VS sparsehash
    C++ associative containers
    sparsehash logo
  • sparsepp

    5.7 3.3 semver VS sparsepp
    A fast, memory efficient hash map for C++
    greg7mdp logo
  • Hopscotch map

    4.8 3.7 L4 semver VS Hopscotch map
    C++ implementation of a fast hash map and hash set using hopscotch hashing
    Tessil logo
  • function2

    4.1 3.3 semver VS function2
    Improved and configurable drop-in replacement to std::function that supports move only types, multiple overloads and more
    Naios logo
  • LSHBOX

    3.8 0.0 L2 semver VS LSHBOX
    A c++ toolbox of locality-sensitive hashing (LSH), provides several popular LSH algorithms, also support python and matlab.
    RSIA-LIESMARS-WHU logo
  • Hashmaps

    3.7 0.0 L1 semver VS Hashmaps
    Various open addressing hashmap algorithms in C++
    goossaert logo
  • sparsehash-c11

    3.7 0.0 L3 semver VS sparsehash-c11
    Experimental C++11 version of sparsehash
    sparsehash logo
  • KOMIHASH

    3.3 4.6 semver VS KOMIHASH
    Very fast, high-quality hash function, discrete-incremental and streamed hashing-capable (non-cryptographic, header-only C/C++) 27GB/s + PRNG
    avaneev logo
  • stx-btree

    3.3 0.0 semver VS stx-btree
    OBSOLETE, contained in https://github.com/tlx/tlx - STX B+ Tree C++ Template Classes -
    bingmann logo
  • dynamic_bitset

    2.9 6.2 semver VS dynamic_bitset
    Simple Useful Libraries: C++17/20 header-only dynamic bitset
    pinam45 logo
  • C++ B-tree

    2.3 0.0 semver VS C++ B-tree
    DISCONTINUED. Git mirror of the official (mercurial) repository of cpp-btree
    algorithm-ninja logo
  • flat_map

    1.8 7.6 semver VS flat_map
    Header only associative linear container.
    Flast logo
  • [Boost.]Multi

    1.6 10.0 semver VS [Boost.]Multi
    Multidimensional arrays for C++. (Not an official Boost library) \\ This is a mirror of gitlab.com/correaa/boost-multi
    correaa logo
  • sqlitemap

    1.3 8.1 semver VS sqlitemap
    sqlitemap is a lightweight C++ wrapper around SQLite that provides a simple, map-like interface.
    bw-hro logo
  • Optional Argument in C++

    1.2 0.0 semver VS Optional Argument in C++
    Named Optional Arguments in C++17
    vincent-picaud logo
  • Learn Project

    1.0 0.0 semver VS Learn Project
    go study
    SAMARITAN2046 logo
  • f-code

    1.0 7.2 semver VS f-code
    DISCONTINUED. a C++ library consisting of basic functionality [GET https://api.github.com/repos/StanislavPetrov15/f-code: 404 - Not Found // See: https://docs.github.com/rest/repos/repos#get-a-repository]
    StanislavPetrov15 logo

* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.

Do you think we are missing an alternative of semver or a related project?

Add another 'Containers' Library

Popular Comparisons

  • semver
    vs
    [Boost.]Multi
  • semver
    vs
    PEGTL
  • semver
    vs
    sparsehash-c11
  • semver
    vs
    f-code
  • semver
    vs
    function2

README

         _____                            _   _
        / ____|                          | | (_)
       | (___   ___ _ __ ___   __ _ _ __ | |_ _  ___
        \___ \ / _ \ '_ ` _ \ / _` | '_ \| __| |/ __|
        ____) |  __/ | | | | | (_| | | | | |_| | (__
       |_____/ \___|_| |_| |_|\__,_|_| |_|\__|_|\___|
__      __           _             _                _____
\ \    / /          (_)           (_)              / ____|_     _
 \ \  / /__ _ __ ___ _  ___  _ __  _ _ __   __ _  | |   _| |_ _| |_
  \ \/ / _ \ '__/ __| |/ _ \| '_ \| | '_ \ / _` | | |  |_   _|_   _|
   \  /  __/ |  \__ \ | (_) | | | | | | | | (_| | | |____|_|   |_|
    \/ \___|_|  |___/_|\___/|_| |_|_|_| |_|\__, |  \_____|
                                            __/ |
                                           |___/

Github releases Vcpkg package Conan package [License](LICENSE)

C++ library compare and manipulate versions are available as extensions to the <major>.<minor>.<patch>-<prerelease_type>.<prerelease_number> format complying with Semantic Versioning 2.0.0

Features

  • C++17
  • Header-only
  • Dependency-free
  • Constexpr comparison: <, <=, ==, !=, > >=
  • Constexpr from string
  • Constexpr to string
  • Constexpr range matching

[Examples](example/)

  • Create
  constexpr version v1 = version{1, 2, 3, prerelease::rc, 4};
  constexpr version v2 = v1;
  • Сomparison
  constexpr semver::version v1{1, 4, 3};
  constexpr semver::version v2{1, 2, 4, semver::prerelease::alpha, 10};
  static_assert(v1 != v2);
  static_assert(v1 > v2);
  static_assert(v1 >= v2);
  static_assert(v2 < v1);
  static_assert(v2 <= v1);
  • To string
  semver::version v{1, 2, 3, prerelease::rc, 4};

  // To string.
  std::string s1 = v.to_string(); // may throw.

  // Non-member to string.
  std::string s2 = semver::to_string(v); // may throw.

  std::array<char, 32> str = {};

  // constexpr to chars, like <https://en.cppreference.com/w/cpp/utility/to_chars>.
  auto [p, ec] = v.to_chars(str.data(), str.data() + str.size()); // constexpr and no throw.

  // Non-member constexpr to chars, like <https://en.cppreference.com/w/cpp/utility/to_chars>.
  auto [p, ec] = semver::to_chars(str.data(), str.data() + str.size(), v); // constexpr and no throw.
  • From string
  std::string_view s = "1.2.3-rc.4";

  // From chars.
  semver::version v1{s}; // constexpr and may throw.

  // User-defined literals '_version'.
  semver::version v2 = "1.2.3-rc.4"_version; // constexpr and may throw.

  // constexpr from_chars, like <https://en.cppreference.com/w/cpp/utility/from_chars>.
  semver::version v3;
  auto [p, ec] = v3.to_chars(str.data(), str.data() + str.size()); // constexpr and no throw.

  // Non-member constexpr from chars, like <https://en.cppreference.com/w/cpp/utility/from_chars>.
  semver::version v4;
  auto [p, ec] = semver::to_chars(str.data(), str.data() + str.size(), v4); // constexpr and no throw.

  // Non-member from string.
  semver::version v5 = semver::from_string(s); // constexpr and may throw.
  std::optional<version> v6 = semver::from_string_noexcept(s); // constexpr and no throw.

  // From string.
  semver::version v7;
  v7.from_string(s); // constexpr and may throw.
  bool success = v7.from_string_noexcept(s); // constexpr and no throw.
  • Range matching
  constexpr auto range = semver::range(">=1.0.0 <2.0.0 || >3.2.1");
  constexpr auto version = semver::version("1.2.3");
  if (range.satisfies(version)) {
    // Do something.
  }
  • Range matching with prerelease tag
  constexpr auto range = semver::range(">1.2.3-beta.1");
  constexpr auto version = semver::version("3.4.5-alpha.0");

  // By default, version is allowed to satisfy range if at least one comparator with the same [major, minor, patch] has a prerelease tag.
  static_assert(!range.satisfies(version));
  // Suppress this behavior and treat prerelease versions as normal.
  static_assert(range.satisfies(version, semver::range::option::include_prerelease));

Integration

You should add required file [semver.hpp](include/semver.hpp).

If you are using vcpkg on your project for external dependencies, then you can use the neargye-semver.

If you are using Conan to manage your dependencies, merely add neargye-semver/x.y.z to your conan's requires, where x.y.z is the release version you want to use.

Alternatively, you can use something like CPM which is based on CMake's Fetch_Content module.

CPMAddPackage(
    NAME semver
    GITHUB_REPOSITORY Neargye/semver
    GIT_TAG x.y.z # Where `x.y.z` is the release version you want to use.
)

Compiler compatibility

  • Clang/LLVM >= 5
  • MSVC++ >= 14.11 / Visual Studio >= 2017
  • Xcode >= 10
  • GCC >= 7

Licensed under the [MIT License](LICENSE)


*Note that all licence references and agreements mentioned in the semver README section above are relevant to that project's source code only.

Do not miss the trending, libraries, news and articles with our weekly report.

Awesome C++ is part of the LibHunt network. Terms. Privacy Policy.

(CC)
BY-SA
Spin The Wheel Of Names for a cryptographically secure random name picker.
Schedule a when to meet poll.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.