Ticket #10839: optional.hpp.diff
File optional.hpp.diff, 2.7 KB (added by , 8 years ago) |
---|
-
boost/optional/optional.hpp
old new 262 262 : 263 263 m_initialized(false) 264 264 { 265 construct( boost::move(val) );265 construct( types::move(val) ); 266 266 } 267 267 #endif 268 268 … … 410 410 void assign ( rval_reference_type val ) 411 411 { 412 412 if (is_initialized()) 413 assign_value( boost::move(val), is_reference_predicate() );414 else construct( boost::move(val) );413 assign_value( types::move(val), is_reference_predicate() ); 414 else construct( types::move(val) ); 415 415 } 416 416 #endif 417 417 … … 805 805 base() 806 806 { 807 807 if ( rhs.is_initialized() ) 808 this->construct( boost::move(rhs.get()) );808 this->construct( optional<U>::types::move(rhs.get()) ); 809 809 } 810 810 #endif 811 811 … … 898 898 template<class U> 899 899 optional& operator= ( optional<U> && rhs ) 900 900 { 901 this->assign(b oost::move(rhs));901 this->assign(base::types::move(rhs)); 902 902 return *this ; 903 903 } 904 904 #endif … … 935 935 optional& operator= ( rval_reference_type val ) 936 936 { 937 937 optional_detail::prevent_binding_rvalue_ref_to_optional_lvalue_ref<T, rval_reference_type>(); 938 this->assign( b oost::move(val) ) ;938 this->assign( base::types::move(val) ) ; 939 939 return *this ; 940 940 } 941 941 #endif … … 1007 1007 #ifndef BOOST_NO_CXX11_REF_QUALIFIERS 1008 1008 reference_const_type operator *() const& { return this->get() ; } 1009 1009 reference_type operator *() & { return this->get() ; } 1010 reference_type_of_temporary_wrapper operator *() && { return b oost::move(this->get()) ; }1010 reference_type_of_temporary_wrapper operator *() && { return base::types::move(this->get()) ; } 1011 1011 #else 1012 1012 reference_const_type operator *() const { return this->get() ; } 1013 1013 reference_type operator *() { return this->get() ; } … … 1033 1033 reference_type_of_temporary_wrapper value() && 1034 1034 { 1035 1035 if (this->is_initialized()) 1036 return b oost::move(this->get()) ;1036 return base::types::move(this->get()) ; 1037 1037 else 1038 1038 throw_exception(bad_optional_access()); 1039 1039 } … … 1071 1071 value_type value_or ( U&& v ) && 1072 1072 { 1073 1073 if (this->is_initialized()) 1074 return b oost::move(get());1074 return base::types::move(get()); 1075 1075 else 1076 1076 return boost::forward<U>(v); 1077 1077 } … … 1110 1110 value_type value_or_eval ( F f ) && 1111 1111 { 1112 1112 if (this->is_initialized()) 1113 return b oost::move(get());1113 return base::types::move(get()); 1114 1114 else 1115 1115 return f(); 1116 1116 }