[libcxx-commits] [libcxx] [libc++] Make __is_std_ templates variable templates (PR #150590)
via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Dec 11 03:14:02 PST 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 origin/main HEAD --extensions ,h -- libcxx/include/__expected/expected.h libcxx/include/__expected/unexpected.h libcxx/include/optional libcxx/include/span --diff_from_common_commit
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/libcxx/include/__expected/expected.h b/libcxx/include/__expected/expected.h
index 12f097780..d366245b8 100644
--- a/libcxx/include/__expected/expected.h
+++ b/libcxx/include/__expected/expected.h
@@ -1824,8 +1824,8 @@ public:
template <class _Func>
_LIBCPP_HIDE_FROM_ABI constexpr auto transform_error(_Func&& __f) & {
using _Gp = remove_cv_t<invoke_result_t<_Func, _Err&>>;
- static_assert(__valid_std_unexpected<_Gp>,
- "The result of f(error()) must be a valid template argument for unexpected");
+ static_assert(
+ __valid_std_unexpected<_Gp>, "The result of f(error()) must be a valid template argument for unexpected");
if (has_value()) {
return expected<_Tp, _Gp>();
}
@@ -1835,8 +1835,8 @@ public:
template <class _Func>
_LIBCPP_HIDE_FROM_ABI constexpr auto transform_error(_Func&& __f) const& {
using _Gp = remove_cv_t<invoke_result_t<_Func, const _Err&>>;
- static_assert(__valid_std_unexpected<_Gp>,
- "The result of f(error()) must be a valid template argument for unexpected");
+ static_assert(
+ __valid_std_unexpected<_Gp>, "The result of f(error()) must be a valid template argument for unexpected");
if (has_value()) {
return expected<_Tp, _Gp>();
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/150590
More information about the libcxx-commits
mailing list