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 395e573..896994e 100644 --- a/doc/html/boost_optional/a_note_about_optional_bool_.html +++ b/doc/html/boost_optional/a_note_about_optional_bool_.html @@ -3,8 +3,8 @@ A note about optional<bool> - - + + @@ -22,7 +22,7 @@
PrevUpHomeNext
-
+

A note about optional<bool> diff --git a/doc/html/boost_optional/acknowledgments.html b/doc/html/boost_optional/acknowledgments.html index 49ac7c8..bd09f61 100644 --- a/doc/html/boost_optional/acknowledgments.html +++ b/doc/html/boost_optional/acknowledgments.html @@ -3,8 +3,8 @@ Acknowledgments - - + + @@ -21,89 +21,89 @@
PrevUpHome
-
+

- + Pre-formal review

-
    -
  • +
      +
    • Peter Dimov suggested the name 'optional', and was the first to point out the need for aligned storage.
    • -
    • +
    • Douglas Gregor developed 'type_with_alignment', and later Eric Friedman coded 'aligned_storage', which are the core of the optional class implementation.
    • -
    • +
    • Andrei Alexandrescu and Brian Parker also worked with aligned storage techniques and their work influenced the current implementation.
    • -
    • +
    • Gennadiy Rozental made extensive and important comments which shaped the design.
    • -
    • +
    • Vesa Karvonen and Douglas Gregor made quite useful comparisons between optional, variant and any; and made other relevant comments.
    • -
    • +
    • Douglas Gregor and Peter Dimov commented on comparisons and evaluation in boolean contexts.
    • -
    • +
    • Eric Friedman helped understand the issues involved with aligned storage, move/copy operations and exception safety.
    • -
    • +
    • Many others have participated with useful comments: Aleksey Gurotov, Kevlin Henney, David Abrahams, and others I can't recall.

    - + Post-formal review

    -
      -
    • +
        +
      • William Kempf carefully considered the originally proposed interface and suggested the new interface which is currently used. He also started and fueled the discussion about the analogy optional<>/smart pointer and about relational operators.
      • -
      • +
      • Peter Dimov, Joel de Guzman, David Abrahams, Tanton Gibbs and Ian Hanson focused on the relational semantics of optional (originally undefined); concluding with the fact that the pointer-like interface doesn't make it a pointer so it shall have deep relational operators.
      • -
      • +
      • Augustus Saunders also explored the different relational semantics between optional<> and a pointer and developed the OptionalPointee concept as an aid against potential conflicts on generic code.
      • -
      • +
      • Joel de Guzman noticed that optional<> can be seen as an API on top of variant<T,nil_t>.
      • -
      • +
      • Dave Gomboc explained the meaning and usage of the Haskell analog to optional<>: the Maybe type constructor (analogy originally pointed out by David Sankel).
      • -
      • +
      • Other comments were posted by Vincent Finn, Anthony Williams, Ed Brey, Rob Stewart, and others.
      • -
      • +
      • Joel de Guzman made the case for the support of references and helped with the proper semantics.
      • -
      • +
      • Mat Marcus shown the virtues of a value-oriented interface, influencing the current design, and contributed the idea of "none".
      • diff --git a/doc/html/boost_optional/dependencies_and_portability.html b/doc/html/boost_optional/dependencies_and_portability.html index 431bfe1..6f1f9cd 100644 --- a/doc/html/boost_optional/dependencies_and_portability.html +++ b/doc/html/boost_optional/dependencies_and_portability.html @@ -3,8 +3,8 @@ Dependencies and Portability - - + + @@ -22,7 +22,7 @@
        PrevUpHomeNext
        -
        +

        Dependencies and Portability diff --git a/doc/html/boost_optional/detailed_semantics.html b/doc/html/boost_optional/detailed_semantics.html index 06a6a63..35c5a9c 100644 --- a/doc/html/boost_optional/detailed_semantics.html +++ b/doc/html/boost_optional/detailed_semantics.html @@ -3,8 +3,8 @@ Detailed Semantics - - + + @@ -22,7 +22,7 @@
        PrevUpHomeNext
        -
        +
        @@ -31,24 +31,24 @@ type, in the sequel, those entries whose semantic depends on T being of reference type or not will be distinguished using the following convention:

        -
          -
        • +
            +
          • If the entry reads: optional<T(not a ref)>, the description corresponds only to the case where T is not of reference type.
          • -
          • +
          • If the entry reads: optional<T&>, the description corresponds only to the case where T is of reference type.
          • -
          • +
          • If the entry reads: optional<T>, the description is the same for both cases.
          -
          +
          @@ -64,7 +64,7 @@ space

          - + optional class member functions

          @@ -82,21 +82,21 @@

          -
            -
          • +
              +
            • Effect: Default-Constructs an optional.
            • -
            • +
            • Postconditions:*this is uninitialized.
            • -
            • +
            • Throws: Nothing.
            • -
            • +
            • Notes: T's default constructor is not called.
            • -
            • +
            • Example:
              optional<T> def ;
               assert ( !def ) ;
               
              @@ -116,23 +116,23 @@

            -
              -
            • +
                +
              • Effect: Constructs an optional uninitialized.
              • -
              • +
              • Postconditions:*this is uninitialized.
              • -
              • +
              • Throws: Nothing.
              • -
              • +
              • Notes:T's default constructor is not called. The expression boost::none denotes an instance of boost::none_t that can be used as the parameter.
              • -
              • +
              • Example:
                #include <boost/none.hpp>
                 optional<T> n(none) ;
                 assert ( !n ) ;
                @@ -153,31 +153,31 @@
                 

              -
                -
              • +
                  +
                • Effect: Directly-Constructs an optional.
                • -
                • +
                • Postconditions:*this is initialized and its value is acopy of v.
                • -
                • +
                • Throws: Whatever T::T( T const& ) throws.
                • -
                • +
                • Notes: T::T( T const& ) is called.
                • -
                • +
                • Exception Safety: Exceptions can only be thrown during T::T( T const& ); in that case, this constructor has no effect.
                • -
                • +
                • Example:
                  T v;
                   optional<T> opt(v);
                   assert ( *opt == v ) ;
                  @@ -196,19 +196,19 @@
                   

                -
                  -
                • +
                    +
                  • Effect: Directly-Constructs an optional.
                  • -
                  • +
                  • Postconditions:*this is initialized and its value is an instance of an internal type wrapping the reference ref.
                  • -
                  • +
                  • Throws: Nothing.
                  • -
                  • +
                  • Example:
                    T v;
                     T& vref = v ;
                     optional<T&> opt(vref);
                    @@ -246,7 +246,7 @@
                     

                  -
                  • +
                    • If condition is true, same as:
                    @@ -269,14 +269,14 @@

                    -
                    • +
                      • otherwise, same as:

                      - optional<T [#(not a + optional<T ['(not a ref)]>::optional()

                      @@ -308,32 +308,32 @@

                      -
                        -
                      • +
                          +
                        • Effect: Copy-Constructs an optional.
                        • -
                        • +
                        • Postconditions: If rhs is initialized, *this is initialized and its value is a copy of the value of rhs; else *this is uninitialized.
                        • -
                        • +
                        • Throws: Whatever T::T( T const& ) throws.
                        • -
                        • +
                        • Notes: If rhs is initialized, T::T(T const& ) is called.
                        • -
                        • +
                        • Exception Safety: Exceptions can only be thrown during T::T( T const& ); in that case, this constructor has no effect.
                        • -
                        • +
                        • Example:
                          optional<T> uninit ;
                           assert (!uninit);
                           
                          @@ -360,11 +360,11 @@
                           

                        -
                          -
                        • +
                            +
                          • Effect: Copy-Constructs an optional.
                          • -
                          • +
                          • Postconditions: If rhs is initialized, *this is initialized and its value is another reference to the same object referenced @@ -372,16 +372,16 @@ else *this is uninitialized.
                          • -
                          • +
                          • Throws: Nothing.
                          • -
                          • +
                          • Notes: If rhs is initialized, both *this and *rhs will reefer to the same object (they alias).
                          • -
                          • +
                          • Example:
                            optional<T&> uninit ;
                             assert (!uninit);
                             
                            @@ -417,11 +417,11 @@
                             

                          -
                            -
                          • +
                              +
                            • Effect: Copy-Constructs an optional.
                            • -
                            • +
                            • Postconditions: If rhs is initialized, *this is initialized and its value is a copy of the value @@ -429,25 +429,25 @@ else *this is uninitialized.
                            • -
                            • +
                            • Throws: Whatever T::T( U const& ) throws.
                            • -
                            • +
                            • Notes: T::T( U const& ) is called if rhs is initialized, which requires a valid conversion from U to T.
                            • -
                            • +
                            • Exception Safety: Exceptions can only be thrown during T::T( U const& ); in that case, this constructor has no effect.
                            • -
                            • +
                            • Example:
                              optional<double> x(123.4);
                               assert ( *x == 123.4 ) ;
                               
                              @@ -483,31 +483,31 @@
                               

                            -
                              -
                            • +
                                +
                              • Effect: Constructs an optional with a value of T obtained from the factory.
                              • -
                              • +
                              • Postconditions: *this is initialized and its value is directly given from the factory f (i.e., the value is not copied).
                              • -
                              • +
                              • Throws: Whatever the T constructor called by the factory throws.
                              • -
                              • -Notes: See In-Place +
                              • +Notes: See In-Place Factories
                              • -
                              • +
                              • Exception Safety: Exceptions can only be thrown during the call to the T constructor used by the factory; in that case, this constructor has no effect.
                              • -
                              • +
                              • Example:
                                class C { C ( char, double, std::string ) ; } ;
                                 
                                 C v('A',123.4,"hello");
                                @@ -538,25 +538,25 @@
                                 

                              -
                                -
                              • +
                                  +
                                • Effect: Assigns the value rhs to an optional.
                                • -
                                • +
                                • Postconditions: *this is initialized and its value is a copy of rhs.
                                • -
                                • +
                                • Throws: Whatever T::operator=( T const& ) or T::T(T const&) throws.
                                • -
                                • +
                                • Notes: If *this was initialized, T's assignment operator is used, otherwise, its copy-constructor is used.
                                • -
                                • +
                                • Exception Safety: In the event of an exception, the initialization state of *this is unchanged and its value unspecified as far as optional is concerned @@ -565,7 +565,7 @@ is initially uninitialized and T's copy constructor fails, *this is left properly uninitialized.
                                • -
                                • +
                                • Example:
                                  T x;
                                   optional<T> def ;
                                   optional<T> opt(x) ;
                                  @@ -594,20 +594,20 @@
                                   

                                -
                                  -
                                • +
                                    +
                                  • Effect: (Re)binds thee wrapped reference.
                                  • -
                                  • +
                                  • Postconditions: *this is initialized and it references the same object referenced by rhs.
                                  • -
                                  • +
                                  • Notes: If *this was initialized, is is rebound - to the new object. See here for - details on this behavior. + to the new object. See here + for details on this behavior.
                                  • -
                                  • +
                                  • Example:
                                    int a = 1 ;
                                     int b = 2 ;
                                     T& ra = a ;
                                    @@ -645,29 +645,29 @@
                                     

                                  -
                                    -
                                  • +
                                      +
                                    • Effect: Assigns another optional to an optional.
                                    • -
                                    • +
                                    • Postconditions: If rhs is initialized, *this is initialized and its value is a copy of the value of rhs; else *this is uninitialized.
                                    • -
                                    • +
                                    • Throws: Whatever T::operator( T const&) or T::T( T const& ) throws.
                                    • -
                                    • +
                                    • Notes: If both *this and rhs are initially initialized, T's assignment operator is used. If *this is initially initialized but rhs is uninitialized, T's [destructor] is called. If *this is initially uninitialized but rhs is initialized, T's copy constructor is called.
                                    • -
                                    • +
                                    • Exception Safety: In the event of an exception, the initialization state of *this is unchanged and its value unspecified as far as optional is concerned (it is up to T's @@ -676,7 +676,7 @@ is initially uninitialized and T's copy constructor fails, *this is left properly uninitialized.
                                    • -
                                    • +
                                    • Example:
                                      T v;
                                       optional<T> opt(v);
                                       optional<T> def ;
                                      @@ -700,20 +700,20 @@
                                       

                                    -
                                      -
                                    • +
                                        +
                                      • Effect: (Re)binds thee wrapped reference.
                                      • -
                                      • +
                                      • Postconditions: If *rhs is initialized, *this is initialized and it references the same object referenced by *rhs; otherwise, *this is uninitialized (and references no object).
                                      • -
                                      • +
                                      • Notes: If *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.
                                      • -
                                      • +
                                      • Example:
                                        int a = 1 ;
                                         int b = 2 ;
                                         T& ra = a ;
                                        @@ -750,25 +750,25 @@
                                         

                                      -
                                        -
                                      • +
                                          +
                                        • Effect: Assigns another convertible optional to an optional.
                                        • -
                                        • +
                                        • Postconditions: If rhs is initialized, *this is initialized and its value is a copy of the value of rhsconverted to type T; else *this is uninitialized.
                                        • -
                                        • +
                                        • Throws: Whatever T::operator=( U const& ) or T::T( U const& ) throws.
                                        • -
                                        • +
                                        • Notes: If both *this and rhs are initially initialized, T's assignment operator (from U) is used. If *this is initially initialized but rhs is uninitialized, @@ -778,7 +778,7 @@ converting constructor (from U) is called.
                                        • -
                                        • +
                                        • Exception Safety: In the event of an exception, the initialization state of *this is unchanged and its value unspecified as far as optional is concerned (it is up to T's @@ -787,7 +787,7 @@ is initially uninitialized and T's converting constructor fails, *this is left properly uninitialized.
                                        • -
                                        • +
                                        • Example:
                                          T v;
                                           optional<T> opt0(v);
                                           optional<U> opt1;
                                          @@ -812,7 +812,7 @@
                                           

                                        -
                                        • +
                                          • Deprecated: same as operator= ( T const& v) ; @@ -831,7 +831,7 @@

                                          -
                                          • +
                                            • Deprecated: Same as operator=( detail::none_t );

                                            @@ -902,21 +902,21 @@

                                          -
                                            -
                                          • +
                                              +
                                            • Requirements:*this is initialized
                                            • -
                                            • +
                                            • Returns: A reference to the contained value
                                            • -
                                            • +
                                            • Throws: Nothing.
                                            • -
                                            • +
                                            • Notes: The requirement is asserted via BOOST_ASSERT().
                                            • -
                                            • +
                                            • Example:
                                              T v ;
                                               optional<T> opt ( v );
                                               T const& u = *opt;
                                              @@ -982,15 +982,15 @@
                                               

                                            -
                                              -
                                            • +
                                                +
                                              • Returns: A reference to the contained value, if any, or default.
                                              • -
                                              • +
                                              • Throws: Nothing.
                                              • -
                                              • +
                                              • Example:
                                                T v, z ;
                                                 optional<T> def;
                                                 T const& y = def.get_value_or(z);
                                                @@ -1068,22 +1068,22 @@
                                                 

                                              -
                                                -
                                              • +
                                                  +
                                                • Requirements: *this is initialized
                                                • -
                                                • +
                                                • Returns:The reference contained.
                                                • -
                                                • +
                                                • Throws: Nothing.
                                                • -
                                                • +
                                                • Notes: The requirement is asserted via BOOST_ASSERT().
                                                • -
                                                • +
                                                • Example:
                                                  T v ;
                                                   T& vref = v ;
                                                   optional<T&> opt ( vref );
                                                  @@ -1143,20 +1143,20 @@
                                                   

                                                -
                                                  -
                                                • +
                                                    +
                                                  • Returns: If *this is initialized, a pointer to the contained value; else 0 (null).
                                                  • -
                                                  • +
                                                  • Throws: Nothing.
                                                  • -
                                                  • +
                                                  • Notes: The contained value is permanently stored within *this, so you should not hold nor delete this pointer
                                                  • -
                                                  • +
                                                  • Example:
                                                    T v;
                                                     optional<T> opt(v);
                                                     optional<T> const copt(v);
                                                    @@ -1194,21 +1194,21 @@
                                                     

                                                  -
                                                    -
                                                  • +
                                                      +
                                                    • Requirements: *this is initialized.
                                                    • -
                                                    • +
                                                    • Returns: A pointer to the contained value.
                                                    • -
                                                    • +
                                                    • Throws: Nothing.
                                                    • -
                                                    • +
                                                    • Notes: The requirement is asserted via BOOST_ASSERT().
                                                    • -
                                                    • +
                                                    • Example:
                                                      struct X { int mdata ; } ;
                                                       X x ;
                                                       optional<X> opt (x);
                                                      @@ -1230,15 +1230,15 @@
                                                       

                                                    -
                                                      -
                                                    • +
                                                        +
                                                      • Returns: An unspecified value which if used on a boolean context is equivalent to (get() != 0)
                                                      • -
                                                      • +
                                                      • Throws: Nothing.
                                                      • -
                                                      • +
                                                      • Example:
                                                        optional<T> def ;
                                                         assert ( def == 0 );
                                                         optional<T> opt ( v ) ;
                                                        @@ -1261,20 +1261,20 @@
                                                         

                                                      -
                                                        -
                                                      • +
                                                          +
                                                        • Returns: If *this is uninitialized, true; else false.
                                                        • -
                                                        • +
                                                        • Throws: Nothing.
                                                        • -
                                                        • +
                                                        • Notes: This operator is provided for those compilers which can't use the unspecified-bool-type operator in certain boolean contexts.
                                                        • -
                                                        • +
                                                        • Example:
                                                          optional<T> opt ;
                                                           assert ( !opt );
                                                           *opt = some_T ;
                                                          @@ -1298,16 +1298,16 @@
                                                           

                                                        -
                                                          -
                                                        • +
                                                            +
                                                          • Returns: true if the optional is initialized, false otherwise.
                                                          • -
                                                          • +
                                                          • Throws: Nothing.
                                                          • -
                                                          • +
                                                          • Example:
                                                            optional<T> def ;
                                                             assert ( !def.is_initialized() );
                                                             optional<T> opt ( v ) ;
                                                            @@ -1319,7 +1319,7 @@
                                                                   space
                                                                 

                                                            - + Free functions

                                                            @@ -1336,13 +1336,13 @@

                                                          -
                                                            -
                                                          • +
                                                              +
                                                            • Returns: optional<T>(v) for the deduced type T of v.
                                                            • -
                                                            • +
                                                            • Example:
                                                              template<class T> void foo ( optional<T> const& opt ) ;
                                                               
                                                               foo ( make_optional(1+1) ) ; // Creates an optional<int>
                                                              @@ -1364,13 +1364,13 @@
                                                               

                                                            -
                                                              -
                                                            • +
                                                                +
                                                              • Returns: optional<T>(condition,v) for the deduced type T of v.
                                                              • -
                                                              • +
                                                              • Example:
                                                                optional<double> calculate_foo()
                                                                 {
                                                                   double val = compute_foo();
                                                                @@ -1398,17 +1398,17 @@
                                                                 

                                                              -
                                                                -
                                                              • +
                                                                  +
                                                                • Returns: If both x and y are initialized, (*x == *y). If only x or y is initialized, false. If both are uninitialized, true.
                                                                • -
                                                                • +
                                                                • Throws: Nothing.
                                                                • -
                                                                • +
                                                                • Notes: Pointers have shallow relational operators while optional has deep relational operators. Do not use operator @@ -1417,7 +1417,7 @@ or a pointer; use equal_pointees() instead
                                                                • -
                                                                • +
                                                                • Example:
                                                                  T x(12);
                                                                   T y(12);
                                                                   T z(21);
                                                                  @@ -1459,17 +1459,17 @@
                                                                   

                                                                -
                                                                  -
                                                                • +
                                                                    +
                                                                  • Returns: If y is not initialized, false. If y is initialized and x is not initialized, true. If both x and y are initialized, (*x < *y).
                                                                  • -
                                                                  • +
                                                                  • Throws: Nothing.
                                                                  • -
                                                                  • +
                                                                  • Notes: Pointers have shallow relational operators while optional has deep relational operators. Do not use operator @@ -1478,7 +1478,7 @@ or a pointer; use less_pointees() instead.
                                                                  • -
                                                                  • +
                                                                  • Example:
                                                                    T x(12);
                                                                     T y(34);
                                                                     optional<T> def ;
                                                                    @@ -1516,13 +1516,13 @@
                                                                     

                                                                  -
                                                                    -
                                                                  • +
                                                                      +
                                                                    • Returns: !( x == y );
                                                                    • -
                                                                    • +
                                                                    • Throws: Nothing.
                                                                    @@ -1542,13 +1542,13 @@

                                                                  -
                                                                    -
                                                                  • +
                                                                      +
                                                                    • Returns: ( y < x );
                                                                    • -
                                                                    • +
                                                                    • Throws: Nothing.
                                                                    @@ -1568,12 +1568,12 @@

                                                                  -
                                                                    -
                                                                  • +
                                                                      +
                                                                    • Returns: !( y<x );
                                                                    • -
                                                                    • +
                                                                    • Throws: Nothing.
                                                                    @@ -1593,12 +1593,12 @@

                                                                  -
                                                                    -
                                                                  • +
                                                                      +
                                                                    • Returns: !( x<y );
                                                                    • -
                                                                    • +
                                                                    • Throws: Nothing.
                                                                    @@ -1618,37 +1618,37 @@

                                                                  -
                                                                    -
                                                                  • +
                                                                      +
                                                                    • Effect: If both x and y are initialized, calls swap(*x,*y) using std::swap. If only one is initialized, say x, calls: y.reset(*x); x.reset(); If none is initialized, does nothing.
                                                                    • -
                                                                    • +
                                                                    • Postconditions: The states of x and y interchanged.
                                                                    • -
                                                                    • +
                                                                    • Throws: If both are initialized, whatever swap(T&,T&) throws. If only one is initialized, whatever T::T ( T const& ) throws.
                                                                    • -
                                                                    • +
                                                                    • Notes: If both are initialized, swap(T&,T&) is used unqualified but with std::swap introduced in scope. If only one is initialized, T::~T() and T::T( T const& ) is called.
                                                                    • -
                                                                    • +
                                                                    • Exception Safety: If both are initialized, this operation has the exception safety guarantees of swap(T&,T&). If only one is initialized, it has the same basic guarantee as optional<T>::reset( T const& ).
                                                                    • -
                                                                    • +
                                                                    • Example:
                                                                      T x(12);
                                                                       T y(21);
                                                                       optional<T> def0 ;
                                                                      diff --git a/doc/html/boost_optional/development.html b/doc/html/boost_optional/development.html
                                                                      index 5a14713..7c96256 100644
                                                                      --- a/doc/html/boost_optional/development.html
                                                                      +++ b/doc/html/boost_optional/development.html
                                                                      @@ -3,8 +3,8 @@
                                                                       
                                                                       Development
                                                                       
                                                                      -
                                                                      -
                                                                      +
                                                                      +
                                                                       
                                                                       
                                                                       
                                                                      @@ -22,7 +22,7 @@
                                                                       
                                                                      PrevUpHomeNext
                                                                      -
                                                                      + -
                                                                      +
                                                                      @@ -110,28 +110,28 @@

                                                                      Discriminated-union:

                                                                      -
                                                                        -
                                                                      • +
                                                                          +
                                                                        • deep-copy semantics: copies of the variant implies copies of the value.
                                                                        • -
                                                                        • +
                                                                        • deep-relational semantics: comparisons between variants matches both current types and values
                                                                        • -
                                                                        • +
                                                                        • If the variant's current type is T, it is modeling an initialized optional.
                                                                        • -
                                                                        • +
                                                                        • If the variant's current type is not T, it is modeling an uninitialized optional.
                                                                        • -
                                                                        • +
                                                                        • Testing if the variant's current type is T models testing if the optional is initialized
                                                                        • -
                                                                        • +
                                                                        • Trying to extract a T from a variant when its current type is not T, models the undefined behavior of trying to access the value of an uninitialized @@ -141,34 +141,34 @@

                                                                          Single-element container:

                                                                          -
                                                                            -
                                                                          • +
                                                                              +
                                                                            • deep-copy semantics: copies of the container implies copies of the value.
                                                                            • -
                                                                            • +
                                                                            • deep-relational semantics: comparisons between containers compare container size and if match, contained value
                                                                            • -
                                                                            • +
                                                                            • If the container is not empty (contains an object of type T), it is modeling an initialized optional.
                                                                            • -
                                                                            • +
                                                                            • If the container is empty, it is modeling an uninitialized optional.
                                                                            • -
                                                                            • +
                                                                            • Testing if the container is empty models testing if the optional is initialized
                                                                            • -
                                                                            • +
                                                                            • Trying to extract a T from an empty container models the undefined behavior of trying to access the value of an uninitialized optional
                                                                          -
                                                                          +
                                                                          @@ -193,55 +193,55 @@ We can draw from the purpose of optional<T> the required basic semantics:

                                                                          -
                                                                            -
                                                                          • +
                                                                              +
                                                                            • Default Construction: To introduce a formally uninitialized wrapped object.
                                                                            • -
                                                                            • +
                                                                            • Direct Value Construction via copy: To introduce a formally initialized wrapped object whose value is obtained as a copy of some object.
                                                                            • -
                                                                            • +
                                                                            • Deep Copy Construction: To obtain a new yet equivalent wrapped object.
                                                                            • -
                                                                            • +
                                                                            • Direct Value Assignment (upon initialized): To assign a value to the wrapped object.
                                                                            • -
                                                                            • +
                                                                            • Direct Value Assignment (upon uninitialized): To initialize the wrapped object with a value obtained as a copy of some object.
                                                                            • -
                                                                            • +
                                                                            • Assignment (upon initialized): To assign to the wrapped object the value of another wrapped object.
                                                                            • -
                                                                            • +
                                                                            • Assignment (upon uninitialized): To initialize the wrapped object with value of another wrapped object.
                                                                            • -
                                                                            • +
                                                                            • Deep Relational Operations (when supported by the type T): To compare wrapped object values taking into account the presence of uninitialized states.
                                                                            • -
                                                                            • +
                                                                            • Value access: To unwrap the wrapped object.
                                                                            • -
                                                                            • +
                                                                            • Initialization state query: To determine if the object is formally initialized or not.
                                                                            • -
                                                                            • +
                                                                            • Swap: To exchange wrapped objects. (with whatever exception safety guarantees are provided by T's swap).
                                                                            • -
                                                                            • +
                                                                            • De-initialization: To release the wrapped object (if any) and leave the wrapper in the uninitialized state.
                                                                            • @@ -252,7 +252,7 @@ via a pointer to the wrapped object or null.

                                                                            -
                                                                            +
                                                                            @@ -292,7 +292,7 @@ itself which are supported by a special interface.

                                                                            - + Lexically-hinted Value Access in the presence of possibly untitialized optional objects: The operators * and -> @@ -357,7 +357,7 @@ incarnated by pointers.

                                                                            - + Optional<T> as a model of OptionalPointee
                                                                            @@ -367,7 +367,7 @@ about the possibly uninitialized state appealing to the familiar pointer semantics w.r.t. to null pointers.

                                                                            -
          [Note] Note
          +
          diff --git a/doc/html/boost_optional/examples.html b/doc/html/boost_optional/examples.html index 20bf2ec..95c4ab1 100644 --- a/doc/html/boost_optional/examples.html +++ b/doc/html/boost_optional/examples.html @@ -3,8 +3,8 @@ Examples - - + + @@ -22,7 +22,7 @@
          PrevUpHomeNext
          -
          + -
          +

          Optional return values @@ -57,7 +57,7 @@ }

          -
          +

          Optional local variables @@ -78,7 +78,7 @@ else print("employer's name not found!");

          -
          +

          Optional data members @@ -116,7 +116,7 @@ };

          -
          +

          Bypassing expensive unnecessary default construction diff --git a/doc/html/boost_optional/exception_safety_guarantees.html b/doc/html/boost_optional/exception_safety_guarantees.html index 42b6aa0..cf3577e 100644 --- a/doc/html/boost_optional/exception_safety_guarantees.html +++ b/doc/html/boost_optional/exception_safety_guarantees.html @@ -3,8 +3,8 @@ Exception Safety Guarantees - - + + @@ -22,30 +22,30 @@
          PrevUpHomeNext
          -
          +

          - Because of the current implementation (see Implementation + Because of the current implementation (see Implementation Notes), all of the assignment methods:

          -
            -
          • optional<T>::operator= ( optional<T> +
              +
            • optional<T>::operator= ( optional<T> const& )
            • -
            • optional<T>::operator= ( T const& )
            • -
            • template<class U> optional<T>::operator= ( optional<U> +
            • optional<T>::operator= ( T const& )
            • +
            • template<class U> optional<T>::operator= ( optional<U> const& )
            • -
            • template<class InPlaceFactory> optional<T>::operator= ( InPlaceFactory +
            • template<class InPlaceFactory> optional<T>::operator= ( InPlaceFactory const& )
            • -
            • template<class TypedInPlaceFactory> optional<T>::operator= ( TypedInPlaceFactory +
            • template<class TypedInPlaceFactory> optional<T>::operator= ( TypedInPlaceFactory const& )
            • -
            • optional<T>:::reset ( T const&)
            • +
            • optional<T>:::reset ( T const&)

            Can only guarantee the basic @@ -56,9 +56,9 @@

            On the other hand, the uninitializing methods:

            -
              -
            • optional<T>::operator= ( detail::none_t )
            • -
            • optional<T>::reset()
            • +
                +
              • optional<T>::operator= ( detail::none_t )
              • +
              • optional<T>::reset()

              Provide the no-throw guarantee (assuming a no-throw T::~T()) @@ -112,7 +112,7 @@ }

              - + Swap

              diff --git a/doc/html/boost_optional/implementation_notes.html b/doc/html/boost_optional/implementation_notes.html index 31a2ebe..bdaa201 100644 --- a/doc/html/boost_optional/implementation_notes.html +++ b/doc/html/boost_optional/implementation_notes.html @@ -3,8 +3,8 @@ Implementation Notes - - + + @@ -22,7 +22,7 @@

              PrevUpHomeNext
              -
              +
              diff --git a/doc/html/boost_optional/in_place_factories.html b/doc/html/boost_optional/in_place_factories.html index 45896e5..e23a41b 100644 --- a/doc/html/boost_optional/in_place_factories.html +++ b/doc/html/boost_optional/in_place_factories.html @@ -3,8 +3,8 @@ In-Place Factories - - + + @@ -22,7 +22,7 @@
              PrevUpHomeNext
              -
              +
              @@ -121,18 +121,18 @@ { // Wrapped object constructed in-place via a TypedInPlaceFactory. // No temporary created. - W ( TypedInPlaceFactory2<X,int,std::string&rt(123,"hello")) ; + W ( TypedInPlaceFactory2<X,int,std::string>(123,"hello")) ; }

              The factories are divided in two groups:

              -
                -
              • +
                  +
                • TypedInPlaceFactories: those which take the target type as a primary template parameter.
                • -
                • +
                • InPlaceFactories: those with a template construct(void*) member function taking the target type. diff --git a/doc/html/boost_optional/optional_references.html b/doc/html/boost_optional/optional_references.html index 7ea6a39..9222d48 100644 --- a/doc/html/boost_optional/optional_references.html +++ b/doc/html/boost_optional/optional_references.html @@ -3,8 +3,8 @@ Optional references - - + + @@ -22,7 +22,7 @@
                  PrevUpHomeNext
                  -
                  +
                  @@ -35,20 +35,20 @@ However, since references are not real objects some restrictions apply and some operations are not available in this case:

                  -
                    -
                  • +
                      +
                    • Converting constructors
                    • -
                    • +
                    • Converting assignment
                    • -
                    • +
                    • InPlace construction
                    • -
                    • +
                    • InPlace assignment
                    • -
                    • +
                    • Value-access via pointer
                    @@ -57,13 +57,13 @@ treats it wrapped pseudo-object much as a real value, a true real reference is stored so aliasing will ocurr:

                    -
                      -
                    • +
                        +
                      • Copies of optional<T&> will copy the references but all these references will nonetheless reefer to the same object.
                      • -
                      • +
                      • Value-access will actually provide access to the referenced object rather than the reference itself.
                      • 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 3a7df8e..4f06a6c 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 @@ -3,8 +3,8 @@ Rebinding semantics for assignment of optional references - - + + @@ -22,7 +22,7 @@
                        PrevUpHomeNext
                        -
                        +

                        Rebinding semantics for assignment of optional references @@ -70,7 +70,7 @@ assert(b==3);

                        - + Rationale

                        diff --git a/doc/html/boost_optional/synopsis.html b/doc/html/boost_optional/synopsis.html index 2f7aaeb..32472d3 100644 --- a/doc/html/boost_optional/synopsis.html +++ b/doc/html/boost_optional/synopsis.html @@ -3,8 +3,8 @@ Synopsis - - + + @@ -22,7 +22,7 @@

                        PrevUpHomeNext
                        -
                        +
                        diff --git a/doc/html/boost_optional/type_requirements.html b/doc/html/boost_optional/type_requirements.html index 308453e..aae6ec9 100644 --- a/doc/html/boost_optional/type_requirements.html +++ b/doc/html/boost_optional/type_requirements.html @@ -3,8 +3,8 @@ Type requirements - - + + @@ -22,7 +22,7 @@
                        PrevUpHomeNext
                        -
                        +
                        diff --git a/doc/html/index.html b/doc/html/index.html index dbe7199..981800c 100644 --- a/doc/html/index.html +++ b/doc/html/index.html @@ -3,8 +3,8 @@ Chapter 1. Boost.Optional - - + + @@ -18,7 +18,7 @@

          [Warning] Warning

          Next
          -
          +

          Chapter 1. Boost.Optional

          @@ -26,8 +26,8 @@ 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)

        @@ -71,7 +71,7 @@
        Acknowledgments
        -
        +
        @@ -79,15 +79,15 @@ Consider these functions which should return a value but which might not have a value to return:

        -
          -
        • +
            +
          • (A) double sqrt(double n );
          • -
          • +
          • (B) char get_async_input();
          • -
          • +
          • (C) point polygon::get_any_point_effectively_inside();
          @@ -164,15 +164,9 @@

        -

        -

        -

        -

        -

        -

        - +

        Last revised: October 10, 2008 at 20:53:37 GMT

        Last revised: November 20, 2009 at 10:24:28 GMT