aboutsummaryrefslogtreecommitdiff
path: root/toolsrc/include/triplet.h
diff options
context:
space:
mode:
Diffstat (limited to 'toolsrc/include/triplet.h')
-rw-r--r--toolsrc/include/triplet.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/toolsrc/include/triplet.h b/toolsrc/include/triplet.h
index f9d1e9483..32ea2e711 100644
--- a/toolsrc/include/triplet.h
+++ b/toolsrc/include/triplet.h
@@ -6,17 +6,22 @@ namespace vcpkg
{
struct triplet
{
+ static triplet from_canonical_name(const std::string& triplet_as_string);
+
static const triplet X86_WINDOWS;
static const triplet X64_WINDOWS;
static const triplet X86_UWP;
static const triplet X64_UWP;
static const triplet ARM_UWP;
- std::string value;
+ const std::string& canonical_name() const;
std::string architecture() const;
std::string system() const;
+
+ private:
+ std::string m_canonical_name;
};
bool operator==(const triplet& left, const triplet& right);
@@ -39,7 +44,7 @@ namespace std
{
std::hash<std::string> hasher;
size_t hash = 17;
- hash = hash * 31 + hasher(t.value);
+ hash = hash * 31 + hasher(t.canonical_name());
return hash;
}
};