[libcxx-commits] [libcxx] [libc++] Start implementing std::datapar::simd (PR #139919)

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Fri May 30 08:49:56 PDT 2025


================
@@ -0,0 +1,88 @@
+//===----------------------------------------------------------------------===//
+//
+// 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
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef _LIBCPP___TYPE_TRAITS_STANDARD_TYPES_H
+#define _LIBCPP___TYPE_TRAITS_STANDARD_TYPES_H
+
+#include <__config>
+#include <__type_traits/integral_constant.h>
+#include <__type_traits/remove_cv.h>
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#  pragma GCC system_header
+#endif
+
+#if _LIBCPP_STD_VER >= 26
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+template <class _Tp>
+inline constexpr bool __is_standard_signed_integer_type_v = false;
+
+template <>
+inline constexpr bool __is_standard_signed_integer_type_v<signed char> = true;
+
+template <>
+inline constexpr bool __is_standard_signed_integer_type_v<short> = true;
+
+template <>
+inline constexpr bool __is_standard_signed_integer_type_v<int> = true;
+
+template <>
+inline constexpr bool __is_standard_signed_integer_type_v<long> = true;
+
+template <>
+inline constexpr bool __is_standard_signed_integer_type_v<long long> = true;
+
+template <class _Tp>
+inline constexpr bool __is_standard_unsigned_integer_type_v = false;
+
+template <>
+inline constexpr bool __is_standard_unsigned_integer_type_v<unsigned char> = true;
+
+template <>
+inline constexpr bool __is_standard_unsigned_integer_type_v<unsigned short> = true;
+
+template <>
+inline constexpr bool __is_standard_unsigned_integer_type_v<unsigned int> = true;
+
+template <>
+inline constexpr bool __is_standard_unsigned_integer_type_v<unsigned long> = true;
+
+template <>
+inline constexpr bool __is_standard_unsigned_integer_type_v<unsigned long long> = true;
+
+template <class _Tp>
+inline constexpr bool __is_standard_integer_type_v =
+    __is_standard_signed_integer_type_v<_Tp> || __is_standard_unsigned_integer_type_v<_Tp>;
+
+template <class _Tp>
+inline constexpr bool __is_character_type_v = false;
+
+template <>
+inline constexpr bool __is_character_type_v<char> = true;
+
+template <>
+inline constexpr bool __is_character_type_v<wchar_t> = true;
----------------
ldionne wrote:

`_LIBCPP_HAS_WIDE_CHARACTERS`?

https://github.com/llvm/llvm-project/pull/139919


More information about the libcxx-commits mailing list