[libcxx-commits] [libcxx] [libc++] Simplify the implementation of std::get for pairs (PR #114984)
via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Mar 27 07:00:42 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 8abca171c3346eb7c889354d9b2288ad2b7e1504 331ac8c12cd149175526aa9574507deda9318268 --extensions cpp,h -- libcxx/include/__utility/pair.h libcxx/test/std/utilities/utility/pairs/pair.astuple/pairs.by.type.pass.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/libcxx/test/std/utilities/utility/pairs/pair.astuple/pairs.by.type.pass.cpp b/libcxx/test/std/utilities/utility/pairs/pair.astuple/pairs.by.type.pass.cpp
index 588bb7a033..1e86b610f8 100644
--- a/libcxx/test/std/utilities/utility/pairs/pair.astuple/pairs.by.type.pass.cpp
+++ b/libcxx/test/std/utilities/utility/pairs/pair.astuple/pairs.by.type.pass.cpp
@@ -56,7 +56,7 @@ TEST_CONSTEXPR_CXX14 bool test() {
{
typedef std::complex<float> cf;
- auto t1 = std::make_pair<int, cf>(42, {1, 2});
+ auto t1 = std::make_pair<int, cf>(42, {1, 2});
assert(std::get<int>(t1) == 42);
assert(std::get<cf>(t1).real() == 1);
assert(std::get<cf>(t1).imag() == 2);
``````````
</details>
https://github.com/llvm/llvm-project/pull/114984
More information about the libcxx-commits
mailing list