[libc-commits] [libc] [libc] Include correct headers in type_traits (PR #197691)
Aiden Grossman via libc-commits
libc-commits at lists.llvm.org
Thu May 14 07:13:54 PDT 2026
https://github.com/boomanaiden154 created https://github.com/llvm/llvm-project/pull/197691
Otherwise we end up with errors like the following when building with bazel:
```c++
In file included from external/+_repo_rules+llvm-project/libc/src/__support/CPP/type_traits/is_move_constructible.h:12:
external/+_repo_rules+llvm-project/libc/src/__support/CPP/type_traits/is_constructible.h:32:14: error: no template named 'bool_constant'
32 | : public bool_constant<__is_constructible(T, Args...)> {};
```
>From f43edd9815511328968ea21d88a8b82ad38cb828 Mon Sep 17 00:00:00 2001
From: Aiden Grossman <aidengrossman at google.com>
Date: Thu, 14 May 2026 14:12:44 +0000
Subject: [PATCH] [libc] Include correct headers in type_traits
Otherwise we end up with errors like the following when building with
bazel:
```c++
In file included from external/+_repo_rules+llvm-project/libc/src/__support/CPP/type_traits/is_move_constructible.h:12:
external/+_repo_rules+llvm-project/libc/src/__support/CPP/type_traits/is_constructible.h:32:14: error: no template named 'bool_constant'
32 | : public bool_constant<__is_constructible(T, Args...)> {};
```
---
libc/src/__support/CPP/type_traits/is_assignable.h | 2 +-
libc/src/__support/CPP/type_traits/is_constructible.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/libc/src/__support/CPP/type_traits/is_assignable.h b/libc/src/__support/CPP/type_traits/is_assignable.h
index 0be3aa500590d..5978d358798c3 100644
--- a/libc/src/__support/CPP/type_traits/is_assignable.h
+++ b/libc/src/__support/CPP/type_traits/is_assignable.h
@@ -15,7 +15,7 @@
#ifndef LLVM_LIBC_SRC___SUPPORT_CPP_TYPE_TRAITS_IS_ASSIGNABLE_H
#define LLVM_LIBC_SRC___SUPPORT_CPP_TYPE_TRAITS_IS_ASSIGNABLE_H
-#include "src/__support/CPP/type_traits/integral_constant.h"
+#include "src/__support/CPP/type_traits/bool_constant.h"
#include "src/__support/CPP/utility/declval.h"
#include "src/__support/macros/attributes.h"
#include "src/__support/macros/config.h"
diff --git a/libc/src/__support/CPP/type_traits/is_constructible.h b/libc/src/__support/CPP/type_traits/is_constructible.h
index 316ba1acba33e..c3ab8afb5ca30 100644
--- a/libc/src/__support/CPP/type_traits/is_constructible.h
+++ b/libc/src/__support/CPP/type_traits/is_constructible.h
@@ -15,7 +15,7 @@
#ifndef LLVM_LIBC_SRC___SUPPORT_CPP_TYPE_TRAITS_IS_CONSTRUCTIBLE_H
#define LLVM_LIBC_SRC___SUPPORT_CPP_TYPE_TRAITS_IS_CONSTRUCTIBLE_H
-#include "src/__support/CPP/type_traits/integral_constant.h"
+#include "src/__support/CPP/type_traits/bool_constant.h"
#include "src/__support/CPP/utility/declval.h"
#include "src/__support/macros/attributes.h"
#include "src/__support/macros/config.h"
More information about the libc-commits
mailing list