From 95428f53691d232d961bb136f35d096967d38d5f Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 3 Apr 2017 16:27:51 -0700 Subject: optional -> Optional --- toolsrc/include/vcpkg_Dependencies.h | 6 +++--- toolsrc/include/vcpkg_System.h | 4 ++-- toolsrc/include/vcpkg_optional.h | 14 +++++++------- 3 files changed, 12 insertions(+), 12 deletions(-) (limited to 'toolsrc/include') diff --git a/toolsrc/include/vcpkg_Dependencies.h b/toolsrc/include/vcpkg_Dependencies.h index b734295fc..f04c41574 100644 --- a/toolsrc/include/vcpkg_Dependencies.h +++ b/toolsrc/include/vcpkg_Dependencies.h @@ -25,15 +25,15 @@ namespace vcpkg::Dependencies struct InstallPlanAction { InstallPlanAction(); - InstallPlanAction(const InstallPlanType& plan_type, optional binary_pgh, optional source_pgh); + InstallPlanAction(const InstallPlanType& plan_type, Optional binary_pgh, Optional source_pgh); InstallPlanAction(const InstallPlanAction&) = delete; InstallPlanAction(InstallPlanAction&&) = default; InstallPlanAction& operator=(const InstallPlanAction&) = delete; InstallPlanAction& operator=(InstallPlanAction&&) = default; InstallPlanType plan_type; - optional binary_pgh; - optional source_pgh; + Optional binary_pgh; + Optional source_pgh; }; struct PackageSpecWithInstallPlan diff --git a/toolsrc/include/vcpkg_System.h b/toolsrc/include/vcpkg_System.h index 2c2b945f4..e4f93ad8f 100644 --- a/toolsrc/include/vcpkg_System.h +++ b/toolsrc/include/vcpkg_System.h @@ -59,9 +59,9 @@ namespace vcpkg::System return println(c, Strings::format(messageTemplate, messageArg1, messageArgs...)); } - optional get_environmental_variable(const CWStringView varname) noexcept; + Optional get_environmental_variable(const CWStringView varname) noexcept; - optional get_registry_string(HKEY base, const CWStringView subkey, const CWStringView valuename); + Optional get_registry_string(HKEY base, const CWStringView subkey, const CWStringView valuename); const fs::path& get_ProgramFiles_32_bit(); diff --git a/toolsrc/include/vcpkg_optional.h b/toolsrc/include/vcpkg_optional.h index 5aea6cc59..4a2ceec30 100644 --- a/toolsrc/include/vcpkg_optional.h +++ b/toolsrc/include/vcpkg_optional.h @@ -4,23 +4,23 @@ namespace vcpkg { - struct nullopt_t + struct NullOpt { - explicit constexpr nullopt_t(int) {} + explicit constexpr NullOpt(int) {} }; - const static constexpr nullopt_t nullopt{ 0 }; + const static constexpr NullOpt nullopt{ 0 }; template - class optional + class Optional { public: // Constructors are intentionally implicit - constexpr optional(nullopt_t) : m_is_present(false), m_t() { } + constexpr Optional(NullOpt) : m_is_present(false), m_t() { } - optional(const T& t) : m_is_present(true), m_t(t) { } + Optional(const T& t) : m_is_present(true), m_t(t) { } - optional(T&& t) : m_is_present(true), m_t(std::move(t)) { } + Optional(T&& t) : m_is_present(true), m_t(std::move(t)) { } T&& value_or_exit(const LineInfo& line_info) && { -- cgit v1.2.3