forked from boostorg/core
Add overloads for non-const lvalue reference
This commit is contained in:
@ -71,6 +71,10 @@ public:
|
|||||||
template<class U>
|
template<class U>
|
||||||
empty_value(boost::empty_init_t, const U& value)
|
empty_value(boost::empty_init_t, const U& value)
|
||||||
: value_(value) { }
|
: value_(value) { }
|
||||||
|
|
||||||
|
template<class U>
|
||||||
|
empty_value(boost::empty_init_t, U& value)
|
||||||
|
: value_(value) { }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
const T& get() const BOOST_NOEXCEPT {
|
const T& get() const BOOST_NOEXCEPT {
|
||||||
@ -115,6 +119,10 @@ public:
|
|||||||
template<class U>
|
template<class U>
|
||||||
empty_value(boost::empty_init_t, const U& value)
|
empty_value(boost::empty_init_t, const U& value)
|
||||||
: T(value) { }
|
: T(value) { }
|
||||||
|
|
||||||
|
template<class U>
|
||||||
|
empty_value(boost::empty_init_t, U& value)
|
||||||
|
: T(value) { }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
const T& get() const BOOST_NOEXCEPT {
|
const T& get() const BOOST_NOEXCEPT {
|
||||||
|
@ -71,6 +71,11 @@ struct noinit_adaptor
|
|||||||
void construct(U* p, const V& v) {
|
void construct(U* p, const V& v) {
|
||||||
::new((void*)p) U(v);
|
::new((void*)p) U(v);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template<class U, class V>
|
||||||
|
void construct(U* p, V& v) {
|
||||||
|
::new((void*)p) U(v);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
template<class U>
|
template<class U>
|
||||||
|
Reference in New Issue
Block a user