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

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


llvmorg-github-actions[bot] wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-libcxx

Author: A. Jiang (frederick-vs-ja)

<details>
<summary>Changes</summary>

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

---
Full diff: https://github.com/llvm/llvm-project/pull/221407.diff


1 Files Affected:

- (modified) libcxx/include/__concepts/common_with.h (+4-4) 


``````````diff
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

``````````

</details>


https://github.com/llvm/llvm-project/pull/221407


More information about the libcxx-commits mailing list