Skip to content

Commit fc281e1

Browse files
[libc++][docs] Confirm that P3136R1 Retiring niebloids is Complete (#135932)
As libc++ has been implementing niebloids as CPOs since LLVM 14 due to https://reviews.llvm.org/D116570. Also changes some comments in test files to use the formal term "algorithm function object". Closes #118133.
1 parent 74c0422 commit fc281e1

File tree

3 files changed

+10
-7
lines changed

3 files changed

+10
-7
lines changed

libcxx/docs/Status/Cxx2cPapers.csv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676
"`P2422R1 <https://wg21.link/P2422R1>`__","Remove ``nodiscard`` annotations from the standard library specification","2024-06 (St. Louis)","|Complete|","19","``nodiscard`` attributes were kept as a conforming extension"
7777
"`P2300R10 <https://wg21.link/P2300R10>`__","``std::execution``","2024-06 (St. Louis)","","",""
7878
"","","","","",""
79-
"`P3136R1 <https://wg21.link/P3136R1>`__","Retiring niebloids","2024-11 (Wrocław)","","",""
79+
"`P3136R1 <https://wg21.link/P3136R1>`__","Retiring niebloids","2024-11 (Wrocław)","|Complete|","14",""
8080
"`P3138R5 <https://wg21.link/P3138R5>`__","``views::cache_latest``","2024-11 (Wrocław)","","",""
8181
"`P3379R0 <https://wg21.link/P3379R0>`__","Constrain ``std::expected`` equality operators","2024-11 (Wrocław)","","",""
8282
"`P2862R1 <https://wg21.link/P2862R1>`__","``text_encoding::name()`` should never return null values","2024-11 (Wrocław)","","",""

libcxx/test/std/algorithms/ranges_robust_against_omitting_invoke.pass.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ struct Bar {
3535
Bar create() const { return Bar(); }
3636
};
3737

38-
// Invokes both the (iterator, sentinel, ...) and the (range, ...) overloads of the given niebloid.
38+
// Invokes both the (iterator, sentinel, ...) and the (range, ...) overloads of the given algorithm function object.
3939

4040
// (in, ...)
4141
template <class Func, std::ranges::range Input, class... Args>

libcxx/test/std/library/description/conventions/customization.point.object/niebloid.compile.pass.cpp

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
// UNSUPPORTED: c++03, c++11, c++14, c++17
1010
// REQUIRES: stdlib=libc++
1111

12+
// [alg.func.obj]
1213
// [algorithms.requirements]/2
1314
// [range.iter.ops.general]/2
1415

@@ -24,12 +25,14 @@
2425

2526
#include "test_macros.h"
2627

27-
// Niebloids, unlike CPOs, are *not* required to be semiregular or even to have
28-
// a declared type at all; they are specified as "magic" overload sets whose
29-
// names are not found by argument-dependent lookup and which inhibit
30-
// argument-dependent lookup if they are found via a `using`-declaration.
28+
// Before P3136R1, niebloids were pedantically not CPOs, and they were *not* required to be semiregular or
29+
// even to have a declared type at all; they were specified as "magic" overload sets
30+
// whose names are not found by argument-dependent lookup and
31+
// which inhibit argument-dependent lookup if they are found via a `using`-declaration.
3132
//
32-
// libc++ implements them using the same function-object technique we use for CPOs;
33+
// As of P3136R1, niebloids (formally known as algorithm function objects) are required to be CPOs.
34+
//
35+
// libc++ implements niebloids in the same way as CPOs since LLVM 14;
3336
// therefore this file should stay in sync with ./cpo.compile.pass.cpp.
3437

3538
template <class CPO, class... Args>

0 commit comments

Comments
 (0)