Init
This commit is contained in:
53
cppdraft/refwrap/const.md
Normal file
53
cppdraft/refwrap/const.md
Normal file
@@ -0,0 +1,53 @@
|
||||
[refwrap.const]
|
||||
|
||||
# 22 General utilities library [[utilities]](./#utilities)
|
||||
|
||||
## 22.10 Function objects [[function.objects]](function.objects#refwrap.const)
|
||||
|
||||
### 22.10.6 Class template reference_wrapper [[refwrap]](refwrap#const)
|
||||
|
||||
#### 22.10.6.2 Constructors [refwrap.const]
|
||||
|
||||
[ð](#lib:reference_wrapper,constructor)
|
||||
|
||||
`template<class U>
|
||||
constexpr reference_wrapper(U&& u) noexcept(see below);
|
||||
`
|
||||
|
||||
[1](#1)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/utilities.tex#L11724)
|
||||
|
||||
Let *FUN* denote the exposition-only functionsvoid *FUN*(T&) noexcept;void *FUN*(T&&) = delete;
|
||||
|
||||
[2](#2)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/utilities.tex#L11731)
|
||||
|
||||
*Constraints*: The expression *FUN*(declval<U>()) is well-formed andis_same_v<remove_cvref_t<U>, reference_wrapper> is false[.](#2.sentence-1)
|
||||
|
||||
[3](#3)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/utilities.tex#L11736)
|
||||
|
||||
*Effects*: Creates a variable r as if by T& r = std::forward<U>(u),
|
||||
then constructs a reference_wrapper object
|
||||
that stores a reference to r[.](#3.sentence-1)
|
||||
|
||||
[4](#4)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/utilities.tex#L11743)
|
||||
|
||||
*Remarks*: The exception specification is equivalent tonoexcept(*FUN*(declval<U>()))[.](#4.sentence-1)
|
||||
|
||||
[ð](#lib:reference_wrapper,constructor_)
|
||||
|
||||
`constexpr reference_wrapper(const reference_wrapper& x) noexcept;
|
||||
`
|
||||
|
||||
[5](#5)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/utilities.tex#L11755)
|
||||
|
||||
*Effects*: Constructs a reference_wrapper object that
|
||||
stores a reference to x.get()[.](#5.sentence-1)
|
||||
Reference in New Issue
Block a user