--- optional.hpp 2007-03-07 23:17:23.000000000 +0300 +++ optional_fixed.hpp 2009-09-03 11:00:17.642364500 +0400 @@ -28,6 +28,7 @@ #include "boost/detail/reference_content.hpp" #include "boost/none.hpp" #include "boost/utility/compare_pointees.hpp" +#include "boost/utility/addressof.hpp" #include "boost/optional/optional_fwd.hpp" @@ -525,9 +526,9 @@ // Assigns from an expression. See corresponding constructor. // Basic Guarantee: If the resolved T ctor throws, this is left UNINITIALIZED template - optional& operator= ( Expr expr ) + optional& operator= ( Expr const& expr ) { - this->assign_expr(expr,&expr); + this->assign_expr(expr,boost::addressof(expr)); return *this ; } #endif