diff options
| author | Alexander Karatarakis <alkarata@microsoft.com> | 2017-02-09 19:00:09 -0800 |
|---|---|---|
| committer | Alexander Karatarakis <alkarata@microsoft.com> | 2017-02-10 14:00:11 -0800 |
| commit | 95650bdd424b9499f4676dae8f110b15b3fd024f (patch) | |
| tree | e37452ea2f1e342e40bbd31480b210742f38088b /toolsrc/include/PostBuildLint_BuildPolicies.h | |
| parent | 7a0404cb839ae49bf7e52ca54f905d182a12de5d (diff) | |
| download | vcpkg-95650bdd424b9499f4676dae8f110b15b3fd024f.tar.gz vcpkg-95650bdd424b9499f4676dae8f110b15b3fd024f.zip | |
PostBuildLint enum revamp
Diffstat (limited to 'toolsrc/include/PostBuildLint_BuildPolicies.h')
| -rw-r--r-- | toolsrc/include/PostBuildLint_BuildPolicies.h | 13 |
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); } |
