mirror of
https://github.com/boostorg/core.git
synced 2025-07-29 20:37:22 +02:00
Add overloads for non-const lvalue reference
This commit is contained in:
@ -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 {
|
||||
|
@ -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>
|
||||
|
Reference in New Issue
Block a user