Add vcpkg_Enums
ADD
include/vcpkg_Enums.h
+#pragma once
+#include <string>
+
+namespace vcpkg::Enums
+{
+ std::string nullvalue_toString(const std::string& enum_name);
+
+ __declspec(noreturn) void nullvalue_used(const std::string& enum_name);
+
+ __declspec(noreturn) void unreachable(const std::string& enum_name);
+}

ADD
src/vcpkg_Enums.cpp
+#include "pch.h"
+#include "vcpkg_Enums.h"
+#include "vcpkg_Checks.h"
+
+namespace vcpkg::Enums
+{
+ std::string nullvalue_toString(const std::string& enum_name)
+ {
+ return Strings::format("%s_NULLVALUE", enum_name);
+ }
+
+ void nullvalue_used(const std::string& enum_name)
+ {
+ Checks::exit_with_message("NULLVALUE of enum %s was used", enum_name);
+ }
+
+ void unreachable(const std::string& enum_name)
+ {
+ Checks::exit_with_message("Unreachable code for enum, %s", enum_name);
+ }
+}

MODIFY
vcpkglib/vcpkglib.vcxproj
vcpkglib/vcpkglib.vcxproj
<ClInclude Include="..\include\vcpkg_cmd_arguments.h" />
<ClInclude Include="..\include\vcpkg_Commands.h" />
<ClInclude Include="..\include\vcpkg_Dependencies.h" />
+ <ClInclude Include="..\include\vcpkg_Enums.h" />
<ClInclude Include="..\include\vcpkg_Environment.h" />
<ClInclude Include="..\include\vcpkg_Files.h" />
<ClInclude Include="..\include\vcpkg_Graphs.h" />
<ClCompile Include="..\src\vcpkg_Checks.cpp" />
<ClCompile Include="..\src\vcpkg_cmd_arguments.cpp" />
<ClCompile Include="..\src\vcpkg_Dependencies.cpp" />
+ <ClCompile Include="..\src\vcpkg_Enums.cpp" />
<ClCompile Include="..\src\vcpkg_Environment.cpp" />
<ClCompile Include="..\src\vcpkg_Files.cpp" />
<ClCompile Include="..\src\vcpkg_Input.cpp" />

MODIFY
vcpkglib/vcpkglib.vcxproj.filters
vcpkglib/vcpkglib.vcxproj.filters
<ClCompile Include="..\src\PostBuildLint_BuildType.cpp">
<Filter>Source Files</Filter>
</ClCompile>
+ <ClCompile Include="..\src\vcpkg_Enums.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\include\package_spec.h">
<ClInclude Include="..\include\PostBuildLint_BuildType.h">
<Filter>Header Files</Filter>
</ClInclude>
+ <ClInclude Include="..\include\vcpkg_Enums.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
</ItemGroup>
</Project>
\ No newline at end of file

Add vcpkg_Enums