[Optional 1.33.1] Assignment of convertible optional to an optional
20 Jul
2007
20 Jul
'07
9:10 a.m.
Hi,
From the documentation I think this should be possible:
optional<unsigned short> us; optional<unsigned int> ui; ui = us; In this case it should just leave ui uninitialized. But instead I hit the assertion in reference_const_type get() const, because there is a call to rhs.get() in the operator=(). Is this a bug, or am I doing something wrong? I'm using MSVC7.1. Best regards, Christian Larsen
6339
Age (days ago)
6339
Last active (days ago)
0 comments
1 participants
participants (1)
-
contact@dword.dk