Boost
C++ Libraries
...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
This is an older version of Boost and was released in 2020. The current version is 1.89.0.
template<class T, class U>
struct copy_reference
{
typedef see-below type;
};
template<class T, class U>
using copy_reference_t = typename copy_reference<T, U>::type;
type: T ref,
where ref are the ref-qualifiers of U.
Header: #include
<boost/type_traits/copy_reference.hpp>
or #include <boost/type_traits.hpp>>
Table 1.19. Examples
|
Expression |
Result Type |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Compiler Compatibility: All current compilers
are supported by this trait. The type alias copy_reference_t
is only available if the compiler supports template aliases.