From 0dbd5aaadd07ea5ea2923e3e2b83982472051fa2 Mon Sep 17 00:00:00 2001 From: Glen Fernandes Date: Sat, 23 May 2020 19:53:16 -0400 Subject: [PATCH] Update empty_value constructors --- doc/empty_value.qbk | 2 +- include/boost/core/empty_value.hpp | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/doc/empty_value.qbk b/doc/empty_value.qbk index a8fe72d..f693aeb 100644 --- a/doc/empty_value.qbk +++ b/doc/empty_value.qbk @@ -90,7 +90,7 @@ public: empty_value() = default; template - explicit empty_value(empty_init_t, Args&&... args); + empty_value(empty_init_t, Args&&... args); const T& get() const noexcept; diff --git a/include/boost/core/empty_value.hpp b/include/boost/core/empty_value.hpp index 289b05b..2ac2331 100644 --- a/include/boost/core/empty_value.hpp +++ b/include/boost/core/empty_value.hpp @@ -59,9 +59,9 @@ public: #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) - template - explicit empty_value(boost::empty_init_t, Args&&... args) - : value_(std::forward(args)...) { } + template + empty_value(boost::empty_init_t, U&& value, Args&&... args) + : value_(std::forward(value), std::forward(args)...) { } #else template empty_value(boost::empty_init_t, U&& value) @@ -107,9 +107,9 @@ public: #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) - template - explicit empty_value(boost::empty_init_t, Args&&... args) - : T(std::forward(args)...) { } + template + empty_value(boost::empty_init_t, U&& value, Args&&... args) + : T(std::forward(value), std::forward(args)...) { } #else template empty_value(boost::empty_init_t, U&& value)