From Jason Turner

[refwrap]

Diff to HTML by rtfpessoa

tmp/tmpdwiqdj_6/{from.md → to.md} RENAMED
@@ -12,22 +12,22 @@ namespace std {
12
  typedef see below second_argument_type; // not always defined
13
 
14
  // construct/copy/destroy
15
  reference_wrapper(T&) noexcept;
16
  reference_wrapper(T&&) = delete; // do not bind to temporary objects
17
- reference_wrapper(const reference_wrapper<T>& x) noexcept;
18
 
19
  // assignment
20
- reference_wrapper& operator=(const reference_wrapper<T>& x) noexcept;
21
 
22
  // access
23
  operator T& () const noexcept;
24
  T& get() const noexcept;
25
 
26
  // invocation
27
  template <class... ArgTypes>
28
- typename result_of<T&(ArgTypes&&...)>::type
29
  operator() (ArgTypes&&...) const;
30
  };
31
  }
32
  ```
33
 
@@ -36,11 +36,11 @@ wrapper around a reference to an object or function of type `T`.
36
 
37
  `reference_wrapper<T>` has a weak result type ([[func.require]]). If
38
  `T` is a function type, `result_type` shall be a synonym for the return
39
  type of `T`.
40
 
41
- The template instantiation `reference_wrapper<T>` shall define a nested
42
  type named `argument_type` as a synonym for `T1` only if the type `T` is
43
  any of the following:
44
 
45
  - a function type or a pointer to function type taking one argument of
46
  type `T1`
@@ -57,11 +57,11 @@ the following:
57
  - a function type or a pointer to function type taking two arguments of
58
  types `T1` and `T2`
59
  - a pointer to member function `R T0::f(T2)` *cv* (where *cv* represents
60
  the member function’s cv-qualifiers); the type `T1` is *cv* `T0*`
61
  - a class type with member types `first_argument_type` and
62
- `second_argument_type`; the type `T1` is `T::first_argument_type`. and
63
  the type `T2` is `T::second_argument_type`.
64
 
65
  #### `reference_wrapper` construct/copy/destroy <a id="refwrap.const">[[refwrap.const]]</a>
66
 
67
  ``` cpp
@@ -70,20 +70,20 @@ reference_wrapper(T& t) noexcept;
70
 
71
  *Effects:* Constructs a `reference_wrapper` object that stores a
72
  reference to `t`.
73
 
74
  ``` cpp
75
- reference_wrapper(const reference_wrapper<T>& x) noexcept;
76
  ```
77
 
78
  *Effects:* Constructs a `reference_wrapper` object that stores a
79
  reference to `x.get()`.
80
 
81
  #### `reference_wrapper` assignment <a id="refwrap.assign">[[refwrap.assign]]</a>
82
 
83
  ``` cpp
84
- reference_wrapper& operator=(const reference_wrapper<T>& x) noexcept;
85
  ```
86
 
87
  *Postconditions:* `*this` stores a reference to `x.get()`.
88
 
89
  #### `reference_wrapper` access <a id="refwrap.access">[[refwrap.access]]</a>
@@ -102,11 +102,11 @@ T& get() const noexcept;
102
 
103
  #### reference_wrapper invocation <a id="refwrap.invoke">[[refwrap.invoke]]</a>
104
 
105
  ``` cpp
106
  template <class... ArgTypes>
107
- typename result_of<T&(ArgTypes&&... )>::type
108
  operator()(ArgTypes&&... args) const;
109
  ```
110
 
111
  *Returns:*
112
  *`INVOKE`*`(get(), std::forward<ArgTypes>(args)...)`. ([[func.require]])
 
12
  typedef see below second_argument_type; // not always defined
13
 
14
  // construct/copy/destroy
15
  reference_wrapper(T&) noexcept;
16
  reference_wrapper(T&&) = delete; // do not bind to temporary objects
17
+ reference_wrapper(const reference_wrapper& x) noexcept;
18
 
19
  // assignment
20
+ reference_wrapper& operator=(const reference_wrapper& x) noexcept;
21
 
22
  // access
23
  operator T& () const noexcept;
24
  T& get() const noexcept;
25
 
26
  // invocation
27
  template <class... ArgTypes>
28
+ result_of_t<T&(ArgTypes&&...)>
29
  operator() (ArgTypes&&...) const;
30
  };
31
  }
32
  ```
33
 
 
36
 
37
  `reference_wrapper<T>` has a weak result type ([[func.require]]). If
38
  `T` is a function type, `result_type` shall be a synonym for the return
39
  type of `T`.
40
 
41
+ The template specialization `reference_wrapper<T>` shall define a nested
42
  type named `argument_type` as a synonym for `T1` only if the type `T` is
43
  any of the following:
44
 
45
  - a function type or a pointer to function type taking one argument of
46
  type `T1`
 
57
  - a function type or a pointer to function type taking two arguments of
58
  types `T1` and `T2`
59
  - a pointer to member function `R T0::f(T2)` *cv* (where *cv* represents
60
  the member function’s cv-qualifiers); the type `T1` is *cv* `T0*`
61
  - a class type with member types `first_argument_type` and
62
+ `second_argument_type`; the type `T1` is `T::first_argument_type` and
63
  the type `T2` is `T::second_argument_type`.
64
 
65
  #### `reference_wrapper` construct/copy/destroy <a id="refwrap.const">[[refwrap.const]]</a>
66
 
67
  ``` cpp
 
70
 
71
  *Effects:* Constructs a `reference_wrapper` object that stores a
72
  reference to `t`.
73
 
74
  ``` cpp
75
+ reference_wrapper(const reference_wrapper& x) noexcept;
76
  ```
77
 
78
  *Effects:* Constructs a `reference_wrapper` object that stores a
79
  reference to `x.get()`.
80
 
81
  #### `reference_wrapper` assignment <a id="refwrap.assign">[[refwrap.assign]]</a>
82
 
83
  ``` cpp
84
+ reference_wrapper& operator=(const reference_wrapper& x) noexcept;
85
  ```
86
 
87
  *Postconditions:* `*this` stores a reference to `x.get()`.
88
 
89
  #### `reference_wrapper` access <a id="refwrap.access">[[refwrap.access]]</a>
 
102
 
103
  #### reference_wrapper invocation <a id="refwrap.invoke">[[refwrap.invoke]]</a>
104
 
105
  ``` cpp
106
  template <class... ArgTypes>
107
+ result_of_t<T&(ArgTypes&&... )>
108
  operator()(ArgTypes&&... args) const;
109
  ```
110
 
111
  *Returns:*
112
  *`INVOKE`*`(get(), std::forward<ArgTypes>(args)...)`. ([[func.require]])