Added has_value()

This commit is contained in:
Andrzej Krzemienski
2018-03-24 00:04:15 +01:00
parent 33c7a6aa2b
commit 5182f7f30f
49 changed files with 119 additions and 59 deletions

View File

@ -754,6 +754,7 @@ __SPACE__
[#reference_optional_operator_bool]
[: `explicit optional<T>::operator bool() const noexcept ;`]
[: `bool optional<T>::has_value() const noexcept ;`]
* [*Returns:] `get_ptr() != 0`.
* [*Notes:] On compilers that do not support explicit conversion operators this falls back to safe-bool idiom.
@ -1040,6 +1041,7 @@ __SPACE__
__SPACE__
[#reference_optional_ref_operator_bool]
[: `bool has_value() const noexcept;`]
[: `optional<T&>::operator bool () const noexcept;`]
* [*Returns:] `bool(ref)`.