mirror of
https://github.com/cemu-project/vcpkg.git
synced 2025-02-23 02:57:09 +01:00
[vcpkg] Add string constructor (#2429)
* [vcpkg] Add string constructor * Update versiont.h
This commit is contained in:
parent
884afaa9ce
commit
75f19a58ba
@ -6,6 +6,7 @@ namespace vcpkg
|
||||
struct VersionT
|
||||
{
|
||||
VersionT();
|
||||
VersionT(std::string&& value);
|
||||
VersionT(const std::string& value);
|
||||
|
||||
const std::string& to_string() const;
|
||||
|
@ -6,6 +6,7 @@
|
||||
namespace vcpkg
|
||||
{
|
||||
VersionT::VersionT() : value("0.0.0") {}
|
||||
VersionT::VersionT(std::string&& value) : value(std::move(value)) {}
|
||||
VersionT::VersionT(const std::string& value) : value(value) {}
|
||||
const std::string& VersionT::to_string() const { return value; }
|
||||
bool operator==(const VersionT& left, const VersionT& right) { return left.to_string() == right.to_string(); }
|
||||
|
Loading…
x
Reference in New Issue
Block a user