Add overloads for non-const lvalue reference

This commit is contained in:
Glen Fernandes
2019-05-19 23:48:11 -04:00
parent 29f281fe7a
commit 4f141646b5
2 changed files with 13 additions and 0 deletions

View File

@ -71,6 +71,10 @@ public:
template<class U>
empty_value(boost::empty_init_t, const U& value)
: value_(value) { }
template<class U>
empty_value(boost::empty_init_t, U& value)
: value_(value) { }
#endif
const T& get() const BOOST_NOEXCEPT {
@ -115,6 +119,10 @@ public:
template<class U>
empty_value(boost::empty_init_t, const U& value)
: T(value) { }
template<class U>
empty_value(boost::empty_init_t, U& value)
: T(value) { }
#endif
const T& get() const BOOST_NOEXCEPT {

View File

@ -71,6 +71,11 @@ struct noinit_adaptor
void construct(U* p, const V& v) {
::new((void*)p) U(v);
}
template<class U, class V>
void construct(U* p, V& v) {
::new((void*)p) U(v);
}
#endif
template<class U>