[OpenACC] Implement 'device_type' for 'data' construct
[llvm-project.git] / libc / src / __support / CPP / utility / move.h
blobb61f723e8d4cb8b065a312090b5bb1d49ccbb13f
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"
12 #include "src/__support/macros/attributes.h" // LIBC_INLINE
13 #include "src/__support/macros/config.h"
15 namespace LIBC_NAMESPACE_DECL {
16 namespace cpp {
18 // move
19 template <class T>
20 LIBC_INLINE constexpr cpp::remove_reference_t<T> &&move(T &&t) {
21 return static_cast<typename cpp::remove_reference_t<T> &&>(t);
24 } // namespace cpp
25 } // namespace LIBC_NAMESPACE_DECL
27 #endif // LLVM_LIBC_SRC___SUPPORT_CPP_UTILITY_MOVE_H