vcpkg/toolsrc/include/ParagraphParseResult.h
2017-04-04 16:44:41 -07:00

36 lines
812 B
C++

#pragma once
#include <system_error>
namespace vcpkg
{
enum class ParagraphParseResult
{
SUCCESS = 0,
EXPECTED_ONE_PARAGRAPH
};
struct ParagraphParseResultCategoryImpl final : std::error_category
{
virtual const char* name() const noexcept override;
virtual std::string message(int ev) const noexcept override;
};
const std::error_category& paragraph_parse_result_category();
std::error_code make_error_code(ParagraphParseResult e);
ParagraphParseResult to_paragraph_parse_result(int i);
ParagraphParseResult to_paragraph_parse_result(std::error_code ec);
}
// Enable implicit conversion to std::error_code
namespace std
{
template <>
struct is_error_code_enum<vcpkg::ParagraphParseResult> : ::std::true_type
{
};
}