diff --git a/doc/13_convenience.qbk b/doc/13_convenience.qbk index 9a95de3..0989b5a 100644 --- a/doc/13_convenience.qbk +++ b/doc/13_convenience.qbk @@ -15,7 +15,7 @@ deductions for class template parameters. std::optional os2 = osv; // OK os2 == osv; // OK -They are practical, ans sometimes stem from the argument for consistency: +They are practical, and sometimes stem from the argument for consistency: if `(optT && *optT == u)` works then `(optT == u)` should also work. However, these intelligent convenience functions sometimes produce results diff --git a/doc/28_ref_optional_semantics.qbk b/doc/28_ref_optional_semantics.qbk index 0fc90a7..9a5986f 100644 --- a/doc/28_ref_optional_semantics.qbk +++ b/doc/28_ref_optional_semantics.qbk @@ -233,7 +233,7 @@ __SPACE__ arguments `std::forward(args)...`. * [*Postconditions:] `*this` is initialized. * [*Throws:] Any exception thrown by the selected constructor of `T`. -* [*Notes: ] `T` need not be __MOVE_CONSTRUCTIBLE__. On compilers that do not support variadic templates or rvalue references, this constuctor is available in limited functionality. For details [link optional_emplace_workaround see here]. +* [*Notes: ] `T` need not be __MOVE_CONSTRUCTIBLE__. * [*Example:] `` @@ -257,7 +257,7 @@ __SPACE__ * [*Effect:] If `condition` is `true`, initializes the contained value as if direct-non-list-initializing an object of type `T` with the arguments `std::forward(args)...`. * [*Postconditions:] `bool(*this) == condition`. * [*Throws:] Any exception thrown by the selected constructor of `T`. -* [*Notes: ] `T` need not be __MOVE_CONSTRUCTIBLE__. On compilers that do not support variadic templates or rvalue references, this constuctor is available in limited functionality. For details [link optional_emplace_workaround see here]. +* [*Notes: ] `T` need not be __MOVE_CONSTRUCTIBLE__. * [*Example:] `` @@ -502,7 +502,7 @@ __SPACE__ * [*Postconditions: ] `*this` is [_initialized]. * [*Throws:] Whatever the selected `T`'s constructor throws. * [*Exception Safety:] If an exception is thrown during the initialization of `T`, `*this` is ['uninitialized]. -* [*Notes:] `T` need not be __MOVE_CONSTRUCTIBLE__ or `MoveAssignable`. On compilers that do not support variadic templates or rvalue references, this function is available in limited functionality. For details [link optional_emplace_workaround see here]. +* [*Notes:] `T` need not be __MOVE_CONSTRUCTIBLE__ or `MoveAssignable`. * [*Example:] `` T v; diff --git a/doc/90_dependencies.qbk b/doc/90_dependencies.qbk index acc23c1..365f2be 100644 --- a/doc/90_dependencies.qbk +++ b/doc/90_dependencies.qbk @@ -24,41 +24,6 @@ The implementation uses the following other Boost modules: [endsect] -[section Emplace operations in older compilers][#optional_emplace_workaround] - -Certain constructors and functions in the interface of `optional` perform a 'perfect forwarding' of arguments: - - template optional(in_place_init_t, Args&&... args); - template optional(in_place_init_if_t, bool condition, Args&&... args); - template void emplace(Args&&... args); - -On compilers that do not support variadic templates, each of these functions is substituted with two overloads, one forwarding a single argument, the other forwarding zero arguments. This forms the following set: - - template optional(in_place_init_t, Arg&& arg); - optional(in_place_init_t); - - template optional(in_place_init_if_t, bool condition, Arg&& arg); - optional(in_place_init_if_t, bool condition); - - template void emplace(Arg&& arg); - void emplace(); - -On compilers that do not support rvalue references, each of these functions is substituted with three overloads: taking `const` and non-`const` lvalue reference, and third forwarding zero arguments. This forms the following set: - - template optional(in_place_init_t, const Arg& arg); - template optional(in_place_init_t, Arg& arg); - optional(in_place_init_t); - - template optional(in_place_init_if_t, bool condition, const Arg& arg); - template optional(in_place_init_if_t, bool condition, Arg& arg); - optional(in_place_init_if_t, bool condition); - - template void emplace(const Arg& arg); - template void emplace(Arg& arg); - void emplace(); - -This workaround addresses about 40% of all use cases. If this is insufficient, you need to resort to using [link boost_optional.design.in_place_factories In-Place Factories]. -[endsect] [section Optional Reference Binding][#optional_reference_binding]