|
constexpr std::uint8_t | get_major () const noexcept |
|
constexpr std::uint8_t | get_minor () const noexcept |
|
constexpr std::uint8_t | get_patch () const noexcept |
|
std::size_t | to_string (char buffer[12]) const noexcept |
|
|
static constexpr Version | from (std::uint8_t major, std::uint8_t minor, std::uint8_t patch) noexcept |
|
- Examples
- curl_version.cc.
Definition at line 69 of file curl.hpp.
◆ to_string()
std::size_t curl::curl_t::Version::to_string |
( |
char |
buffer[12] | ) |
const |
|
noexcept |
- Parameters
-
buffer | is required to be at least 12 bytes long. Will be write in format "uint8_t.uint8_t.uint8_t" (with trailing '\0'). |
- Returns
- If success, the number of characters writen to buffer (excluding trailing '\0'); If failed, return negative value.
Definition at line 57 of file curl.cc.
59 return std::snprintf(buffer, 12,
"%" PRIu8
".%" PRIu8
".%" PRIu8, get_major(), get_minor(), get_patch());
◆ operator<
constexpr friend bool operator< |
( |
const Version & |
x, |
|
|
const Version & |
y |
|
) |
| |
|
friend |
Check whether version x is older than version y.
Definition at line 32 of file curl.cc.
◆ operator<=
constexpr friend bool operator<= |
( |
const Version & |
x, |
|
|
const Version & |
y |
|
) |
| |
|
friend |
Check whether version x is older than or the same as version y.
Definition at line 36 of file curl.cc.
38 return x.num <= y.num;
◆ operator>
constexpr friend bool operator> |
( |
const Version & |
x, |
|
|
const Version & |
y |
|
) |
| |
|
friend |
Check whether version x is newer than version y.
Definition at line 40 of file curl.cc.
◆ operator>=
constexpr friend bool operator>= |
( |
const Version & |
x, |
|
|
const Version & |
y |
|
) |
| |
|
friend |
Check whether version x is newer than or the same as version y.
Definition at line 44 of file curl.cc.
46 return x.num >= y.num;
◆ operator==
constexpr friend bool operator== |
( |
const Version & |
x, |
|
|
const Version & |
y |
|
) |
| |
|
friend |
Check whether version x is the same as version y.
Definition at line 48 of file curl.cc.
50 return x.num == y.num;
◆ operator!=
constexpr friend bool operator!= |
( |
const Version & |
x, |
|
|
const Version & |
y |
|
) |
| |
|
friend |
Check whether version x is not the same as version y.
Definition at line 52 of file curl.cc.
54 return x.num != y.num;
The documentation for this struct was generated from the following files: