From 72761e34e0e49be6049c989e7ad9ccd16b987b44 Mon Sep 17 00:00:00 2001 From: Mohammad Nejati Date: Sat, 13 Jul 2024 08:35:54 +0000 Subject: [PATCH] Rename typedef `base` to `core_ev_base` Using typedef `base` poses a high risk of name conflict, given that `empty_value` is inherited in user types. --- include/boost/core/empty_value.hpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/include/boost/core/empty_value.hpp b/include/boost/core/empty_value.hpp index bb95841..9f04d61 100644 --- a/include/boost/core/empty_value.hpp +++ b/include/boost/core/empty_value.hpp @@ -138,10 +138,10 @@ template class empty_value #if defined(BOOST_MSVC) : detail::empty_value_base { - typedef detail::empty_value_base base; + typedef detail::empty_value_base core_ev_base; #else : T { - typedef T base; + typedef T core_ev_base; #endif public: @@ -154,26 +154,26 @@ public: #endif BOOST_CONSTEXPR empty_value(boost::empty_init_t) - : base() { } + : core_ev_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(std::forward(value), std::forward(args)...) { } + : core_ev_base(std::forward(value), std::forward(args)...) { } #else template BOOST_CONSTEXPR empty_value(boost::empty_init_t, U&& value) - : base(std::forward(value)) { } + : core_ev_base(std::forward(value)) { } #endif #else template BOOST_CONSTEXPR empty_value(boost::empty_init_t, const U& value) - : base(value) { } + : core_ev_base(value) { } template BOOST_CONSTEXPR empty_value(boost::empty_init_t, U& value) - : base(value) { } + : core_ev_base(value) { } #endif BOOST_CONSTEXPR const T& get() const BOOST_NOEXCEPT {