diff --git a/include/boost/core/empty_value.hpp b/include/boost/core/empty_value.hpp index 9265f05..7139b3e 100644 --- a/include/boost/core/empty_value.hpp +++ b/include/boost/core/empty_value.hpp @@ -71,6 +71,10 @@ public: template empty_value(boost::empty_init_t, const U& value) : value_(value) { } + + template + empty_value(boost::empty_init_t, U& value) + : value_(value) { } #endif const T& get() const BOOST_NOEXCEPT { @@ -115,6 +119,10 @@ public: template empty_value(boost::empty_init_t, const U& value) : T(value) { } + + template + empty_value(boost::empty_init_t, U& value) + : T(value) { } #endif const T& get() const BOOST_NOEXCEPT { diff --git a/include/boost/core/noinit_adaptor.hpp b/include/boost/core/noinit_adaptor.hpp index 26fa7c3..22c9aab 100644 --- a/include/boost/core/noinit_adaptor.hpp +++ b/include/boost/core/noinit_adaptor.hpp @@ -71,6 +71,11 @@ struct noinit_adaptor void construct(U* p, const V& v) { ::new((void*)p) U(v); } + + template + void construct(U* p, V& v) { + ::new((void*)p) U(v); + } #endif template