mirror of
https://github.com/boostorg/optional.git
synced 2025-07-24 01:27:23 +02:00
Changed incorrect types in static assertions guarding against binding temporaries to optional refs
This commit is contained in:
@ -775,7 +775,7 @@ class optional : public optional_detail::optional_base<T>
|
|||||||
boost::is_same<BOOST_DEDUCED_TYPENAME boost::decay<Expr>::type, none_t>::value >::type* = 0
|
boost::is_same<BOOST_DEDUCED_TYPENAME boost::decay<Expr>::type, none_t>::value >::type* = 0
|
||||||
)
|
)
|
||||||
: base(boost::forward<Expr>(expr),boost::addressof(expr))
|
: base(boost::forward<Expr>(expr),boost::addressof(expr))
|
||||||
{optional_detail::prevent_binding_rvalue_ref_to_optional_lvalue_ref<T, rval_reference_type>();}
|
{optional_detail::prevent_binding_rvalue_ref_to_optional_lvalue_ref<T, Expr&&>();}
|
||||||
|
|
||||||
#else
|
#else
|
||||||
template<class Expr>
|
template<class Expr>
|
||||||
@ -812,7 +812,7 @@ class optional : public optional_detail::optional_base<T>
|
|||||||
>::type
|
>::type
|
||||||
operator= ( Expr&& expr )
|
operator= ( Expr&& expr )
|
||||||
{
|
{
|
||||||
optional_detail::prevent_binding_rvalue_ref_to_optional_lvalue_ref<T, rval_reference_type>();
|
optional_detail::prevent_binding_rvalue_ref_to_optional_lvalue_ref<T, Expr&&>();
|
||||||
this->assign_expr(boost::forward<Expr>(expr),boost::addressof(expr));
|
this->assign_expr(boost::forward<Expr>(expr),boost::addressof(expr));
|
||||||
return *this ;
|
return *this ;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user