Skip to content

Commit 0447d31

Browse files
SC llvm teamSC llvm team
authored andcommitted
Merged main:0e8208eca1c316b7302de7803ab0d85a1dd77076 into amd-gfx:4ce515f18a36
Local branch amd-gfx 4ce515f Merged main:69c43468d3f21df6232fda0530f03f18b0f40345 into amd-gfx:45ac84d24a03 Remote branch main 0e8208e [libc++] Run the Lit test suite against an installed version of the library (llvm#96910)
2 parents 4ce515f + 0e8208e commit 0447d31

File tree

135 files changed

+2173
-1062
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

135 files changed

+2173
-1062
lines changed

.github/workflows/libcxx-build-and-test.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ jobs:
208208
- uses: actions/checkout@v4
209209
- uses: maxim-lobanov/setup-xcode@v1
210210
with:
211-
xcode-version: 'latest-stable'
211+
xcode-version: 'latest'
212212
- uses: seanmiddleditch/gha-setup-ninja@master
213213
- name: Build and test
214214
run: |

clang/docs/UsersManual.rst

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -950,10 +950,13 @@ treated as a file name and is searched for sequentially in the directories:
950950
- system directory,
951951
- the directory where Clang executable resides.
952952

953-
Both user and system directories for configuration files are specified during
954-
clang build using CMake parameters, ``CLANG_CONFIG_FILE_USER_DIR`` and
955-
``CLANG_CONFIG_FILE_SYSTEM_DIR`` respectively. The first file found is used.
956-
It is an error if the required file cannot be found.
953+
Both user and system directories for configuration files can be specified
954+
either during build or during runtime. At build time, use
955+
``CLANG_CONFIG_FILE_USER_DIR`` and ``CLANG_CONFIG_FILE_SYSTEM_DIR``. At run
956+
time use the ``--config-user-dir=`` and ``--config-system-dir=`` command line
957+
options. Specifying config directories at runtime overrides the config
958+
directories set at build time The first file found is used. It is an error if
959+
the required file cannot be found.
957960

958961
The default configuration files are searched for in the same directories
959962
following the rules described in the next paragraphs. Loading default

clang/lib/AST/ByteCode/Interp.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2537,7 +2537,7 @@ inline bool ArrayDecay(InterpState &S, CodePtr OpPC) {
25372537
if (!CheckRange(S, OpPC, Ptr, CSK_ArrayToPointer))
25382538
return false;
25392539

2540-
if (Ptr.isRoot() || !Ptr.isUnknownSizeArray() || Ptr.isDummy()) {
2540+
if (Ptr.isRoot() || !Ptr.isUnknownSizeArray()) {
25412541
S.Stk.push<Pointer>(Ptr.atIndex(0));
25422542
return true;
25432543
}

clang/lib/Format/UnwrappedLineParser.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3992,6 +3992,9 @@ void UnwrappedLineParser::parseRecord(bool ParseAsExpr) {
39923992
auto IsNonMacroIdentifier = [](const FormatToken *Tok) {
39933993
return Tok->is(tok::identifier) && Tok->TokenText != Tok->TokenText.upper();
39943994
};
3995+
// JavaScript/TypeScript supports anonymous classes like:
3996+
// a = class extends foo { }
3997+
bool JSPastExtendsOrImplements = false;
39953998
// The actual identifier can be a nested name specifier, and in macros
39963999
// it is often token-pasted.
39974000
// An [[attribute]] can be before the identifier.
@@ -4002,6 +4005,7 @@ void UnwrappedLineParser::parseRecord(bool ParseAsExpr) {
40024005
FormatTok->isOneOf(tok::period, tok::comma))) {
40034006
if (Style.isJavaScript() &&
40044007
FormatTok->isOneOf(Keywords.kw_extends, Keywords.kw_implements)) {
4008+
JSPastExtendsOrImplements = true;
40054009
// JavaScript/TypeScript supports inline object types in
40064010
// extends/implements positions:
40074011
// class Foo implements {bar: number} { }
@@ -4027,8 +4031,8 @@ void UnwrappedLineParser::parseRecord(bool ParseAsExpr) {
40274031
case tok::coloncolon:
40284032
break;
40294033
default:
4030-
if (!ClassName && Previous->is(tok::identifier) &&
4031-
Previous->isNot(TT_AttributeMacro)) {
4034+
if (!JSPastExtendsOrImplements && !ClassName &&
4035+
Previous->is(tok::identifier) && Previous->isNot(TT_AttributeMacro)) {
40324036
ClassName = Previous;
40334037
}
40344038
}

clang/test/AST/ByteCode/arrays.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -436,6 +436,15 @@ namespace Incomplete {
436436
constexpr int C = *F.a; // both-error {{must be initialized by a constant expression}} \
437437
// both-note {{array-to-pointer decay of array member without known bound}}
438438

439+
struct X {
440+
int a;
441+
int b[];
442+
};
443+
extern X x;
444+
constexpr int *xb = x.b; // both-error {{must be initialized by a constant expression}} \
445+
// both-note {{array-to-pointer decay of array member without known bound}}
446+
447+
439448
/// These are from test/SemaCXX/constant-expression-cxx11.cpp
440449
extern int arr[];
441450
constexpr int *c = &arr[1]; // both-error {{must be initialized by a constant expression}} \

clang/unittests/Format/FormatTestJS.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -579,6 +579,14 @@ TEST_F(FormatTestJS, GoogScopes) {
579579
"});");
580580
}
581581

582+
TEST_F(FormatTestJS, GoogAnonymousClass) {
583+
verifyFormat("a = class extends goog.structs.a {\n"
584+
" a() {\n"
585+
" return 0;\n"
586+
" }\n"
587+
"};");
588+
}
589+
582590
TEST_F(FormatTestJS, IIFEs) {
583591
// Internal calling parens; no semi.
584592
verifyFormat("(function() {\n"

clang/unittests/Format/TokenAnnotatorTest.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3238,6 +3238,12 @@ TEST_F(TokenAnnotatorTest, BraceKind) {
32383238
EXPECT_BRACE_KIND(Tokens[8], BK_BracedInit);
32393239
EXPECT_BRACE_KIND(Tokens[11], BK_BracedInit);
32403240
EXPECT_BRACE_KIND(Tokens[13], BK_Block);
3241+
3242+
Tokens = annotate("a = class extends goog.a {};",
3243+
getGoogleStyle(FormatStyle::LK_JavaScript));
3244+
ASSERT_EQ(Tokens.size(), 11u) << Tokens;
3245+
EXPECT_TOKEN(Tokens[7], tok::l_brace, TT_ClassLBrace);
3246+
EXPECT_BRACE_KIND(Tokens[7], BK_Block);
32413247
}
32423248

32433249
TEST_F(TokenAnnotatorTest, UnderstandsElaboratedTypeSpecifier) {

libc/cmake/modules/prepare_libc_gpu_build.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ if(DEFINED LLVM_TARGETS_TO_BUILD AND LIBC_TARGET_ARCHITECTURE_IS_AMDGPU
5151
AND NOT "AMDGPU" IN_LIST LLVM_TARGETS_TO_BUILD)
5252
set(LIBC_GPU_TESTS_DISABLED TRUE)
5353
message(STATUS "AMDGPU backend is not available, tests will not be built")
54-
elseif(DEFINED LLVM_TARGETS_TO_BUILD AND LIBC_TARGET_ARCHITECTURE_IS_AMDGPU
54+
elseif(DEFINED LLVM_TARGETS_TO_BUILD AND LIBC_TARGET_ARCHITECTURE_IS_NVPTX
5555
AND NOT "NVPTX" IN_LIST LLVM_TARGETS_TO_BUILD)
5656
set(LIBC_GPU_TESTS_DISABLED TRUE)
5757
message(STATUS "NVPTX backend is not available, tests will not be built")

libc/config/gpu/entrypoints.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,9 @@ set(TARGET_LIBC_ENTRYPOINTS
207207
libc.src.stdio.asprintf
208208
libc.src.stdio.vasprintf
209209
libc.src.stdio.scanf
210+
libc.src.stdio.vscanf
210211
libc.src.stdio.fscanf
212+
libc.src.stdio.vfscanf
211213
libc.src.stdio.sscanf
212214
libc.src.stdio.vsscanf
213215
libc.src.stdio.feof

libc/test/src/stdio/CMakeLists.txt

Lines changed: 30 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -272,33 +272,37 @@ if(LLVM_LIBC_FULL_BUILD)
272272
)
273273
endif()
274274

275-
add_libc_test(
276-
fscanf_test
277-
SUITE
278-
libc_stdio_unittests
279-
SRCS
280-
fscanf_test.cpp
281-
DEPENDS
282-
libc.src.stdio.fscanf
283-
${fscanf_test_deps}
284-
libc.src.__support.CPP.string_view
285-
COMPILE_OPTIONS
286-
${use_system_file}
287-
)
275+
# FIXME: These tests currently fail on AMDGPU due to an optimization bug in the
276+
# `amdgpu-attributor` pass. Disable until that's fixed.
277+
if(NOT LIBC_TARGET_ARCHITECTURE_IS_AMDGPU)
278+
add_libc_test(
279+
fscanf_test
280+
SUITE
281+
libc_stdio_unittests
282+
SRCS
283+
fscanf_test.cpp
284+
DEPENDS
285+
libc.src.stdio.fscanf
286+
${fscanf_test_deps}
287+
libc.src.__support.CPP.string_view
288+
COMPILE_OPTIONS
289+
${use_system_file}
290+
)
288291

289-
add_libc_test(
290-
vfscanf_test
291-
SUITE
292-
libc_stdio_unittests
293-
SRCS
294-
vfscanf_test.cpp
295-
DEPENDS
296-
libc.src.stdio.vfscanf
297-
${fscanf_test_deps}
298-
libc.src.__support.CPP.string_view
299-
COMPILE_OPTIONS
300-
${use_system_file}
301-
)
292+
add_libc_test(
293+
vfscanf_test
294+
SUITE
295+
libc_stdio_unittests
296+
SRCS
297+
vfscanf_test.cpp
298+
DEPENDS
299+
libc.src.stdio.vfscanf
300+
${fscanf_test_deps}
301+
libc.src.__support.CPP.string_view
302+
COMPILE_OPTIONS
303+
${use_system_file}
304+
)
305+
endif()
302306

303307
if(LIBC_CONF_SCANF_DISABLE_FLOAT)
304308
list(APPEND sscanf_test_copts "-DLIBC_COPT_SCANF_DISABLE_FLOAT")

libcxx/CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,11 @@ option(LIBCXX_ENABLE_VENDOR_AVAILABILITY_ANNOTATIONS
131131
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
132132
set(LIBCXX_DEFAULT_TEST_CONFIG "llvm-libc++-shared-gcc.cfg.in")
133133
elseif(MINGW)
134-
set(LIBCXX_DEFAULT_TEST_CONFIG "llvm-libc++-mingw.cfg.in")
134+
if (LIBCXX_ENABLE_SHARED)
135+
set(LIBCXX_DEFAULT_TEST_CONFIG "llvm-libc++-shared-mingw.cfg.in")
136+
else()
137+
set(LIBCXX_DEFAULT_TEST_CONFIG "llvm-libc++-static-mingw.cfg.in")
138+
endif()
135139
elseif(WIN32) # clang-cl
136140
if (LIBCXX_ENABLE_SHARED)
137141
set(LIBCXX_DEFAULT_TEST_CONFIG "llvm-libc++-shared-clangcl.cfg.in")

libcxx/cmake/caches/Apple.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
set(CMAKE_BUILD_TYPE MinSizeRel CACHE STRING "")
2+
set(CMAKE_INSTALL_NAME_DIR "/usr/lib" CACHE STRING "")
23
set(CMAKE_POSITION_INDEPENDENT_CODE OFF CACHE BOOL "")
34

45
set(LIBCXX_USE_COMPILER_RT ON CACHE BOOL "")

libcxx/docs/FeatureTestMacroTable.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ Status
266266
---------------------------------------------------------- -----------------
267267
``__cpp_lib_polymorphic_allocator`` ``201902L``
268268
---------------------------------------------------------- -----------------
269-
``__cpp_lib_ranges`` ``202207L``
269+
``__cpp_lib_ranges`` ``202110L``
270270
---------------------------------------------------------- -----------------
271271
``__cpp_lib_remove_cvref`` ``201711L``
272272
---------------------------------------------------------- -----------------
@@ -350,6 +350,8 @@ Status
350350
---------------------------------------------------------- -----------------
351351
``__cpp_lib_print`` ``202207L``
352352
---------------------------------------------------------- -----------------
353+
``__cpp_lib_ranges`` ``202406L``
354+
---------------------------------------------------------- -----------------
353355
``__cpp_lib_ranges_as_const`` *unimplemented*
354356
---------------------------------------------------------- -----------------
355357
``__cpp_lib_ranges_as_rvalue`` ``202207L``

libcxx/docs/ReleaseNotes/20.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ What's New in Libc++ 20.0.0?
3838
Implemented Papers
3939
------------------
4040

41+
- P2609R3: Relaxing Ranges Just A Smidge (`Github <https://github.com/llvm/llvm-project/issues/105253>`__)
4142
- P2985R0: A type trait for detecting virtual base classes (`Github <https://github.com/llvm/llvm-project/issues/105432>`__)
4243

4344

libcxx/docs/Status/Cxx23.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ Paper Status
4444
.. [#note-P2520R0] P2520R0: Libc++ implemented this paper as a DR in C++20 as well.
4545
.. [#note-P2711R1] P2711R1: ``join_with_view`` hasn't been done yet since this type isn't implemented yet.
4646
.. [#note-P2770R0] P2770R0: ``join_with_view`` hasn't been done yet since this type isn't implemented yet.
47+
.. [#note-P2609R3] P2609R3: Libc++ implemented this paper as a DR in C++20 as well. (MSVC STL does the same.)
4748
.. [#note-LWG3494] LWG3494: That LWG issue was superseded by `P2017R1 <https://wg21.link/P2017R1>`__.
4849
.. [#note-LWG3481] LWG3481: That LWG issue was superseded by `P2415R2 <https://wg21.link/P2415R2>`__.
4950
.. [#note-LWG3265] LWG3265: That LWG issue was resolved by `LWG3435 <https://wg21.link/LWG3435>`__.

libcxx/docs/Status/Cxx23Papers.csv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@
107107
"`P2770R0 <https://wg21.link/P2770R0>`__","Stashing stashing ``iterators`` for proper flattening","2023-02 (Issaquah)","|Partial| [#note-P2770R0]_","","|ranges|"
108108
"`P2164R9 <https://wg21.link/P2164R9>`__","``views::enumerate``","2023-02 (Issaquah)","","","|ranges|"
109109
"`P2711R1 <https://wg21.link/P2711R1>`__","Making multi-param constructors of ``views`` ``explicit``","2023-02 (Issaquah)","|In Progress| [#note-P2711R1]_","","|ranges|"
110-
"`P2609R3 <https://wg21.link/P2609R3>`__","Relaxing Ranges Just A Smidge","2023-02 (Issaquah)","","","|ranges|"
110+
"`P2609R3 <https://wg21.link/P2609R3>`__","Relaxing Ranges Just A Smidge","2023-02 (Issaquah)","|Complete| [#note-P2609R3]_","20.0","|ranges|"
111111
"`P2713R1 <https://wg21.link/P2713R1>`__","Escaping improvements in ``std::format``","2023-02 (Issaquah)","|Complete|","19.0","|format|"
112112
"`P2675R1 <https://wg21.link/P2675R1>`__","``format``'s width estimation is too approximate and not forward compatible","2023-02 (Issaquah)","|Complete|","17.0","|format|"
113113
"`P2572R1 <https://wg21.link/P2572R1>`__","``std::format`` fill character allowances","2023-02 (Issaquah)","|Complete|","17.0","|format|"

libcxx/include/__iterator/concepts.h

Lines changed: 43 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
#include <__type_traits/add_pointer.h>
3636
#include <__type_traits/common_reference.h>
3737
#include <__type_traits/is_pointer.h>
38+
#include <__type_traits/is_primary_template.h>
3839
#include <__type_traits/is_reference.h>
3940
#include <__type_traits/remove_cv.h>
4041
#include <__type_traits/remove_cvref.h>
@@ -64,8 +65,33 @@ concept __indirectly_readable_impl =
6465
template <class _In>
6566
concept indirectly_readable = __indirectly_readable_impl<remove_cvref_t<_In>>;
6667

68+
template <class _Tp>
69+
using __projected_iterator_t = typename _Tp::__projected_iterator;
70+
71+
template <class _Tp>
72+
using __projected_projection_t = typename _Tp::__projected_projection;
73+
74+
template <class _Tp>
75+
concept __specialization_of_projected = requires {
76+
typename __projected_iterator_t<_Tp>;
77+
typename __projected_projection_t<_Tp>;
78+
} && __is_primary_template<_Tp>::value;
79+
80+
template <class _Tp>
81+
struct __indirect_value_t_impl {
82+
using type = iter_value_t<_Tp>&;
83+
};
84+
template <__specialization_of_projected _Tp>
85+
struct __indirect_value_t_impl<_Tp> {
86+
using type = invoke_result_t<__projected_projection_t<_Tp>&,
87+
typename __indirect_value_t_impl<__projected_iterator_t<_Tp>>::type>;
88+
};
89+
90+
template <indirectly_readable _Tp>
91+
using __indirect_value_t = typename __indirect_value_t_impl<_Tp>::type;
92+
6793
template <indirectly_readable _Tp>
68-
using iter_common_reference_t = common_reference_t<iter_reference_t<_Tp>, iter_value_t<_Tp>&>;
94+
using iter_common_reference_t = common_reference_t<iter_reference_t<_Tp>, __indirect_value_t<_Tp>>;
6995

7096
// [iterator.concept.writable]
7197
template <class _Out, class _Tp>
@@ -176,43 +202,45 @@ concept __has_arrow = input_iterator<_Ip> && (is_pointer_v<_Ip> || requires(_Ip
176202
// [indirectcallable.indirectinvocable]
177203
template <class _Fp, class _It>
178204
concept indirectly_unary_invocable =
179-
indirectly_readable<_It> && copy_constructible<_Fp> && invocable<_Fp&, iter_value_t<_It>&> &&
205+
indirectly_readable<_It> && copy_constructible<_Fp> && invocable<_Fp&, __indirect_value_t<_It>> &&
180206
invocable<_Fp&, iter_reference_t<_It>> &&
181-
common_reference_with< invoke_result_t<_Fp&, iter_value_t<_It>&>, invoke_result_t<_Fp&, iter_reference_t<_It>>>;
207+
common_reference_with< invoke_result_t<_Fp&, __indirect_value_t<_It>>,
208+
invoke_result_t<_Fp&, iter_reference_t<_It>>>;
182209

183210
template <class _Fp, class _It>
184211
concept indirectly_regular_unary_invocable =
185-
indirectly_readable<_It> && copy_constructible<_Fp> && regular_invocable<_Fp&, iter_value_t<_It>&> &&
212+
indirectly_readable<_It> && copy_constructible<_Fp> && regular_invocable<_Fp&, __indirect_value_t<_It>> &&
186213
regular_invocable<_Fp&, iter_reference_t<_It>> &&
187-
common_reference_with< invoke_result_t<_Fp&, iter_value_t<_It>&>, invoke_result_t<_Fp&, iter_reference_t<_It>>>;
214+
common_reference_with< invoke_result_t<_Fp&, __indirect_value_t<_It>>,
215+
invoke_result_t<_Fp&, iter_reference_t<_It>>>;
188216

189217
template <class _Fp, class _It>
190218
concept indirect_unary_predicate =
191-
indirectly_readable<_It> && copy_constructible<_Fp> && predicate<_Fp&, iter_value_t<_It>&> &&
219+
indirectly_readable<_It> && copy_constructible<_Fp> && predicate<_Fp&, __indirect_value_t<_It>> &&
192220
predicate<_Fp&, iter_reference_t<_It>>;
193221

194222
template <class _Fp, class _It1, class _It2>
195223
concept indirect_binary_predicate =
196224
indirectly_readable<_It1> && indirectly_readable<_It2> && copy_constructible<_Fp> &&
197-
predicate<_Fp&, iter_value_t<_It1>&, iter_value_t<_It2>&> &&
198-
predicate<_Fp&, iter_value_t<_It1>&, iter_reference_t<_It2>> &&
199-
predicate<_Fp&, iter_reference_t<_It1>, iter_value_t<_It2>&> &&
225+
predicate<_Fp&, __indirect_value_t<_It1>, __indirect_value_t<_It2>> &&
226+
predicate<_Fp&, __indirect_value_t<_It1>, iter_reference_t<_It2>> &&
227+
predicate<_Fp&, iter_reference_t<_It1>, __indirect_value_t<_It2>> &&
200228
predicate<_Fp&, iter_reference_t<_It1>, iter_reference_t<_It2>>;
201229

202230
template <class _Fp, class _It1, class _It2 = _It1>
203231
concept indirect_equivalence_relation =
204232
indirectly_readable<_It1> && indirectly_readable<_It2> && copy_constructible<_Fp> &&
205-
equivalence_relation<_Fp&, iter_value_t<_It1>&, iter_value_t<_It2>&> &&
206-
equivalence_relation<_Fp&, iter_value_t<_It1>&, iter_reference_t<_It2>> &&
207-
equivalence_relation<_Fp&, iter_reference_t<_It1>, iter_value_t<_It2>&> &&
233+
equivalence_relation<_Fp&, __indirect_value_t<_It1>, __indirect_value_t<_It2>> &&
234+
equivalence_relation<_Fp&, __indirect_value_t<_It1>, iter_reference_t<_It2>> &&
235+
equivalence_relation<_Fp&, iter_reference_t<_It1>, __indirect_value_t<_It2>> &&
208236
equivalence_relation<_Fp&, iter_reference_t<_It1>, iter_reference_t<_It2>>;
209237

210238
template <class _Fp, class _It1, class _It2 = _It1>
211239
concept indirect_strict_weak_order =
212240
indirectly_readable<_It1> && indirectly_readable<_It2> && copy_constructible<_Fp> &&
213-
strict_weak_order<_Fp&, iter_value_t<_It1>&, iter_value_t<_It2>&> &&
214-
strict_weak_order<_Fp&, iter_value_t<_It1>&, iter_reference_t<_It2>> &&
215-
strict_weak_order<_Fp&, iter_reference_t<_It1>, iter_value_t<_It2>&> &&
241+
strict_weak_order<_Fp&, __indirect_value_t<_It1>, __indirect_value_t<_It2>> &&
242+
strict_weak_order<_Fp&, __indirect_value_t<_It1>, iter_reference_t<_It2>> &&
243+
strict_weak_order<_Fp&, iter_reference_t<_It1>, __indirect_value_t<_It2>> &&
216244
strict_weak_order<_Fp&, iter_reference_t<_It1>, iter_reference_t<_It2>>;
217245

218246
template <class _Fp, class... _Its>

libcxx/include/__iterator/projected.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ _LIBCPP_BEGIN_NAMESPACE_STD
2626
template <class _It, class _Proj>
2727
struct __projected_impl {
2828
struct __type {
29+
using __primary_template = __type;
30+
using __projected_iterator = _It;
31+
using __projected_projection = _Proj;
32+
2933
using value_type = remove_cvref_t<indirect_result_t<_Proj&, _It>>;
3034
indirect_result_t<_Proj&, _It> operator*() const; // not defined
3135
};
@@ -34,6 +38,10 @@ struct __projected_impl {
3438
template <weakly_incrementable _It, class _Proj>
3539
struct __projected_impl<_It, _Proj> {
3640
struct __type {
41+
using __primary_template = __type;
42+
using __projected_iterator = _It;
43+
using __projected_projection = _Proj;
44+
3745
using value_type = remove_cvref_t<indirect_result_t<_Proj&, _It>>;
3846
using difference_type = iter_difference_t<_It>;
3947
indirect_result_t<_Proj&, _It> operator*() const; // not defined

0 commit comments

Comments
 (0)