ENUM_NAME should be in the enum namespace
MODIFY
include/PostBuildLint_BuildPolicies.h
include/PostBuildLint_BuildPolicies.h
@@ -28,10 +28,10 @@ namespace vcpkg::PostBuildLint
BackingEnum backing_enum;
};
- static const std::string ENUM_NAME = "vcpkg::PostBuildLint::BuildPolicies";
-
namespace BuildPoliciesC
{
+ static constexpr const char* ENUM_NAME = "vcpkg::PostBuildLint::BuildPolicies";
+
static constexpr BuildPolicies NULLVALUE(BuildPolicies::BackingEnum::NULLVALUE);
static constexpr BuildPolicies EMPTY_PACKAGE(BuildPolicies::BackingEnum::EMPTY_PACKAGE);
static constexpr BuildPolicies DLLS_WITHOUT_LIBS(BuildPolicies::BackingEnum::DLLS_WITHOUT_LIBS);

MODIFY
src/PostBuildLint_BuildPolicies.cpp
src/PostBuildLint_BuildPolicies.cpp
namespace vcpkg::PostBuildLint
{
- static const std::string NULLVALUE_STRING = Enums::nullvalue_to_string(ENUM_NAME);
+ static const std::string NULLVALUE_STRING = Enums::nullvalue_to_string(BuildPoliciesC::ENUM_NAME);
static const std::string NAME_EMPTY_PACKAGE = "PolicyEmptyPackage";
static const std::string NAME_DLLS_WITHOUT_LIBS = "PolicyDLLsWithoutLIBs";
@@ -74,7 +74,7 @@ namespace vcpkg::PostBuildLint
case BuildPoliciesC::EMPTY_INCLUDE_FOLDER:
return CMAKE_VARIABLE_EMPTY_INCLUDE_FOLDER;
case BuildPoliciesC::NULLVALUE:
- Enums::nullvalue_used(VCPKG_LINE_INFO, ENUM_NAME);
+ Enums::nullvalue_used(VCPKG_LINE_INFO, BuildPoliciesC::ENUM_NAME);
default:
Checks::unreachable(VCPKG_LINE_INFO);
}

ENUM_NAME should be in the enum namespace