[libcxx-commits] [libcxx] [libc++] Fix module builds for `<__algorithm/unwrap_range.h>` (PR #179887)
A. Jiang via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Feb 5 00:54:15 PST 2026
https://github.com/frederick-vs-ja created https://github.com/llvm/llvm-project/pull/179887
3a653afd45709432181952c0ffdb53eceb0939ae removed the inclusion of `<__utility/declval.h>` from `<__algorithm/unwrap_range.h>`. However, `unwrap_range.h` still needs to use `std::declval`. So we should restore the inclusion.
The building failure with Clang modules was already caught by CI.
>From 1f813a89e1112b2f76a1b024c0c802c00fbc091f Mon Sep 17 00:00:00 2001
From: "A. Jiang" <de34 at live.cn>
Date: Thu, 5 Feb 2026 16:52:48 +0800
Subject: [PATCH] [libc++] Fix module builds for `<__algorithm/unwrap_range.h>`
3a653afd45709432181952c0ffdb53eceb0939ae removed the inclusion of
`<__utility/declval.h>` from `<__algorithm/unwrap_range.h>`. However,
`unwrap_range.h` still needs to use `std::declval`. So we should restore
the inclusion.
The building failure with Clang modules was already caught by CI.
---
libcxx/include/__algorithm/unwrap_range.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/libcxx/include/__algorithm/unwrap_range.h b/libcxx/include/__algorithm/unwrap_range.h
index 14603a4026381..c46094f1e6861 100644
--- a/libcxx/include/__algorithm/unwrap_range.h
+++ b/libcxx/include/__algorithm/unwrap_range.h
@@ -13,6 +13,7 @@
#include <__config>
#include <__iterator/concepts.h>
#include <__type_traits/is_same.h>
+#include <__utility/declval.h>
#include <__utility/move.h>
#include <__utility/pair.h>
More information about the libcxx-commits
mailing list