
On 6 September 2011 04:57, Mostafa <mostafa_working_away@yahoo.com> wrote:
'ot = u' deals with the existence of the underlying object, while '*ot = v' deals with the value of the underlying object. Now, in C++, there is no such thing as existence without value, so you cannot escape dealing with the underlying value in the expression 'ot = u'. That holds for non-reference types as well as for references.
The Boost.Optional documentation begs to differ, direct quote:
"Rebinding semantics for the assignment of initialized optional references has been chosen to provide consistency among initialization states even at the expense of lack of consistency with the semantics of bare C++ references."
I was looking at it that the "value" of a reference is the object it refers to, and not the value of that object itself. Sorry for not being clear. -- Nevin ":-)" Liber <mailto:nevin@eviloverlord.com> (847) 691-1404