20 Nov
2014
20 Nov
'14
4:13 p.m.
On 11/20/2014 11:49 AM, Andrzej Krzemienski wrote:
The user-provided int can be any value of int plus the situation where user decides not to type any input. the latter is a valid and useful information. E.g. when an int represents some threshold, having boost::none means "go with no threshold". boost::none is just a value. this in turn implies the implicit conversions:
optional<int>() != 2;
The above is logical and useful, even outside of the containers.
As optional is a nullable type, it could be useful to let the comparison operators return a tri-bool instead of a bool.