vcpkg/toolsrc/src/vcpkg_Enums.cpp

15 lines
413 B
C++
Raw Normal View History

2017-02-10 10:26:16 +08:00
#include "pch.h"
2017-04-28 09:08:52 +08:00
2017-02-10 10:26:16 +08:00
#include "vcpkg_Checks.h"
2017-04-28 09:08:52 +08:00
#include "vcpkg_Enums.h"
2017-02-10 10:26:16 +08:00
namespace vcpkg::Enums
{
std::string nullvalue_to_string(const CStringView enum_name) { return Strings::format("%s_NULLVALUE", enum_name); }
2017-02-10 10:26:16 +08:00
[[noreturn]] void nullvalue_used(const LineInfo& line_info, const CStringView enum_name)
2017-02-10 10:26:16 +08:00
{
Checks::exit_with_message(line_info, "NULLVALUE of enum %s was used", enum_name);
2017-02-10 10:26:16 +08:00
}
}