From 7ee180ebdd7ec93a4ba3c34c38fd467109365ad6 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 3 Apr 2017 14:48:24 -0700 Subject: paragraph_parse_result -> ParagraphParseResult --- toolsrc/include/ParagraphParseResult.h | 35 ++++++++++++++++++++++++++++++++ toolsrc/include/paragraph_parse_result.h | 35 -------------------------------- 2 files changed, 35 insertions(+), 35 deletions(-) create mode 100644 toolsrc/include/ParagraphParseResult.h delete mode 100644 toolsrc/include/paragraph_parse_result.h (limited to 'toolsrc/include') diff --git a/toolsrc/include/ParagraphParseResult.h b/toolsrc/include/ParagraphParseResult.h new file mode 100644 index 000000000..0d1f13f61 --- /dev/null +++ b/toolsrc/include/ParagraphParseResult.h @@ -0,0 +1,35 @@ +#pragma once +#include + +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 : ::std::true_type + { + }; +} diff --git a/toolsrc/include/paragraph_parse_result.h b/toolsrc/include/paragraph_parse_result.h deleted file mode 100644 index 47f20c08e..000000000 --- a/toolsrc/include/paragraph_parse_result.h +++ /dev/null @@ -1,35 +0,0 @@ -#pragma once -#include - -namespace vcpkg -{ - enum class paragraph_parse_result - { - SUCCESS = 0, - EXPECTED_ONE_PARAGRAPH - }; - - struct paragraph_parse_result_category_impl 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(paragraph_parse_result e); - - paragraph_parse_result to_paragraph_parse_result(int i); - - paragraph_parse_result to_paragraph_parse_result(std::error_code ec); -} - -// Enable implicit conversion to std::error_code -namespace std -{ - template <> - struct is_error_code_enum : ::std::true_type - { - }; -} -- cgit v1.2.3