diff --git a/doc/html/boost_optional/a_note_about_optional_bool_.html b/doc/html/boost_optional/a_note_about_optional_bool_.html index 5191d1d..395e573 100644 --- a/doc/html/boost_optional/a_note_about_optional_bool_.html +++ b/doc/html/boost_optional/a_note_about_optional_bool_.html @@ -1,23 +1,21 @@
-![]() |
-Home | +Home | Libraries | -People | -FAQ | +People | +FAQ | More |
@@ -36,7 +33,7 @@
First, it is functionally similar to a tristate boolean (false,maybe,true)
- —such as boost::tribool—
+ —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
@@ -52,8 +49,7 @@
lead to subtle errors due to the implicit bool
conversion:
-void foo ( bool v ) ; +void foo ( bool v ) ; void bar() { optional<bool> v = try(); diff --git a/doc/html/boost_optional/acknowledgments.html b/doc/html/boost_optional/acknowledgments.html index 09e3c71..49ac7c8 100644 --- a/doc/html/boost_optional/acknowledgments.html +++ b/doc/html/boost_optional/acknowledgments.html @@ -3,19 +3,18 @@Acknowledgments - + - +
![]() |
-Home | +Home | Libraries | -People | -FAQ | +People | +FAQ | More |
![]() |
-Home | +Home | Libraries | -People | -FAQ | +People | +FAQ | More |
diff --git a/doc/html/boost_optional/detailed_semantics.html b/doc/html/boost_optional/detailed_semantics.html index ef68023..06a6a63 100644 --- a/doc/html/boost_optional/detailed_semantics.html +++ b/doc/html/boost_optional/detailed_semantics.html @@ -3,7 +3,7 @@
![]() |
-Home | +Home | Libraries | -People | -FAQ | +People | +FAQ | More |
Because T
might be of reference
@@ -64,8 +64,8 @@
@@ -97,8 +97,7 @@ called.
-optional<T> def ; +Example:optional<T> def ; assert ( !def ) ;
boost::none
denotes an instance of boost::none_t
that can be used as the parameter.
-#include <boost/none.hpp> +Example:#include <boost/none.hpp> optional<T> n(none) ; assert ( !n ) ;@@ -180,8 +178,7 @@ has no effect.
-T v; +Example:T v; optional<T> opt(v); assert ( *opt == v ) ;@@ -212,8 +209,7 @@ Throws: Nothing.
-T v; +Example:T v; T& vref = v ; optional<T&> opt(vref); assert ( *opt == v ) ; @@ -338,8 +334,7 @@ has no effect.
-optional<T> uninit ; +Example:optional<T> uninit ; assert (!uninit); optional<T> uinit2 ( uninit ) ; @@ -387,8 +382,7 @@ will reefer to the same object (they alias).
-optional<T&> uninit ; +Example:optional<T&> uninit ; assert (!uninit); optional<T&> uinit2 ( uninit ) ; @@ -454,8 +448,7 @@ has no effect.
-optional<double> x(123.4); +Example:optional<double> x(123.4); assert ( *x == 123.4 ) ; optional<int> y(x) ; @@ -506,7 +499,7 @@ constructor called by the factory throws.
-class C { C ( char, double, std::string ) ; } ; +Example:class C { C ( char, double, std::string ) ; } ; C v('A',123.4,"hello"); @@ -574,8 +566,7 @@ copy constructor fails,*this
is left properly uninitialized.
-T x; +Example:T x; optional<T> def ; optional<T> opt(x) ; @@ -613,12 +604,11 @@
*this
was initialized, is is rebound
- to the new object. See here for
+ to the new object. See here for
details on this behavior.
-int a = 1 ; +Example:int a = 1 ; int b = 2 ; T& ra = a ; T& rb = b ; @@ -687,8 +677,7 @@ copy constructor fails,*this
is left properly uninitialized.
-T v; +Example:T v; optional<T> opt(v); optional<T> def ; @@ -721,12 +710,11 @@
*this
was initialized and so is *rhs, this
- is is rebound to the new object. See here
+ is is rebound to the new object. See here
for details on this behavior.
-int a = 1 ; +Example:int a = 1 ; int b = 2 ; T& ra = a ; T& rb = b ; @@ -800,8 +788,7 @@ converting constructor fails,*this
is left properly uninitialized.
-T v; +Example:T v; optional<T> opt0(v); optional<U> opt1; @@ -930,8 +917,7 @@BOOST_ASSERT()
.
-T v ; +Example:T v ; optional<T> opt ( v ); T const& u = *opt; assert ( u == v ) ; @@ -1005,8 +991,7 @@ Throws: Nothing.
-T v, z ; +Example:T v, z ; optional<T> def; T const& y = def.get_value_or(z); assert ( y == z ) ; @@ -1099,8 +1084,7 @@BOOST_ASSERT()
.
-T v ; +Example:T v ; T& vref = v ; optional<T&> opt ( vref ); T const& vref2 = *opt; @@ -1173,8 +1157,7 @@ so you should not hold nor delete this pointer
-T v; +Example:T v; optional<T> opt(v); optional<T> const copt(v); T* p = opt.get_ptr() ; @@ -1226,8 +1209,7 @@BOOST_ASSERT()
.
-struct X { int mdata ; } ; +Example:struct X { int mdata ; } ; X x ; optional<X> opt (x); opt->mdata = 2 ; @@ -1257,8 +1239,7 @@ Throws: Nothing.
-optional<T> def ; +Example:optional<T> def ; assert ( def == 0 ); optional<T> opt ( v ) ; assert ( opt ); @@ -1294,8 +1275,7 @@ in certain boolean contexts.
-optional<T> opt ; +Example:optional<T> opt ; assert ( !opt ); *opt = some_T ; @@ -1328,8 +1308,7 @@ Throws: Nothing.
-optional<T> def ; +Example:optional<T> def ; assert ( !def.is_initialized() ); optional<T> opt ( v ) ; assert ( opt.is_initialized() ); @@ -1340,8 +1319,8 @@![]()
- - Free functions + + Free functions
@@ -1364,8 +1343,7 @@ of
v
.
-template<class T> void foo ( optional<T> const& opt ) ; +Example:template<class T> void foo ( optional<T> const& opt ) ; foo ( make_optional(1+1) ) ; // Creates an optional<int>@@ -1393,8 +1371,7 @@ ofv
.
-optional<double> calculate_foo() +Example:optional<double> calculate_foo() { double val = compute_foo(); return make_optional(is_not_nan_and_finite(val),val); @@ -1441,8 +1418,7 @@ instead
-T x(12); +Example:T x(12); T y(12); T z(21); optional<T> def0 ; @@ -1503,8 +1479,7 @@ instead.
-T x(12); +Example:T x(12); T y(34); optional<T> def ; optional<T> optX(x); @@ -1674,8 +1649,7 @@ If only one is initialized, it has the same basic guarantee asoptional<T>::reset( T const& )
.
-T x(12); +Example:T x(12); T y(21); optional<T> def0 ; optional<T> def1 ; diff --git a/doc/html/boost_optional/development.html b/doc/html/boost_optional/development.html index 8d58d8b..5a14713 100644 --- a/doc/html/boost_optional/development.html +++ b/doc/html/boost_optional/development.html @@ -3,7 +3,7 @@Development - + @@ -12,10 +12,10 @@
![]() |
-Home | +Home | Libraries | -People | -FAQ | +People | +FAQ | More |
In C++, we can declare an object (a variable) of type @@ -170,7 +170,7 @@
Objects of type optional<T>
@@ -254,7 +254,7 @@
Since the purpose of optional is to allow us to use objects with a formal @@ -292,8 +292,8 @@ itself which are supported by a special interface.
diff --git a/doc/html/boost_optional/examples.html b/doc/html/boost_optional/examples.html index 7685a73..20bf2ec 100644 --- a/doc/html/boost_optional/examples.html +++ b/doc/html/boost_optional/examples.html @@ -3,7 +3,7 @@
![]() |
-Home | +Home | Libraries | -People | -FAQ | +People | +FAQ | More |
-optional<char> get_async_input() +optional<char> get_async_input() { if ( !queue.empty() ) return optional<char>(queue.top()); @@ -61,12 +59,10 @@
-optional<string> name ; +optional<string> name ; if ( database.open() ) { name.reset ( database.lookup(employer_name) ) ; @@ -84,12 +80,10 @@
-class figure +class figure { public: @@ -124,12 +118,10 @@
-class ExpensiveCtor { ... } ; +class ExpensiveCtor { ... } ; class Fred { Fred() : mLargeVector(10000) {} diff --git a/doc/html/boost_optional/exception_safety_guarantees.html b/doc/html/boost_optional/exception_safety_guarantees.html index 8f6504f..42b6aa0 100644 --- a/doc/html/boost_optional/exception_safety_guarantees.html +++ b/doc/html/boost_optional/exception_safety_guarantees.html @@ -1,23 +1,21 @@ -Exception Safety - Guarantees +Exception Safety Guarantees - + - +
![]() |
-Home | +Home | Libraries | -People | -FAQ | +People | +FAQ | More |
- Because of the current implementation (see Implementation + Because of the current implementation (see Implementation Notes), all of the assignment methods:
optional
's assignment
and reset has the same guarantees.
-
-//
+//
// Case 1: Exception thrown during assignment.
//
T v0(123);
@@ -116,8 +112,8 @@
}
-
- Swap
+
+ Swap
void swap( optional<T>&,
diff --git a/doc/html/boost_optional/implementation_notes.html b/doc/html/boost_optional/implementation_notes.html
index c0225b3..31a2ebe 100644
--- a/doc/html/boost_optional/implementation_notes.html
+++ b/doc/html/boost_optional/implementation_notes.html
@@ -3,20 +3,19 @@
Implementation Notes
-
+
-
+

-Home
+Home
Libraries
-People
-FAQ
+People
+FAQ
More
@@ -25,7 +24,7 @@
optional<T>
is
diff --git a/doc/html/boost_optional/in_place_factories.html b/doc/html/boost_optional/in_place_factories.html
index a972384..45896e5 100644
--- a/doc/html/boost_optional/in_place_factories.html
+++ b/doc/html/boost_optional/in_place_factories.html
@@ -3,21 +3,19 @@
![]() |
-Home | +Home | Libraries | -People | -FAQ | +People | +FAQ | More |
One of the typical problems with wrappers and containers is that their interfaces @@ -36,8 +34,7 @@ but also requires the existence of a fully constructed object, often temporary, just to follow the copy from:
--struct X +struct X { X ( int, std:::string ) ; } ; @@ -62,8 +59,7 @@ object right in the container's storage. In this scheme, the user only needs to supply the arguments to the constructor to use in the wrapped object construction. --class W +class W { X wrapped_ ; @@ -96,8 +92,7 @@For example, one member of this family looks like:
--template<class T,class A0, class A1> +template<class T,class A0, class A1> class TypedInPlaceFactory2 { A0 m_a0 ; A1 m_a1 ; @@ -112,8 +107,7 @@A wrapper class aware of this can use it as:
--class W +class W { X wrapped_ ; @@ -152,8 +146,7 @@ This library provides an overloaded set of helper template functions to construct these factories without requiring unnecessary template parameters: --template<class A0,...,class AN> +template<class A0,...,class AN> InPlaceFactoryN <A0,...,AN> in_place ( A0 const& a0, ..., AN const& aN) ; template<class T,class A0,...,class AN> @@ -162,8 +155,7 @@In-place factories can be used generically by the wrapper and user as follows:
--class W +class W { X wrapped_ ; diff --git a/doc/html/boost_optional/optional_references.html b/doc/html/boost_optional/optional_references.html index 1222a42..7ea6a39 100644 --- a/doc/html/boost_optional/optional_references.html +++ b/doc/html/boost_optional/optional_references.html @@ -3,20 +3,19 @@Optional references - + - +
![]() |
-Home | +Home | Libraries | -People | -FAQ | +People | +FAQ | More |
This library allows the template parameter T
diff --git a/doc/html/boost_optional/rebinding_semantics_for_assignment_of_optional_references.html b/doc/html/boost_optional/rebinding_semantics_for_assignment_of_optional_references.html
index 5b894aa..3a7df8e 100644
--- a/doc/html/boost_optional/rebinding_semantics_for_assignment_of_optional_references.html
+++ b/doc/html/boost_optional/rebinding_semantics_for_assignment_of_optional_references.html
@@ -1,10 +1,9 @@
![]() |
-Home | +Home | Libraries | -People | -FAQ | +People | +FAQ | More |
@@ -34,8 +32,7 @@ the effect is to bind (for the first time) to the object. Clearly, there is no other choice.
--int x = 1 ; +int x = 1 ; int& rx = x ; optional<int&> ora ; optional<int&> orb(x) ; @@ -47,8 +44,7 @@ If you assign to a bare C++ reference, the assignment is forwarded to the referenced object; it's value changes but the reference is never rebound. --int a = 1 ; +int a = 1 ; int& ra = a ; int b = 2 ; int& rb = b ; @@ -62,8 +58,7 @@ the effect is to rebind to the new object instead of assigning the referee. This is unlike bare C++ references. --int a = 1 ; +int a = 1 ; int b = 2 ; int& ra = a ; int& rb = b ; @@ -75,8 +70,8 @@ assert(b==3);- - Rationale + + Rationale
Rebinding semantics for the assignment of initialized @@ -95,8 +90,7 @@ forwarding assignment to the referenced object (thus changing the referenced object value but not rebinding), and consider the following code:
--optional<int&> a = get(); +optional<int&> a = get(); int x = 1 ; int& rx = x ; optional<int&> b(rx); @@ -134,8 +128,7 @@ for the first time is OK while rebinding is not which is IMO very unlikely. In such scenario, you can assign the value itself directly, as in: --assert(!!opt); +assert(!!opt); *opt=value;
![]() |
-Home | +Home | Libraries | -People | -FAQ | +People | +FAQ | More |
-namespace boost { +namespace boost { template<class T> class optional @@ -36,101 +35,101 @@ // (If T is of reference type, the parameters and results by reference are by value) - optional () ;diff --git a/doc/html/boost_optional/type_requirements.html b/doc/html/boost_optional/type_requirements.html index 0676bf1..308453e 100644 --- a/doc/html/boost_optional/type_requirements.html +++ b/doc/html/boost_optional/type_requirements.html @@ -3,20 +3,19 @@+ optional () ;
- optional ( none_t ) ;
+ optional ( none_t ) ;
- optional ( T const& v ) ;
+ optional ( T const& v ) ;
// [new in 1.34] - optional ( bool condition, T const& v ) ;
+ optional ( bool condition, T const& v ) ;
- optional ( optional const& rhs ) ;
+ optional ( optional const& rhs ) ;
- template<class U> explicit optional ( optional<U> const& rhs ) ;
+ template<class U> explicit optional ( optional<U> const& rhs ) ;
- template<class InPlaceFactory> explicit optional ( InPlaceFactory const& f ) ;
+ template<class InPlaceFactory> explicit optional ( InPlaceFactory const& f ) ;
- template<class TypedInPlaceFactory> explicit optional ( TypedInPlaceFactory const& f ) ;
+ template<class TypedInPlaceFactory> explicit optional ( TypedInPlaceFactory const& f ) ;
optional& operator = ( none_t ) ; - optional& operator = ( T const& v ) ;
+ optional& operator = ( T const& v ) ;
- optional& operator = ( optional const& rhs ) ;
+ optional& operator = ( optional const& rhs ) ;
- template<class U> optional& operator = ( optional<U> const& rhs ) ;
+ template<class U> optional& operator = ( optional<U> const& rhs ) ;
template<class InPlaceFactory> optional& operator = ( InPlaceFactory const& f ) ; template<class TypedInPlaceFactory> optional& operator = ( TypedInPlaceFactory const& f ) ; - T const& get() const ;
- T& get() ;
+ T const& get() const ;
+ T& get() ;
// [new in 1.34] - T const& get_value_or( T const& default ) const ;
+ T const& get_value_or( T const& default ) const ;
- T const* operator ->() const ;
- T* operator ->() ;
+ T const* operator ->() const ;
+ T* operator ->() ;
- T const& operator *() const ;
- T& operator *() ;
+ T const& operator *() const ;
+ T& operator *() ;
- T const* get_ptr() const ;
- T* get_ptr() ;
+ T const* get_ptr() const ;
+ T* get_ptr() ;
- operator unspecified-bool-type() const ;
+ operator unspecified-bool-type() const ;
- bool operator!() const ;
+ bool operator!() const ;
// deprecated methods // (deprecated) - void reset() ;
+ void reset() ;
// (deprecated) - void reset ( T const& ) ;
+ void reset ( T const& ) ;
// (deprecated) - bool is_initialized() const ;
+ bool is_initialized() const ;
}; -template<class T> inline bool operator == ( optional<T> const& x, optional<T> const& y ) ;
+template<class T> inline bool operator == ( optional<T> const& x, optional<T> const& y ) ;
-template<class T> inline bool operator != ( optional<T> const& x, optional<T> const& y ) ;
+template<class T> inline bool operator != ( optional<T> const& x, optional<T> const& y ) ;
-template<class T> inline bool operator < ( optional<T> const& x, optional<T> const& y ) ;
+template<class T> inline bool operator < ( optional<T> const& x, optional<T> const& y ) ;
-template<class T> inline bool operator > ( optional<T> const& x, optional<T> const& y ) ;
+template<class T> inline bool operator > ( optional<T> const& x, optional<T> const& y ) ;
-template<class T> inline bool operator <= ( optional<T> const& x, optional<T> const& y ) ;
+template<class T> inline bool operator <= ( optional<T> const& x, optional<T> const& y ) ;
-template<class T> inline bool operator >= ( optional<T> const& x, optional<T> const& y ) ;
+template<class T> inline bool operator >= ( optional<T> const& x, optional<T> const& y ) ;
// [new in 1.34] -template<class T> inline optional<T> make_optional ( T const& v ) ;
+template<class T> inline optional<T> make_optional ( T const& v ) ;
// [new in 1.34] -template<class T> inline optional<T> make_optional ( bool condition, T const& v ) ;
+template<class T> inline optional<T> make_optional ( bool condition, T const& v ) ;
// [new in 1.34] -template<class T> inline T const& get_optional_value_or ( optional<T> const& opt, T const& default ) ;
+template<class T> inline T const& get_optional_value_or ( optional<T> const& opt, T const& default ) ;
-template<class T> inline T const& get ( optional<T> const& opt ) ;
+template<class T> inline T const& get ( optional<T> const& opt ) ;
-template<class T> inline T& get ( optional<T> & opt ) ;
+template<class T> inline T& get ( optional<T> & opt ) ;
-template<class T> inline T const* get ( optional<T> const* opt ) ;
+template<class T> inline T const* get ( optional<T> const* opt ) ;
-template<class T> inline T* get ( optional<T>* opt ) ;
+template<class T> inline T* get ( optional<T>* opt ) ;
-template<class T> inline T const* get_pointer ( optional<T> const& opt ) ;
+template<class T> inline T const* get_pointer ( optional<T> const& opt ) ;
-template<class T> inline T* get_pointer ( optional<T> & opt ) ;
+template<class T> inline T* get_pointer ( optional<T> & opt ) ;
-template<class T> inline void swap( optional<T>& x, optional<T>& y ) ;
+template<class T> inline void swap( optional<T>& x, optional<T>& y ) ;
} // namespace boost
Type requirements - + - +
![]() |
-Home | +Home | Libraries | -People | -FAQ | +People | +FAQ | More |
In general, T
must be Copy Constructible and
diff --git a/doc/html/index.html b/doc/html/index.html
index 24277e1..dbe7199 100644
--- a/doc/html/index.html
+++ b/doc/html/index.html
@@ -3,17 +3,17 @@
![]() |
-Home | +Home | Libraries | -People | -FAQ | +People | +FAQ | More |
Copyright © 2003 -2007 Fernando Luis Cacciola Carballal
Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -73,7 +73,7 @@Consider these functions which should return a value but which might not have @@ -142,16 +142,14 @@ the function would conceptually return. For example, the last two functions could have the following interface:
--std::pair<char,bool> get_async_input(); +std::pair<char,bool> get_async_input(); std::pair<point,bool> polygon::get_any_point_effectively_inside();These functions use a consistent interface for dealing with possibly inexistent results:
--std::pair<point,bool> p = poly.get_any_point_effectively_inside(); +std::pair<point,bool> p = poly.get_any_point_effectively_inside(); if ( p.second ) flood_fill(p.first);@@ -174,7 +172,7 @@
Last revised: February 12, 2008 at 22:47:14 GMT |
+Last revised: October 10, 2008 at 20:53:37 GMT |