From 75f19a58ba27f79da4c57d22e4a9e92afcb55d4c Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Sat, 27 Jan 2018 00:44:07 +0200 Subject: [vcpkg] Add string constructor (#2429) * [vcpkg] Add string constructor * Update versiont.h --- toolsrc/include/vcpkg/versiont.h | 1 + toolsrc/src/vcpkg/versiont.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/toolsrc/include/vcpkg/versiont.h b/toolsrc/include/vcpkg/versiont.h index 6d8332521..8427dfe3b 100644 --- a/toolsrc/include/vcpkg/versiont.h +++ b/toolsrc/include/vcpkg/versiont.h @@ -6,6 +6,7 @@ namespace vcpkg struct VersionT { VersionT(); + VersionT(std::string&& value); VersionT(const std::string& value); const std::string& to_string() const; diff --git a/toolsrc/src/vcpkg/versiont.cpp b/toolsrc/src/vcpkg/versiont.cpp index 91f7e23ef..0d4a39255 100644 --- a/toolsrc/src/vcpkg/versiont.cpp +++ b/toolsrc/src/vcpkg/versiont.cpp @@ -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(); } -- cgit v1.2.3