diff --git a/doc/optional.html b/doc/optional.html index d29bd07..7ebdf9c 100644 --- a/doc/optional.html +++ b/doc/optional.html @@ -1049,7 +1049,7 @@ assert ( optX != optZ ) ;
bool operator > ( optional<T> const& x, optional<T> const& y );
-@@ -1428,10 +1428,10 @@ public:Returns: !( y < x );
+Returns: ( y < x );
Throws: Nothing.
optional<bool>
should be used with special caution and consideration.
First, it is functionally similar to a tristate boolean (false,maybe,true) —such as boost::tribool (not yet formally in boost)—except that in a tristate boolean, +
First, it is functionally similar to a tristate boolean (false,maybe,true) —such as boost::tribool—except that in a tristate boolean,
the maybe state represents a valid value, unlike the corresponding state
of an uninitialized optional<bool>.
-It should be carefully considered if an optional bool instead of a tribool is really needed
Second, optional<> provides an implicit conversion to bool. This conversion
refers to the initialization state and not to the contained value.
Using optional<bool> can lead to subtle errors due to the implicit bool conversion: