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
22float __promote_impl(float);
23double __promote_impl(char);
24double __promote_impl(int);
25double __promote_impl(unsigned);
26double __promote_impl(long);
27double __promote_impl(unsigned long);
28double __promote_impl(long long);
29double __promote_impl(unsigned long long);
30#if _LIBCPP_HAS_INT128
31double __promote_impl(__int128_t);
32double __promote_impl(__uint128_t);
33#endif
34double __promote_impl(double);
35long double __promote_impl(long double);
36
37template <class... _Args>
38using __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.

source code of libcxx/include/__type_traits/promote.h