diff --git a/doc/13_relational_operators.qbk b/doc/13_relational_operators.qbk index 2797c27..a16d53b 100644 --- a/doc/13_relational_operators.qbk +++ b/doc/13_relational_operators.qbk @@ -29,6 +29,8 @@ This mixed comparison has a practical interpretation, which is occasionally usef In the above example, the meaning of the comparison is 'user chose number 2'. If user chose nothing, he didn't choose number 2. +In case where `optional` is compared to `none`, it is not required that `T` be __SGI_EQUALITY_COMPARABLE__. + In a similar manner, type `optional` is __SGI_LESS_THAN_COMPARABLE__ whenever `T` is __SGI_LESS_THAN_COMPARABLE__. The optional object containing no value is compared less than any value of `T`. To illustrate this, if the default ordering of `size_t` is {`0`, `1`, `2`, ...}, the default ordering of `optional` is {`boost::none`, `0`, `1`, `2`, ...}. This order does not have a practical interpretation. The goal is to have any semantically correct default ordering in order for `optional` to be usable in ordered associative containers (wherever `T` is usable). Mixed relational operators are the only case where the contained value of an optional object can be inspected without the usage of value accessing function (`operator*`, `value`, `value_or`). diff --git a/doc/html/boost_optional/tutorial/relational_operators.html b/doc/html/boost_optional/tutorial/relational_operators.html index be20e45..ecb8c4f 100644 --- a/doc/html/boost_optional/tutorial/relational_operators.html +++ b/doc/html/boost_optional/tutorial/relational_operators.html @@ -71,6 +71,11 @@ In the above example, the meaning of the comparison is 'user chose number 2'. If user chose nothing, he didn't choose number 2.

+

+ In case where optional<T> is + compared to none, it is not + required that T be EqualityComparable. +

In a similar manner, type optional<T> is LessThanComparable whenever T is LessThanComparable. The optional diff --git a/doc/html/index.html b/doc/html/index.html index 51418c3..af4424e 100644 --- a/doc/html/index.html +++ b/doc/html/index.html @@ -133,7 +133,7 @@ - +

Last revised: June 08, 2014 at 14:17:56 GMT

Last revised: June 08, 2014 at 18:14:37 GMT