vcpkg/toolsrc/include/Version.cpp
Alexander Karatarakis b766a005b7 version_t -> VersionT
2017-04-04 16:44:43 -07:00

21 lines
774 B
C++

#include "pch.h"
#include "Version.h"
#include "vcpkg_Strings.h"
namespace vcpkg
{
Version::Version() : value("0.0.0") {}
Version::Version(const std::string& value) : value(value) {}
bool operator==(const Version& left, const Version& right) { return left.value == right.value; }
bool operator!=(const Version& left, const Version& right) { return left.value != right.value; }
std::string to_printf_arg(const Version& version) { return version.value; }
version_diff_t::version_diff_t() : left(), right() {}
version_diff_t::version_diff_t(const Version& left, const Version& right) : left(left), right(right) {}
std::string version_diff_t::toString() const
{
return Strings::format("%s -> %s", left.value, right.value);
}
}