spelling: different

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
This commit is contained in:
Josh Soref
2022-11-01 21:46:27 -04:00
committed by Andrzej Krzemienski
parent cc416b8989
commit 2121a9fa59
2 changed files with 2 additions and 2 deletions

View File

@ -65,7 +65,7 @@ This workaround addresses about 40% of all use cases. If this is insufficient, y
[section Optional Reference Binding][#optional_reference_binding] [section Optional Reference Binding][#optional_reference_binding]
A number of compilers incorrectly treat const lvalues of integral type as rvalues, and create an illegal temporary when binding to an lvalue reference to const in some expressions. This could result in creating an optional lvalue reference that is in fact bound to an unexpected temporary rather than to the intended object. In order to prevent hard to find run-time bugs, this library performs compile-time checks to prevent expressions that would otherwise bind an optional reference to an unexpected temporary. As a consequence, on certain compilers certain pieces of functionality in optional references are missing. In order to maintain a portability of your code across diferent compilers, it is recommended that you only stick to the minimum portable interface of optional references: prefer direct-initialization and copy assignment of optional references to copy-initialization and assignment from `T&`: A number of compilers incorrectly treat const lvalues of integral type as rvalues, and create an illegal temporary when binding to an lvalue reference to const in some expressions. This could result in creating an optional lvalue reference that is in fact bound to an unexpected temporary rather than to the intended object. In order to prevent hard to find run-time bugs, this library performs compile-time checks to prevent expressions that would otherwise bind an optional reference to an unexpected temporary. As a consequence, on certain compilers certain pieces of functionality in optional references are missing. In order to maintain a portability of your code across different compilers, it is recommended that you only stick to the minimum portable interface of optional references: prefer direct-initialization and copy assignment of optional references to copy-initialization and assignment from `T&`:
const int i = 0; const int i = 0;
optional<const int&> or1; optional<const int&> or1;

View File

@ -37,7 +37,7 @@
prevent expressions that would otherwise bind an optional reference to an prevent expressions that would otherwise bind an optional reference to an
unexpected temporary. As a consequence, on certain compilers certain pieces unexpected temporary. As a consequence, on certain compilers certain pieces
of functionality in optional references are missing. In order to maintain of functionality in optional references are missing. In order to maintain
a portability of your code across diferent compilers, it is recommended that a portability of your code across different compilers, it is recommended that
you only stick to the minimum portable interface of optional references: you only stick to the minimum portable interface of optional references:
prefer direct-initialization and copy assignment of optional references to prefer direct-initialization and copy assignment of optional references to
copy-initialization and assignment from <code class="computeroutput"><span class="identifier">T</span><span class="special">&amp;</span></code>: copy-initialization and assignment from <code class="computeroutput"><span class="identifier">T</span><span class="special">&amp;</span></code>: