mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-04 18:26:39 +02:00
23 lines
520 B
C++
23 lines
520 B
C++
#pragma once
|
|
|
|
#include <string>
|
|
#include <optional>
|
|
#include <compare>
|
|
|
|
struct VersionHelper
|
|
{
|
|
VersionHelper(const size_t major, const size_t minor, const size_t revision);
|
|
|
|
auto operator<=>(const VersionHelper&) const = default;
|
|
|
|
static std::optional<VersionHelper> fromString(std::string_view s);
|
|
static std::optional<VersionHelper> fromString(std::wstring_view s);
|
|
|
|
size_t major;
|
|
size_t minor;
|
|
size_t revision;
|
|
|
|
std::wstring toWstring() const;
|
|
std::string toString() const;
|
|
};
|