From 2265429780d3b4b64a22ecf667b1b81290abfdac Mon Sep 17 00:00:00 2001 From: Mark de Wever Date: Thu, 25 Apr 2024 17:56:37 +0200 Subject: [PATCH] [libc++][ranges] Exports operator|. This was omitted in c1086532d4d5 and not detected by the CI since clang-tidy is not running. This fixes the exports. Fixes: https://github.com/llvm/llvm-project/issues/89898 --- libcxx/modules/std/ranges.inc | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/libcxx/modules/std/ranges.inc b/libcxx/modules/std/ranges.inc index 7d215867a4317..80f31c79a1a40 100644 --- a/libcxx/modules/std/ranges.inc +++ b/libcxx/modules/std/ranges.inc @@ -141,6 +141,17 @@ export namespace std { #if _LIBCPP_STD_VER >= 23 // [range.adaptor.object], range adaptor objects using std::ranges::range_adaptor_closure; + // Note: This declaration not in the synopsis or explicitly in the wording. + // However it is needed for the range adaptors. + // [range.adaptor.object]/3 + // The template parameter D for range_adaptor_closure may be an + // incomplete type. If an expression of type cv D is used as an operand + // to the | operator, D shall be complete and model + // derived_from>. The behavior of an expression + // involving an object of type cv D as an operand to the | operator is + // undefined if overload resolution selects a program-defined operator| + // function. + using std::ranges::operator|; #endif // [range.all], all view