Correct definition of operator unspecified-bool-type. Make reference for is_initialized point to this operator. Fixes #6364.

[SVN r82911]
This commit is contained in:
Steven Watanabe
2013-02-15 18:44:59 +00:00
committed by Andrzej Krzemienski
parent 339a3c4ab8
commit c283c778e6

View File

@ -658,7 +658,7 @@ __SPACE__
[: `optional<T>::operator `['unspecified-bool-type]`() const ;`]
* [*Returns:] An unspecified value which if used on a boolean context
is equivalent to (`get() != 0`)
is equivalent to (`get_ptr() != 0`)
* [*Throws:] Nothing.
* [*Example:]
``
@ -695,15 +695,7 @@ __SPACE__
[: `bool optional<T>::is_initialized() const ;`]
* [*Returns: ] `true` if the `optional` is initialized, `false` otherwise.
* [*Throws:] Nothing.
* [*Example:]
``
optional<T> def ;
assert ( !def.is_initialized() );
optional<T> opt ( v ) ;
assert ( opt.is_initialized() );
``
* [*Deprecated:] Same as `operator `['unspecified-bool-type]`() ;`
__SPACE__