From 9e9e6e3898085b2ec93f82b9ce099b556c5ccfc0 Mon Sep 17 00:00:00 2001 From: Glen Fernandes Date: Tue, 16 Jul 2024 23:53:47 -0400 Subject: [PATCH] Rename base type again --- include/boost/core/empty_value.hpp | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/include/boost/core/empty_value.hpp b/include/boost/core/empty_value.hpp index 6728bc2..5eeee51 100644 --- a/include/boost/core/empty_value.hpp +++ b/include/boost/core/empty_value.hpp @@ -96,8 +96,10 @@ private: #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) #if defined(BOOST_MSVC) -// This is a workaround to an MSVC bug when T is a nested class. -// See https://developercommunity.visualstudio.com/t/Compiler-bug:-Incorrect-C2247-and-C2248/10690025 +/* +This is a workaround to an MSVC bug when T is a nested class: +https://developercommunity.visualstudio.com/t/Compiler-bug:-Incorrect-C2247-and-C2248/10690025 +*/ namespace detail { template @@ -138,10 +140,10 @@ template class empty_value #if defined(BOOST_MSVC) : detail::empty_value_base { - typedef detail::empty_value_base base_type; + typedef detail::empty_value_base empty_base_; #else : T { - typedef T base_type; + typedef T empty_base_; #endif public: @@ -154,26 +156,26 @@ public: #endif BOOST_CONSTEXPR empty_value(boost::empty_init_t) - : base_type() { } + : empty_base_() { } #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) template BOOST_CONSTEXPR empty_value(boost::empty_init_t, U&& value, Args&&... args) - : base_type(std::forward(value), std::forward(args)...) { } + : empty_base_(std::forward(value), std::forward(args)...) { } #else template BOOST_CONSTEXPR empty_value(boost::empty_init_t, U&& value) - : base_type(std::forward(value)) { } + : empty_base_(std::forward(value)) { } #endif #else template BOOST_CONSTEXPR empty_value(boost::empty_init_t, const U& value) - : base_type(value) { } + : empty_base_(value) { } template BOOST_CONSTEXPR empty_value(boost::empty_init_t, U& value) - : base_type(value) { } + : empty_base_(value) { } #endif BOOST_CONSTEXPR const T& get() const BOOST_NOEXCEPT {