10eae32dcSDimitry Andric // -*- C++ -*- 20eae32dcSDimitry Andric //===----------------------------------------------------------------------===// 30eae32dcSDimitry Andric // 40eae32dcSDimitry Andric // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 50eae32dcSDimitry Andric // See https://llvm.org/LICENSE.txt for license information. 60eae32dcSDimitry Andric // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 70eae32dcSDimitry Andric // 80eae32dcSDimitry Andric //===----------------------------------------------------------------------===// 90eae32dcSDimitry Andric 100eae32dcSDimitry Andric #ifndef _LIBCPP___UTILITY_AUTO_CAST_H 110eae32dcSDimitry Andric #define _LIBCPP___UTILITY_AUTO_CAST_H 120eae32dcSDimitry Andric 130eae32dcSDimitry Andric #include <__config> 14bdd1243dSDimitry Andric #include <__type_traits/decay.h> 150eae32dcSDimitry Andric 160eae32dcSDimitry Andric #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) 170eae32dcSDimitry Andric # pragma GCC system_header 180eae32dcSDimitry Andric #endif 190eae32dcSDimitry Andric 20*06c3fb27SDimitry Andric #define _LIBCPP_AUTO_CAST(expr) static_cast<::std::__decay_t<decltype((expr))> >(expr) 210eae32dcSDimitry Andric 220eae32dcSDimitry Andric #endif // _LIBCPP___UTILITY_AUTO_CAST_H 23