mirror of
https://github.com/boostorg/optional.git
synced 2025-07-23 09:07:17 +02:00
spelling: overloads
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
This commit is contained in:
committed by
Andrzej Krzemienski
parent
4b63acfc10
commit
deda20af89
@ -46,7 +46,7 @@ On compilers that do not support variadic templates, each of these functions is
|
|||||||
template<class Arg> void emplace(Arg&& arg);
|
template<class Arg> void emplace(Arg&& arg);
|
||||||
void emplace();
|
void emplace();
|
||||||
|
|
||||||
On compilers that do not support rvalue references, each of these functions is substituted with three overloadss: taking `const` and non-`const` lvalue reference, and third forwarding zero arguments. This forms the following set:
|
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<class Arg> optional(in_place_init_t, const Arg& arg);
|
template<class Arg> optional(in_place_init_t, const Arg& arg);
|
||||||
template<class Arg> optional(in_place_init_t, Arg& arg);
|
template<class Arg> optional(in_place_init_t, Arg& arg);
|
||||||
|
@ -52,7 +52,7 @@
|
|||||||
</pre>
|
</pre>
|
||||||
<p>
|
<p>
|
||||||
On compilers that do not support rvalue references, each of these functions
|
On compilers that do not support rvalue references, each of these functions
|
||||||
is substituted with three overloadss: taking <code class="computeroutput"><span class="keyword">const</span></code>
|
is substituted with three overloads: taking <code class="computeroutput"><span class="keyword">const</span></code>
|
||||||
and non-<code class="computeroutput"><span class="keyword">const</span></code> lvalue reference,
|
and non-<code class="computeroutput"><span class="keyword">const</span></code> lvalue reference,
|
||||||
and third forwarding zero arguments. This forms the following set:
|
and third forwarding zero arguments. This forms the following set:
|
||||||
</p>
|
</p>
|
||||||
|
@ -629,7 +629,7 @@ class optional_base : public optional_tag
|
|||||||
|
|
||||||
// If T is of reference type, trying to get a pointer to the held value must result in a compile-time error.
|
// If T is of reference type, trying to get a pointer to the held value must result in a compile-time error.
|
||||||
// Decent compilers should disallow conversions from reference_content<T>* to T*, but just in case,
|
// Decent compilers should disallow conversions from reference_content<T>* to T*, but just in case,
|
||||||
// the following olverloads are used to filter out the case and guarantee an error in case of T being a reference.
|
// the following overloads are used to filter out the case and guarantee an error in case of T being a reference.
|
||||||
pointer_const_type cast_ptr( internal_type const* p, is_not_reference_tag ) const { return p ; }
|
pointer_const_type cast_ptr( internal_type const* p, is_not_reference_tag ) const { return p ; }
|
||||||
pointer_type cast_ptr( internal_type * p, is_not_reference_tag ) { return p ; }
|
pointer_type cast_ptr( internal_type * p, is_not_reference_tag ) { return p ; }
|
||||||
pointer_const_type cast_ptr( internal_type const* p, is_reference_tag ) const { return &p->get() ; }
|
pointer_const_type cast_ptr( internal_type const* p, is_reference_tag ) const { return &p->get() ; }
|
||||||
|
Reference in New Issue
Block a user