Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r82911 - trunk/libs/optional/doc
From: steven_at_[hidden]
Date: 2013-02-15 13:45:00


Author: steven_watanabe
Date: 2013-02-15 13:44:59 EST (Fri, 15 Feb 2013)
New Revision: 82911
URL: http://svn.boost.org/trac/boost/changeset/82911

Log:
Correct definition of operator unspecified-bool-type. Make reference for is_initialized point to this operator. Fixes #6364.
Text files modified:
   trunk/libs/optional/doc/reference.qbk | 12 ++----------
   1 files changed, 2 insertions(+), 10 deletions(-)

Modified: trunk/libs/optional/doc/reference.qbk
==============================================================================
--- trunk/libs/optional/doc/reference.qbk (original)
+++ trunk/libs/optional/doc/reference.qbk 2013-02-15 13:44:59 EST (Fri, 15 Feb 2013)
@@ -660,7 +660,7 @@
 [: `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:]
 ``
@@ -697,15 +697,7 @@
 
 [: `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__
 


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk