vcpkg/toolsrc/src/PackageSpecParseResult.cpp
2017-06-06 14:02:59 -07:00

21 lines
631 B
C++

#include "pch.h"
#include "PackageSpecParseResult.h"
#include "vcpkg_Checks.h"
namespace vcpkg
{
CStringView to_string(PackageSpecParseResult ev) noexcept
{
switch (ev)
{
case PackageSpecParseResult::SUCCESS: return "OK";
case PackageSpecParseResult::TOO_MANY_COLONS: return "Too many colons";
case PackageSpecParseResult::INVALID_CHARACTERS:
return "Contains invalid characters. Only alphanumeric lowercase ASCII characters and dashes are "
"allowed";
default: Checks::unreachable(VCPKG_LINE_INFO);
}
}
}