[libcxx-commits] [libcxx] [libc++] Refactor internal index_sequence API to match the public one (PR #149475)
via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Jul 18 01:45:53 PDT 2025
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff HEAD~1 HEAD --extensions h,,cpp -- libcxx/include/__functional/bind.h libcxx/include/__memory_resource/polymorphic_allocator.h libcxx/include/__mutex/once_flag.h libcxx/include/__thread/thread.h libcxx/include/__tuple/make_tuple_types.h libcxx/include/__tuple/tuple_element.h libcxx/include/__utility/integer_sequence.h libcxx/include/__utility/pair.h libcxx/include/bitset libcxx/include/future libcxx/include/mutex libcxx/include/scoped_allocator libcxx/include/tuple libcxx/include/variant libcxx/test/std/utilities/tuple/tuple.tuple/tuple.apply/make_from_tuple.pass.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/libcxx/include/__utility/integer_sequence.h b/libcxx/include/__utility/integer_sequence.h
index 9c617dea4..908a9ee22 100644
--- a/libcxx/include/__utility/integer_sequence.h
+++ b/libcxx/include/__utility/integer_sequence.h
@@ -21,13 +21,15 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#if __has_builtin(__make_integer_seq)
+# if __has_builtin(__make_integer_seq)
template <template <class _Tp, _Tp...> class _BaseType, class _Tp, _Tp _SequenceSize>
using __make_integer_sequence_impl _LIBCPP_NODEBUG = __make_integer_seq<_BaseType, _Tp, _SequenceSize>;
-#else
-template <class _Tp, _Tp...> class _BaseType, class _Tp, _Tp _SequenceSize>
-using __make_integer_seuqnec_impl _LIBCPP_NODEBUG = _BaseType<_Tp, __integer_pack(_SequenceSize)...>;
-#endif
+# else
+template <class _Tp, _Tp...>
+class _BaseType, class _Tp,
+ _Tp _SequenceSize > using __make_integer_seuqnec_impl _LIBCPP_NODEBUG =
+ _BaseType<_Tp, __integer_pack(_SequenceSize)...>;
+# endif
template <class _Tp, _Tp... _Indices>
struct __integer_sequence {
@@ -42,7 +44,7 @@ using __index_sequence = __integer_sequence<size_t, _Indices...>;
template <size_t _SequenceSize>
using __make_index_sequence _LIBCPP_NODEBUG = __make_integer_sequence_impl<__integer_sequence, size_t, _SequenceSize>;
-#if _LIBCPP_STD_VER >= 14
+# if _LIBCPP_STD_VER >= 14
template <class _Tp, _Tp... _Indices>
struct integer_sequence : __integer_sequence<_Tp, _Indices...> {};
``````````
</details>
https://github.com/llvm/llvm-project/pull/149475
More information about the libcxx-commits
mailing list