Changed incorrect types in static assertions guarding against binding temporaries to optional refs

This commit is contained in:
Andrzej Krzemienski
2014-05-02 15:41:43 +02:00
parent c51f3e810b
commit 897fdad11b

View File

@ -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 ;
} }