//===-- Analogous to ----------------------------------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// #ifndef LLVM_LIBC_SRC_SUPPORT_CPP_UTILITY_H #define LLVM_LIBC_SRC_SUPPORT_CPP_UTILITY_H #include "src/__support/CPP/type_traits.h" #include "src/__support/macros/attributes.h" namespace __llvm_libc::cpp { template struct integer_sequence { static_assert(is_integral_v); template using append = integer_sequence; }; namespace internal { template struct make_integer_sequence { using type = typename make_integer_sequence::type::template append; }; template struct make_integer_sequence { using type = integer_sequence; }; } // namespace internal template using make_integer_sequence = typename internal::make_integer_sequence::type; template LIBC_INLINE constexpr T &&forward(typename remove_reference::type &value) { return static_cast(value); } template LIBC_INLINE constexpr T &&forward(typename remove_reference::type &&value) { return static_cast(value); } template LIBC_INLINE constexpr typename remove_reference::type &&move(T &&value) { return static_cast::type &&>(value); } } // namespace __llvm_libc::cpp #endif // LLVM_LIBC_SRC_SUPPORT_CPP_UTILITY_H