[optional] Incorrect example

7 Apr
2011
7 Apr
'11
9:23 p.m.
http://www.boost.org/doc/libs/1_46_1/libs/optional/doc/html/boost_optional/r... int x = 1 ; int& rx = x ; optional<int&> ora ; optional<int&> orb(x) ; ora = orb ; // now 'ora' is bound to 'x' through 'rx' *ora = 2 ; // Changes value of 'x' through ' ora'assert(x==2); Either the comment on the fifth line is wrong or the fourth line should construct from rx rather than x.
5189
Age (days ago)
5189
Last active (days ago)
0 comments
1 participants
participants (1)
-
Ahmed Charles