cli11
Loading...
Searching...
No Matches
version.cpp File Reference
module cli11

Compile-time version information for the cli11 library. More...

import std;

Enumerations

enum class  cli::token_t : std::uint8_t { short_ , class_ , return_ , while_ }
 Token kinds. More...

Variables

constexpr int cli::version_major = 2
 Major component of the library version.
constexpr int cli::version_minor = 6
 Minor component of the library version.
constexpr int cli::version_patch = 2
 Patch component of the library version.
constexpr std::string_view cli::version = "2.6.2"
 Full library version, formatted as "major.minor.patch".

Detailed Description

Compile-time version information for the cli11 library.

Every value in this partition is a constant expression, so all of them may be used in static_assert and other compile-time contexts:

static_assert(cli::version_major >= 2, "cli11 2.x or newer is required");
constexpr int version_major
Major component of the library version.
Definition version.cpp:19

Enumeration Type Documentation

◆ token_t

enum class cli::token_t : std::uint8_t
exportstrong

Token kinds.

Note
Every enumerator here names a C++ keyword, so each carries a trailing underscore. Keywords are keyword tokens from translation phase 7 and are never identifiers, so they cannot appear in enumerator position regardless of the enclosing scope.
Enumerator
short_ 

The short keyword.

class_ 

The class keyword.

return_ 

The return keyword.

while_ 

The while keyword.

Variable Documentation

◆ version

std::string_view cli::version = "2.6.2"
constexprexport

Full library version, formatted as "major.minor.patch".

Note
This is a std::string_view, not a const char *. Copy-initialising a std::string from it (std::string s = cli::version;) will not compile, because the relevant std::string constructor is explicit. Use direct initialisation instead: std::string s{cli::version};.