aboutsummaryrefslogtreecommitdiff
path: root/toolsrc/include/PostBuildLint_LinkageType.h
diff options
context:
space:
mode:
authorRobert Schumacher <roschuma@microsoft.com>2017-02-21 13:39:36 -0800
committerGitHub <noreply@github.com>2017-02-21 13:39:36 -0800
commit7d4df89c1dfff0b2bad0165ac4579f6352935a94 (patch)
tree8b87d29fb74fb24984d5aff9b021f14d95afb5ab /toolsrc/include/PostBuildLint_LinkageType.h
parentd9462fdf490d3396cac58b1a935b1b8a982b3a72 (diff)
parentb921dce5fc17bd4c1c206b79eb0a7b8758dcf5bf (diff)
downloadvcpkg-7d4df89c1dfff0b2bad0165ac4579f6352935a94.tar.gz
vcpkg-7d4df89c1dfff0b2bad0165ac4579f6352935a94.zip
Merge branch 'master' into master
Diffstat (limited to 'toolsrc/include/PostBuildLint_LinkageType.h')
-rw-r--r--toolsrc/include/PostBuildLint_LinkageType.h30
1 files changed, 24 insertions, 6 deletions
diff --git a/toolsrc/include/PostBuildLint_LinkageType.h b/toolsrc/include/PostBuildLint_LinkageType.h
index 7cca97639..0cecc8c9f 100644
--- a/toolsrc/include/PostBuildLint_LinkageType.h
+++ b/toolsrc/include/PostBuildLint_LinkageType.h
@@ -1,16 +1,34 @@
#pragma once
#include <string>
-namespace vcpkg::PostBuildLint
+namespace vcpkg::PostBuildLint::LinkageType
{
- enum class LinkageType
+ enum class backing_enum_t
{
+ NULLVALUE = 0,
DYNAMIC,
- STATIC,
- UNKNOWN
+ STATIC
};
- LinkageType linkage_type_value_of(const std::string& as_string);
+ struct type
+ {
+ constexpr type() : backing_enum(backing_enum_t::NULLVALUE) {}
+ constexpr explicit type(backing_enum_t backing_enum) : backing_enum(backing_enum) { }
+ constexpr operator backing_enum_t() const { return backing_enum; }
+
+ const std::string& toString() const;
+
+ private:
+ backing_enum_t backing_enum;
+ };
+
+ static const std::string ENUM_NAME = "vcpkg::PostBuildLint::LinkageType";
+
+ static constexpr type NULLVALUE(backing_enum_t::NULLVALUE);
+ static constexpr type DYNAMIC(backing_enum_t::DYNAMIC);
+ static constexpr type STATIC(backing_enum_t::STATIC);
+
+ static constexpr std::array<type, 2> values = { DYNAMIC, STATIC };
- std::string to_string(const LinkageType& build_info);
+ type value_of(const std::string& as_string);
}