aboutsummaryrefslogtreecommitdiff
path: root/toolsrc/include/PostBuildLint_BuildPolicies.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_BuildPolicies.h
parentd9462fdf490d3396cac58b1a935b1b8a982b3a72 (diff)
parentb921dce5fc17bd4c1c206b79eb0a7b8758dcf5bf (diff)
downloadvcpkg-7d4df89c1dfff0b2bad0165ac4579f6352935a94.tar.gz
vcpkg-7d4df89c1dfff0b2bad0165ac4579f6352935a94.zip
Merge branch 'master' into master
Diffstat (limited to 'toolsrc/include/PostBuildLint_BuildPolicies.h')
-rw-r--r--toolsrc/include/PostBuildLint_BuildPolicies.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/toolsrc/include/PostBuildLint_BuildPolicies.h b/toolsrc/include/PostBuildLint_BuildPolicies.h
index 187ba6d64..082de31d0 100644
--- a/toolsrc/include/PostBuildLint_BuildPolicies.h
+++ b/toolsrc/include/PostBuildLint_BuildPolicies.h
@@ -1,17 +1,19 @@
#pragma once
#include <string>
+#include <array>
namespace vcpkg::PostBuildLint::BuildPolicies
{
enum class backing_enum_t
{
- UNKNOWN = 0,
+ NULLVALUE = 0,
EMPTY_PACKAGE,
DLLS_WITHOUT_LIBS
};
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; }
@@ -19,17 +21,16 @@ namespace vcpkg::PostBuildLint::BuildPolicies
const std::string& cmake_variable() const;
private:
- type();
backing_enum_t backing_enum;
};
- static constexpr int value_count = 3;
- const std::vector<type>& values();
+ static const std::string ENUM_NAME = "vcpkg::PostBuildLint::BuildPolicies";
-
- static constexpr type UNKNOWN(backing_enum_t::UNKNOWN);
+ static constexpr type NULLVALUE(backing_enum_t::NULLVALUE);
static constexpr type EMPTY_PACKAGE(backing_enum_t::EMPTY_PACKAGE);
static constexpr type DLLS_WITHOUT_LIBS(backing_enum_t::DLLS_WITHOUT_LIBS);
+ static constexpr std::array<type, 2> values = { EMPTY_PACKAGE, DLLS_WITHOUT_LIBS };
+
type parse(const std::string& s);
}