Details
- Reviewers
ldionne - Group Reviewers
Restricted Project - Commits
- rGebc05b93a11b: [libc++][PSTL] Implement <execution> contents
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
libcxx/test/libcxx/utilities/expol/policies.compile.pass.cpp | ||
---|---|---|
9 | Please add a synopsis for what you're testing here. | |
libcxx/test/std/utilities/expol/is_execution_policy.compile.pass.cpp | ||
9 | Same, synopsis. It allows us to know precisely what is being tested in a test. In this case it's not too hard to guess, but often there are multiple function overloads or different behaviors in different standard versions, so it's useful to keep that synopsis. |
LGTM modulo comments.
libcxx/include/execution | ||
---|---|---|
1 | You'll hate me but we need a synopsis! | |
59 | Are those inline? | |
libcxx/include/pstl/internal/glue_execution_defs.h | ||
1 ↗ | (On Diff #516975) | I think libcxx/include/pstl/internal/execution_defs.h should go as well, right? Edit: It's too early for that, more cleanup is needed. |
libcxx/test/libcxx/utilities/expol/policies.compile.pass.cpp | ||
9 | Let's add a comment explaining what you're testing here. It seems to be that it's QOI whether the policies can be copied or not, and you decided that they should only be passed by reference. I think it's fine to be strict since the standard allows us to be. | |
libcxx/test/std/utilities/expol/policies.compile.pass.cpp | ||
15–18 | ||
32–39 | Instead, let's make it a .pass.cpp test and do something like: __noinline__ void use(auto&) { } int main(int, char**) { auto& x = std::execution::unseq; use(std::execution::unseq); ASSERT_SAME_TYPE(x, ...); return 0; } This should link and run. Also, we should test this inside constexpr and outside constexpr. The benefit over what you're doing right now is that if we implemented these global objects e.g. externally in the dylib and forgot to define them, your current test would work just fine. Ideally this test would catch that problem. |
You'll hate me but we need a synopsis!