2021-06-05 10:47:47 +08:00
|
|
|
// -*- 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
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2021-12-14 08:21:38 +08:00
|
|
|
#ifndef _LIBCPP___UTILITY_AUTO_CAST_H
|
|
|
|
#define _LIBCPP___UTILITY_AUTO_CAST_H
|
2021-06-05 10:47:47 +08:00
|
|
|
|
|
|
|
#include <__config>
|
|
|
|
#include <type_traits>
|
|
|
|
|
|
|
|
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
|
2022-02-02 09:16:40 +08:00
|
|
|
# pragma GCC system_header
|
2021-06-05 10:47:47 +08:00
|
|
|
#endif
|
|
|
|
|
2021-12-14 08:21:38 +08:00
|
|
|
#define _LIBCPP_AUTO_CAST(expr) static_cast<typename decay<decltype((expr))>::type>(expr)
|
2021-06-05 10:47:47 +08:00
|
|
|
|
2021-12-14 08:21:38 +08:00
|
|
|
#endif // _LIBCPP___UTILITY_AUTO_CAST_H
|