aboutsummaryrefslogtreecommitdiff
path: root/libcxx/include/__utility/convert_to_integral.h
diff options
context:
space:
mode:
Diffstat (limited to 'libcxx/include/__utility/convert_to_integral.h')
-rw-r--r--libcxx/include/__utility/convert_to_integral.h50
1 files changed, 23 insertions, 27 deletions
diff --git a/libcxx/include/__utility/convert_to_integral.h b/libcxx/include/__utility/convert_to_integral.h
index 2f61db6112d1..f1fcdd98010c 100644
--- a/libcxx/include/__utility/convert_to_integral.h
+++ b/libcxx/include/__utility/convert_to_integral.h
@@ -21,51 +21,47 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR
-int __convert_to_integral(int __val) { return __val; }
+inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR int __convert_to_integral(int __val) { return __val; }
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR
-unsigned __convert_to_integral(unsigned __val) { return __val; }
+inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR unsigned __convert_to_integral(unsigned __val) { return __val; }
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR
-long __convert_to_integral(long __val) { return __val; }
+inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR long __convert_to_integral(long __val) { return __val; }
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR
-unsigned long __convert_to_integral(unsigned long __val) { return __val; }
+inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR unsigned long __convert_to_integral(unsigned long __val) {
+ return __val;
+}
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR
-long long __convert_to_integral(long long __val) { return __val; }
+inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR long long __convert_to_integral(long long __val) { return __val; }
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR
-unsigned long long __convert_to_integral(unsigned long long __val) {return __val; }
+inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR unsigned long long __convert_to_integral(unsigned long long __val) {
+ return __val;
+}
-template<typename _Fp, __enable_if_t<is_floating_point<_Fp>::value, int> = 0>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR
-long long
- __convert_to_integral(_Fp __val) { return __val; }
+template <typename _Fp, __enable_if_t<is_floating_point<_Fp>::value, int> = 0>
+inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR long long __convert_to_integral(_Fp __val) {
+ return __val;
+}
#ifndef _LIBCPP_HAS_NO_INT128
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR
-__int128_t __convert_to_integral(__int128_t __val) { return __val; }
+inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR __int128_t __convert_to_integral(__int128_t __val) { return __val; }
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR
-__uint128_t __convert_to_integral(__uint128_t __val) { return __val; }
+inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR __uint128_t __convert_to_integral(__uint128_t __val) { return __val; }
#endif
template <class _Tp, bool = is_enum<_Tp>::value>
-struct __sfinae_underlying_type
-{
- typedef typename underlying_type<_Tp>::type type;
- typedef decltype(((type)1) + 0) __promoted_type;
+struct __sfinae_underlying_type {
+ typedef typename underlying_type<_Tp>::type type;
+ typedef decltype(((type)1) + 0) __promoted_type;
};
template <class _Tp>
struct __sfinae_underlying_type<_Tp, false> {};
template <class _Tp>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR
-typename __sfinae_underlying_type<_Tp>::__promoted_type
-__convert_to_integral(_Tp __val) { return __val; }
+inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR typename __sfinae_underlying_type<_Tp>::__promoted_type
+__convert_to_integral(_Tp __val) {
+ return __val;
+}
_LIBCPP_END_NAMESPACE_STD