Warning: This file is not a C or C++ file. It does not have highlighting.
| 1 | //===----------------------------------------------------------------------===// |
|---|---|
| 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 | |
| 9 | #ifndef _LIBCPP___TYPE_TRAITS_PROMOTE_H |
| 10 | #define _LIBCPP___TYPE_TRAITS_PROMOTE_H |
| 11 | |
| 12 | #include <__config> |
| 13 | #include <__type_traits/enable_if.h> |
| 14 | #include <__type_traits/is_arithmetic.h> |
| 15 | |
| 16 | #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) |
| 17 | # pragma GCC system_header |
| 18 | #endif |
| 19 | |
| 20 | _LIBCPP_BEGIN_NAMESPACE_STD |
| 21 | |
| 22 | float __promote_impl(float); |
| 23 | double __promote_impl(char); |
| 24 | double __promote_impl(int); |
| 25 | double __promote_impl(unsigned); |
| 26 | double __promote_impl(long); |
| 27 | double __promote_impl(unsigned long); |
| 28 | double __promote_impl(long long); |
| 29 | double __promote_impl(unsigned long long); |
| 30 | #if _LIBCPP_HAS_INT128 |
| 31 | double __promote_impl(__int128_t); |
| 32 | double __promote_impl(__uint128_t); |
| 33 | #endif |
| 34 | double __promote_impl(double); |
| 35 | long double __promote_impl(long double); |
| 36 | |
| 37 | template <class... _Args> |
| 38 | using __promote_t _LIBCPP_NODEBUG = |
| 39 | decltype((__enable_if_t<(is_arithmetic<_Args>::value && ...)>)0, (std::__promote_impl(_Args()) + ...)); |
| 40 | |
| 41 | _LIBCPP_END_NAMESPACE_STD |
| 42 | |
| 43 | #endif // _LIBCPP___TYPE_TRAITS_PROMOTE_H |
| 44 |
Warning: This file is not a C or C++ file. It does not have highlighting.
