[libcxx-commits] [libcxx] [libc++] Move out (for reusing it in flat_multimap) (PR #117445)

via libcxx-commits libcxx-commits at lists.llvm.org
Sat Nov 23 11:01:45 PST 2024


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 b0e7383e59a100da60c043fd9aca3484c5ed332f a3dadd67fa45ca14e251f26cf63ea7217a857a85 --extensions ,h,cpp -- libcxx/include/__flat_map/key_value_iterator.h libcxx/include/__flat_map/flat_map.h libcxx/include/flat_map libcxx/test/std/containers/container.adaptors/flat.map/flat.map.cons/iter_iter_stability.pass.cpp libcxx/test/std/containers/container.adaptors/flat.map/flat.map.iterators/reverse_iterator.pass.cpp libcxx/test/std/containers/container.adaptors/flat.map/incomplete_type.pass.cpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/libcxx/include/__flat_map/flat_map.h b/libcxx/include/__flat_map/flat_map.h
index 6bc8608ecf..b66bc1cb66 100644
--- a/libcxx/include/__flat_map/flat_map.h
+++ b/libcxx/include/__flat_map/flat_map.h
@@ -81,7 +81,6 @@ template <class _Key,
           class _KeyContainer    = vector<_Key>,
           class _MappedContainer = vector<_Tp>>
 class flat_map {
-
   template <class, class, class, class, class>
   friend class flat_map;
 
@@ -1192,20 +1191,20 @@ template <ranges::input_range _Range,
           class            = __enable_if_t<!__is_allocator<_Compare>::value && __is_allocator<_Allocator>::value>>
 flat_map(from_range_t, _Range&&, _Compare = _Compare(), _Allocator = _Allocator())
     -> flat_map<
-    __range_key_type<_Range>,
-    __range_mapped_type<_Range>,
-    _Compare,
-    vector<__range_key_type<_Range>, __allocator_traits_rebind_t<_Allocator, __range_key_type<_Range>>>,
-    vector<__range_mapped_type<_Range>, __allocator_traits_rebind_t<_Allocator, __range_mapped_type<_Range>>>>;
+        __range_key_type<_Range>,
+        __range_mapped_type<_Range>,
+        _Compare,
+        vector<__range_key_type<_Range>, __allocator_traits_rebind_t<_Allocator, __range_key_type<_Range>>>,
+        vector<__range_mapped_type<_Range>, __allocator_traits_rebind_t<_Allocator, __range_mapped_type<_Range>>>>;
 
 template <ranges::input_range _Range, class _Allocator, class = __enable_if_t<__is_allocator<_Allocator>::value>>
 flat_map(from_range_t, _Range&&, _Allocator)
     -> flat_map<
-    __range_key_type<_Range>,
-    __range_mapped_type<_Range>,
-    less<__range_key_type<_Range>>,
-    vector<__range_key_type<_Range>, __allocator_traits_rebind_t<_Allocator, __range_key_type<_Range>>>,
-    vector<__range_mapped_type<_Range>, __allocator_traits_rebind_t<_Allocator, __range_mapped_type<_Range>>>>;
+        __range_key_type<_Range>,
+        __range_mapped_type<_Range>,
+        less<__range_key_type<_Range>>,
+        vector<__range_key_type<_Range>, __allocator_traits_rebind_t<_Allocator, __range_key_type<_Range>>>,
+        vector<__range_mapped_type<_Range>, __allocator_traits_rebind_t<_Allocator, __range_mapped_type<_Range>>>>;
 
 template <class _Key, class _Tp, class _Compare = less<_Key>>
   requires(!__is_allocator<_Compare>::value)

``````````

</details>


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


More information about the libcxx-commits mailing list