[libcxx-commits] [libcxx] [libc++][NFC] Avoid empty namespace in `<__concepts/common_with.h>` (PR #221407)

A. Jiang via libcxx-commits libcxx-commits at lists.llvm.org
Fri Sep 4 23:45:00 PDT 2026


https://github.com/frederick-vs-ja created https://github.com/llvm/llvm-project/pull/221407

...in pre-C++20 modes. This fixes complaining from clang-tidy checks in CI.

>From 2f9ef9039953d6a8e948922ede60eb8e827c38de Mon Sep 17 00:00:00 2001
From: "A. Jiang" <de34 at live.cn>
Date: Sat, 5 Sep 2026 14:37:10 +0800
Subject: [PATCH] [libc++][NFC] Avoid empty namespace in
 `<__concepts/common_with.h>`

... in pre-C++20 modes. This fixes complaining from clang-tidy checks in
CI.
---
 libcxx/include/__concepts/common_with.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/libcxx/include/__concepts/common_with.h b/libcxx/include/__concepts/common_with.h
index 09082b2295def..e2f5b46822d63 100644
--- a/libcxx/include/__concepts/common_with.h
+++ b/libcxx/include/__concepts/common_with.h
@@ -21,10 +21,10 @@
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
-
 #if _LIBCPP_STD_VER >= 20
 
+_LIBCPP_BEGIN_NAMESPACE_STD
+
 // [concept.common]
 
 // clang-format off
@@ -45,8 +45,8 @@ concept common_with =
             add_lvalue_reference_t<const _Up>>>;
 // clang-format on
 
-#endif // _LIBCPP_STD_VER >= 20
-
 _LIBCPP_END_NAMESPACE_STD
 
+#endif // _LIBCPP_STD_VER >= 20
+
 #endif // _LIBCPP___CONCEPTS_COMMON_WITH_H



More information about the libcxx-commits mailing list