Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / libc / src / __support / CPP / utility / move.h
blob2b4cdf0c4a160b19c3d10b4155e28744ec4dd609
1 //===-- move utility --------------------------------------------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 #ifndef LLVM_LIBC_SRC___SUPPORT_CPP_UTILITY_MOVE_H
9 #define LLVM_LIBC_SRC___SUPPORT_CPP_UTILITY_MOVE_H
11 #include "src/__support/CPP/type_traits/remove_reference.h"
13 namespace LIBC_NAMESPACE::cpp {
15 // move
16 template <class T> constexpr cpp::remove_reference_t<T> &&move(T &&t) {
17 return static_cast<typename cpp::remove_reference_t<T> &&>(t);
20 } // namespace LIBC_NAMESPACE::cpp
22 #endif // LLVM_LIBC_SRC___SUPPORT_CPP_UTILITY_MOVE_H