/llvm-project/clang-tools-extra/test/clang-tidy/checkers/performance/ |
H A D | move-const-arg-const-ref.cpp | 7 struct remove_reference; 10 struct remove_reference { struct 15 struct remove_reference<_Tp &> { struct 20 struct remove_reference<_Tp &&> { struct 25 constexpr typename std::remove_reference<_Tp>::type &&move(_Tp &&__t) { in move() argument 26 return static_cast<typename std::remove_reference<_Tp>::type &&>(__t); in move() 31 forward(typename remove_reference<_Tp>::type &__t) noexcept { in forward()
|
H A D | move-const-arg-trivially-copyable.cpp | 7 template <typename> struct remove_reference; 8 template <typename _Tp> struct remove_reference { typedef _Tp type; }; struct 9 template <typename _Tp> struct remove_reference<_Tp &> { typedef _Tp type; }; struct 10 template <typename _Tp> struct remove_reference<_Tp &&> { typedef _Tp type; }; struct 13 constexpr typename std::remove_reference<_Tp>::type &&move(_Tp &&__t) { in move() argument 14 return static_cast<typename std::remove_reference<_Tp>::type &&>(__t); in move() 19 forward(typename remove_reference<_Tp>::type &__t) noexcept { in forward()
|
H A D | move-constructor-init.cpp | 10 template <class T> struct remove_reference {typedef T type;}; argument 11 template <class T> struct remove_reference<T&> {typedef T type;}; argument 12 template <class T> struct remove_reference<T&&> {typedef T type;}; struct 15 typename remove_reference<T>::type&& move(T&& arg) { in move() 16 return static_cast<typename remove_reference<T>::type&&>(arg); in move()
|
/llvm-project/clang/test/SemaCXX/ |
H A D | attr-lifetimebound.cpp | 213 template <class T> struct remove_reference { in addressof() 216 template <class T> struct remove_reference<T &> { 219 template <class T> struct remove_reference<T &&> { 223 template <class T> constexpr typename remove_reference<T>::type &&move(T &&t) { 224 return static_cast<typename remove_reference<T>::type>(t); 228 constexpr T &&forward(typename remove_reference<T>::type &t) { 233 constexpr T &&forward(typename remove_reference<T>::type &&t) { 240 using type = typename remove_reference<T>::type &; 243 using type = typename remove_reference<T>::type &&; 271 using CopyConst = typename conditional<is_const<remove_reference< 128 template <class T> struct remove_reference { global() struct 129 typestd::foo::remove_reference global() argument 131 template <class T> struct remove_reference<T &> { global() struct 132 typestd::foo::remove_reference global() argument 134 template <class T> struct remove_reference<T &&> { global() struct 135 typestd::foo::remove_reference global() argument [all...] |
H A D | rval-references-examples.cpp | 28 struct remove_reference { struct 33 struct remove_reference<T&> { struct 38 struct remove_reference<T&&> { struct 43 template <class T> typename remove_reference<T>::type&& move(T&& t) { in move() argument 44 return static_cast<typename remove_reference<T>::type&&>(t); in move() 47 template <class T> T&& forward(typename remove_reference<T>::type& t) { in forward() 51 template <class T> T&& forward(typename remove_reference<T>::type&& t) { in forward()
|
H A D | builtin-std-move.cpp | 35 template<typename T> struct remove_reference { using type = T; }; struct 36 template<typename T> struct remove_reference<T&> { using type = T; }; struct 37 template<typename T> struct remove_reference<T&&> { using type = T; }; struct 42 template<typename T> CONSTEXPR T &&forward(typename remove_reference<T>::type &x) { in forward() 48 template<typename T> CONSTEXPR T &&forward(typename remove_reference<T>::type &&x) { in forward() 61 is_const<remove_reference<U>>::value, 67 typename remove_reference<T>::type &, 68 typename remove_reference<T>::type &&>::type; 75 using TT = typename remove_reference<T>::type; in forward_like()
|
H A D | discrim-union.cpp | 3 template<typename T> struct remove_reference { typedef T type; }; struct 4 template<typename T> struct remove_reference<T&> { typedef T type; }; struct 5 template<typename T> struct remove_reference<T&&> { typedef T type; }; struct 7 template<typename T> constexpr T &&forward(typename remove_reference<T>::type &t) noexcept { return… in forward() 8 template<typename T> constexpr T &&forward(typename remove_reference<T>::type &&t) noexcept { retur… in forward() 9 …pename T> constexpr typename remove_reference<T>::type &&move(T &&t) noexcept { return static_cast… in move()
|
H A D | warn-self-move.cpp | 6 template <class T> struct remove_reference { typedef T type; }; argument 7 template <class T> struct remove_reference<T&> { typedef T type; }; argument 8 template <class T> struct remove_reference<T&&> { typedef T type; }; struct 10 template <class T> typename remove_reference<T>::type &&move(T &&t);
|
/llvm-project/clang/test/Analysis/ |
H A D | delayed-template-parsing-crash.cpp | 4 template <class T> struct remove_reference {typedef T type;}; struct 5 template <class T> struct remove_reference<T&> {typedef T type;}; struct 6 template <class T> struct remove_reference<T&&> {typedef T type;}; argument 9 typename remove_reference<T>::type&& move(T&& arg) { // this used to crash in move() 10 return static_cast<typename remove_reference<T>::type&&>(arg); in move()
|
H A D | self-assign.cpp | 12 template<class T> struct remove_reference { typedef T type; }; argument 13 template<class T> struct remove_reference<T&> { typedef T type; }; argument 14 template<class T> struct remove_reference<T&&> { typedef T type; }; struct 15 template<class T> typename remove_reference<T>::type&& move(T&& t);
|
/llvm-project/compiler-rt/lib/sanitizer_common/ |
H A D | sanitizer_type_traits.h | 63 struct remove_reference { 67 struct remove_reference<T&> { 71 struct remove_reference<T&&> { 76 WARN_UNUSED_RESULT inline typename remove_reference<T>::type&& move(T&& t) { 77 return static_cast<typename remove_reference<T>::type&&>(t); 82 typename remove_reference<T>::type& t) { 88 typename remove_reference<T>::type&& t) {
|
/llvm-project/clang/test/CXX/over/over.match/over.match.best/over.ics.rank/ |
H A D | p3-0x.cpp | 39 struct remove_reference { struct 44 struct remove_reference<T&> { argument 49 struct remove_reference<T&&> { struct 54 template<typename T> int &f(typename remove_reference<T>::type&); argument 55 template<typename T> float &f(typename remove_reference<T>::type&&);
|
/llvm-project/libcxx/test/std/utilities/meta/meta.trans/ |
H A D | objc_support.compile.pass.mm | 86 // remove_reference 87 static_assert(std::is_same<std::remove_reference<id>::type, id>::value, ""); 88 static_assert(std::is_same<std::remove_reference<id&>::type, id>::value, ""); 89 static_assert(std::is_same<std::remove_reference<const id&>::type, const id>::value, ""); 90 static_assert(std::is_same<std::remove_reference<id&&>::type, id>::value, ""); 91 static_assert(std::is_same<std::remove_reference<const id&&>::type, const id>::value, ""); 92 static_assert(std::is_same<std::remove_reference<I>::type, I>::value, ""); 93 static_assert(std::is_same<std::remove_reference<I&>::type, I>::value, ""); 94 static_assert(std::is_same<std::remove_reference<const I&>::type, const I>::value, ""); 95 static_assert(std::is_same<std::remove_reference<I&&>::type, I>::value, ""); [all …]
|
/llvm-project/clang/test/AST/ |
H A D | ast-dump-openmp-begin-declare-variant_reference.cpp | 5 template <class _Tp> struct remove_reference { typedef _Tp type; }; struct 6 template <class _Tp> struct remove_reference<_Tp &> { typedef _Tp type; }; argument 7 template <class _Tp> struct remove_reference<_Tp &&> { typedef _Tp type; }; argument 10 inline typename remove_reference<_Tp>::type && 12 typedef typename remove_reference<_Tp>::type _Up; in move()
|
/llvm-project/clang-tools-extra/test/clang-tidy/checkers/misc/ |
H A D | throw-by-value-catch-by-reference.cpp | 14 template <class T> struct remove_reference { typedef T type; }; struct 15 template <class T> struct remove_reference<T &> { typedef T type; }; argument 16 template <class T> struct remove_reference<T &&> { typedef T type; }; struct 18 template <typename T> typename remove_reference<T>::type &&move(T &&arg) { in move() 19 return static_cast<typename remove_reference<T>::type &&>(arg); in move()
|
H A D | unconventional-assign-operator.cpp | 5 struct remove_reference { typedef T type; }; argument 7 struct remove_reference<T &> { typedef T type; }; struct 9 struct remove_reference<T &&> { typedef T type; }; struct 11 typename remove_reference<T>::type &&move(T &&t);
|
/llvm-project/libc/src/__support/CPP/type_traits/ |
H A D | remove_reference.h | 1 //===-- remove_reference type_traits ----------------------------*- C++ -*-===// 17 // remove_reference 18 template <class T> struct remove_reference : cpp::type_identity<T> {}; 19 template <class T> struct remove_reference<T &> : cpp::type_identity<T> {}; 20 template <class T> struct remove_reference<T &&> : cpp::type_identity<T> {}; 22 using remove_reference_t = typename remove_reference<T>::type; 16 template <class T> struct remove_reference : cpp::type_identity<T> {}; global() struct
|
/llvm-project/libcxx/test/std/utilities/utility/as_const/ |
H A D | as_const.pass.cpp | 25 …static_assert(std::is_const<typename std::remove_reference<decltype(std::as_const … in test() 26 …static_assert(std::is_const<typename std::remove_reference<decltype(std::as_const< T… in test() 27 …static_assert(std::is_const<typename std::remove_reference<decltype(std::as_const<const T… in test() 28 …static_assert(std::is_const<typename std::remove_reference<decltype(std::as_const<volatile T… in test() 29 …static_assert(std::is_const<typename std::remove_reference<decltype(std::as_const<const volatile T… in test()
|
/llvm-project/clang/test/CodeGenCoroutines/ |
H A D | pr56919.cpp | 11 template <typename T> struct remove_reference { using type = T; }; struct 12 template <typename T> struct remove_reference<T &> { using type = T; }; struct 13 template <typename T> struct remove_reference<T &&> { using type = T; }; struct 16 constexpr typename std::remove_reference<T>::type&& move(T &&t) noexcept { in move() argument 17 return static_cast<typename std::remove_reference<T>::type &&>(t); in move()
|
/llvm-project/compiler-rt/lib/sanitizer_common/tests/ |
H A D | sanitizer_type_traits_test.cpp | 38 ASSERT_TRUE((is_same<int, remove_reference<int>::type>::value)); in TEST() 39 ASSERT_TRUE((is_same<const int, remove_reference<const int>::type>::value)); in TEST() 40 ASSERT_TRUE((is_same<int, remove_reference<int&>::type>::value)); in TEST() 41 ASSERT_TRUE((is_same<const int, remove_reference<const int&>::type>::value)); in TEST() 42 ASSERT_TRUE((is_same<int, remove_reference<int&&>::type>::value)); in TEST()
|
/llvm-project/clang/test/SemaCXX/Inputs/ |
H A D | std-coroutine.h | 7 template<typename T> struct remove_reference { typedef T type; }; argument 8 template<typename T> struct remove_reference<T &> { typedef T type; }; 9 template<typename T> struct remove_reference<T &&> { typedef T type; }; 12 typename remove_reference<T>::type &&move(T &&t) noexcept;
|
/llvm-project/clang-tools-extra/test/clang-tidy/checkers/bugprone/ |
H A D | move-forwarding-reference.cpp | 4 template <typename> struct remove_reference; 6 template <typename _Tp> struct remove_reference { typedef _Tp type; }; struct 8 template <typename _Tp> struct remove_reference<_Tp &> { typedef _Tp type; }; struct 10 template <typename _Tp> struct remove_reference<_Tp &&> { typedef _Tp type; }; struct 13 constexpr typename std::remove_reference<_Tp>::type &&move(_Tp &&__t); argument
|
/llvm-project/clang/test/SemaCUDA/ |
H A D | implicit-member-target.cu | 164 template <class T> struct remove_reference { typedef T type; }; struct 165 template <class T> struct remove_reference<T&> { typedef T type; }; struct 166 template <class T> struct remove_reference<T&&> { typedef T type; }; argument 168 template <class T> typename remove_reference<T>::type&& move(T&& t);
|
/llvm-project/clang-tools-extra/test/clang-tidy/checkers/bugprone/Inputs/unchecked-optional-access/absl/types/ |
H A D | optional.h | 8 template <typename T> struct remove_reference { using type = T; }; argument 9 template <typename T> struct remove_reference<T&> { using type = T; }; 10 template <typename T> struct remove_reference<T&&> { using type = T; }; 14 using remove_reference_t = typename remove_reference<T>::type;
|
/llvm-project/clang/test/SemaObjCXX/ |
H A D | block-variable-move.mm | 6 template <class T> struct remove_reference { typedef T type; }; 7 template <class T> struct remove_reference<T&> { typedef T type; }; 8 template <class T> struct remove_reference<T&&> { typedef T type; }; 10 template <class T> typename remove_reference<T>::type &&move(T &&t);
|