[libcxx-commits] [libcxx] [libc++] Fix ambiguous calls to std::min in basic_string (PR #132402)
via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Mar 21 07:28:18 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 281028e37ca6c97c62ba68cd43eda2ff95bc70c4 9d24186144b13d27aa656dc76b23050bb8e6ee58 --extensions cpp, -- libcxx/test/std/strings/basic.string/min_call_varying_size_types.pass.cpp libcxx/include/string
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/libcxx/include/string b/libcxx/include/string
index cd00ac9505..0885362ca7 100644
--- a/libcxx/include/string
+++ b/libcxx/include/string
@@ -1006,7 +1006,7 @@ public:
// Turning off ASan instrumentation for variable initialization with _LIBCPP_STRING_INTERNAL_MEMORY_ACCESS
// does not work consistently during initialization of __r_, so we instead unpoison __str's memory manually first.
// __str's memory needs to be unpoisoned only in the case where it's a short string.
- : __rep_([](basic_string& __s) -> decltype(__s.__rep_) && {
+ : __rep_([](basic_string& __s) -> decltype(__s.__rep_)&& {
if (!__s.__is_long())
__s.__annotate_delete();
return std::move(__s.__rep_);
``````````
</details>
https://github.com/llvm/llvm-project/pull/132402
More information about the libcxx-commits
mailing list