deduction guides for std::reference_wrapper
From cppreference.com
< cpp | utility | functional | reference wrapper
C++
Utilities library
|
|
Function objects
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Old binders and adaptors | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
std::reference_wrapper
Member functions | ||||
Non-member functions | ||||
(C++26)(C++26)
|
||||
Deduction guides (C++17) | ||||
Helper classes | ||||
Defined in header <functional>
|
||
template
<
typename T >
reference_wrapper( T& ) - > reference_wrapper<T> ; |
(since C++17) | |
One deduction guide is provided for std::reference_wrapper
Example
This section is incomplete Reason: no example |
Defect reports
The following behavior-changing defect reports were applied retroactively to previously published C++ standards.
DR | Applied to | Behavior as published | Correct behavior |
---|---|---|---|
LWG 2981 | C++17 | a redundant deduction guide from reference_wrapper<T> was provided
|
removed |
LWG 2993 | C++17 | defect resolution removed a constructor used for class template argument deduction | added deduction guide to compensate |