[libcxx-commits] [libcxx] [libc++] Avoid including <format> code in <optional> (PR #179466)
via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Feb 3 06:03:40 PST 2026
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/__algorithm/equal.h libcxx/include/__format/format_context.h libcxx/include/__format/range_format.h libcxx/include/__fwd/format.h libcxx/include/optional --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/__format/format_context.h b/libcxx/include/__format/format_context.h
index 18eb13691..cf3131b80 100644
--- a/libcxx/include/__format/format_context.h
+++ b/libcxx/include/__format/format_context.h
@@ -67,8 +67,8 @@ using wformat_context = basic_format_context< back_insert_iterator<__format::__o
# endif
template <class _OutIt, class _CharT>
-class _LIBCPP_PREFERRED_NAME(format_context)
- _LIBCPP_IF_WIDE_CHARACTERS(_LIBCPP_PREFERRED_NAME(wformat_context)) basic_format_context {
+class _LIBCPP_PREFERRED_NAME(format_context) _LIBCPP_IF_WIDE_CHARACTERS(_LIBCPP_PREFERRED_NAME(wformat_context))
+ basic_format_context {
public:
using iterator = _OutIt;
using char_type = _CharT;
``````````
</details>
https://github.com/llvm/llvm-project/pull/179466
More information about the libcxx-commits
mailing list