[libcxx-commits] [libcxx] [libc++][NFC] Fix include guards in __concepts/ (PR #229398)
Lorcan Purcell via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Oct 6 05:34:57 PDT 2026
https://github.com/Lorcan7274 created https://github.com/llvm/llvm-project/pull/229398
Rename the include guards in `__concepts/primary_template.h` and `__concepts/referenceable.h` to match their file paths, like the other headers in `__concepts/`.
Both headers were moved from `__type_traits/` (in #197646 and #199821 respectively) but kept their old guards, `_LIBCPP___TYPE_TRAITS_IS_PRIMARY_TEMPLATE_H` and `_LIBCPP___TYPE_TRAITS_IS_REFERENCEABLE_H`.
Fixes #229284
>From 41f29d327f84b09ebb9b302c4bf3fd20437875c1 Mon Sep 17 00:00:00 2001
From: Lorcan Purcell <1w3r5yviper2077 at gmail.com>
Date: Tue, 6 Oct 2026 11:50:55 +0000
Subject: [PATCH] [libc++][NFC] Fix include guards in __concepts/
__concepts/primary_template.h was moved from
__type_traits/is_primary_template.h in 597e4ac7fbdd (#197646) and
__concepts/referenceable.h from __type_traits/is_referenceable.h in
0d6aac78ad96 (#199821). Both kept the include guards of the headers they
were moved from. Rename them to match their current paths, as every other
header in __concepts/ does.
Fixes #229284
---
libcxx/include/__concepts/primary_template.h | 6 +++---
libcxx/include/__concepts/referenceable.h | 6 +++---
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/libcxx/include/__concepts/primary_template.h b/libcxx/include/__concepts/primary_template.h
index ab22b6dc74eed73..8db7743de9bac49 100644
--- a/libcxx/include/__concepts/primary_template.h
+++ b/libcxx/include/__concepts/primary_template.h
@@ -6,8 +6,8 @@
//
//===----------------------------------------------------------------------===//
-#ifndef _LIBCPP___TYPE_TRAITS_IS_PRIMARY_TEMPLATE_H
-#define _LIBCPP___TYPE_TRAITS_IS_PRIMARY_TEMPLATE_H
+#ifndef _LIBCPP___CONCEPTS_PRIMARY_TEMPLATE_H
+#define _LIBCPP___CONCEPTS_PRIMARY_TEMPLATE_H
#include <__config>
#include <__type_traits/is_same.h>
@@ -30,4 +30,4 @@ _LIBCPP_END_NAMESPACE_STD
#endif // _LIBCPP_STD_VER >= 20
-#endif // _LIBCPP___TYPE_TRAITS_IS_PRIMARY_TEMPLATE_H
+#endif // _LIBCPP___CONCEPTS_PRIMARY_TEMPLATE_H
diff --git a/libcxx/include/__concepts/referenceable.h b/libcxx/include/__concepts/referenceable.h
index 471d1157a9b8712..ae7977a7382f896 100644
--- a/libcxx/include/__concepts/referenceable.h
+++ b/libcxx/include/__concepts/referenceable.h
@@ -6,8 +6,8 @@
//
//===----------------------------------------------------------------------===//
-#ifndef _LIBCPP___TYPE_TRAITS_IS_REFERENCEABLE_H
-#define _LIBCPP___TYPE_TRAITS_IS_REFERENCEABLE_H
+#ifndef _LIBCPP___CONCEPTS_REFERENCEABLE_H
+#define _LIBCPP___CONCEPTS_REFERENCEABLE_H
#include <__config>
#include <__type_traits/void_t.h>
@@ -27,4 +27,4 @@ _LIBCPP_END_NAMESPACE_STD
#endif
-#endif // _LIBCPP___TYPE_TRAITS_IS_REFERENCEABLE_H
+#endif // _LIBCPP___CONCEPTS_REFERENCEABLE_H
More information about the libcxx-commits
mailing list