Timm =?utf-8?q?Bäder?= <tbae...@redhat.com>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/70...@github.com>


================
@@ -378,3 +378,92 @@ namespace Packs {
   static_assert(foo<int, char>() == 2, "");
   static_assert(foo<>() == 0, "");
 }
+
+namespace std {
+template <typename T> struct remove_reference { using type = T; };
+template <typename T> struct remove_reference<T &> { using type = T; };
+template <typename T> struct remove_reference<T &&> { using type = T; };
+template <typename T>
+constexpr typename std::remove_reference<T>::type&& move(T &&t) noexcept {
+  return static_cast<typename std::remove_reference<T>::type &&>(t);
+}
+}
+/// The std::move declaration above gets translated to a builtin function.
+namespace Move {
----------------
AaronBallman wrote:

I'd like to see test coverage involving a move constructor, a move assignment 
operator, a direct call to __builtin_move, and some testing for `std::as_const` 
and `std::forward`. Of special interest would be times when there's UB in the 
move constructor/move assignment that should be caught or a non-copyable object 
where move semantics are the only thing that should work.

https://github.com/llvm/llvm-project/pull/70772
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to