Fix Value constructor, we never want to create reference values
This commit is contained in:
parent
fb2fb3811f
commit
cdbd81523a
|
@ -18,7 +18,8 @@ struct Value
|
||||||
|
|
||||||
template<typename T,
|
template<typename T,
|
||||||
typename = typename std::enable_if<not std::is_same<Value, T>::value>::type>
|
typename = typename std::enable_if<not std::is_same<Value, T>::value>::type>
|
||||||
Value(T&& val) : m_value{new Model<T>{std::forward<T>(val)}} {}
|
Value(T&& val)
|
||||||
|
: m_value{new Model<typename std::remove_reference<T>::type>{std::forward<T>(val)}} {}
|
||||||
|
|
||||||
Value(const Value& val) = delete;
|
Value(const Value& val) = delete;
|
||||||
Value(Value&&) = default;
|
Value(Value&&) = default;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user