My Project
add_rvalue_reference.hpp
Go to the documentation of this file.
1 
28 #ifndef BSL_ADD_RVALUE_REFERENCE_HPP
29 #define BSL_ADD_RVALUE_REFERENCE_HPP
30 
31 #include "cstdint.hpp"
32 #include "type_identity.hpp"
33 
34 namespace bsl
35 {
36  namespace details
37  {
46  template<typename T>
47  auto try_add_rvalue_reference(bsl::int32 ignored) noexcept -> type_identity<T &&>;
48 
57  template<typename T>
58  auto try_add_rvalue_reference(bool ignored) noexcept -> type_identity<T>;
59  }
60 
71  template<typename T>
72  struct add_rvalue_reference final
73  {
75  using type = typename decltype(details::try_add_rvalue_reference<T>(0))::type;
76  };
77 
79  template<typename T>
81 }
82 
83 #endif
Provides the member typedef type which is the same as T, except that a topmost rvalue reference is ad...
Definition: add_rvalue_reference.hpp:72
typename decltype(details::try_add_rvalue_reference< T >(0))::type type
provides the member typedef "type"
Definition: add_rvalue_reference.hpp:75
auto try_add_rvalue_reference(bsl::int32 ignored) noexcept -> type_identity< T && >
Returns T with an added && if possible.
::int32_t int32
defines an 32bit signed integer
Definition: cstdint.hpp:40
typename add_rvalue_reference< T >::type add_rvalue_reference_t
a helper that reduces the verbosity of bsl::add_rvalue_reference
Definition: add_rvalue_reference.hpp:80