Currently, there are no tests to confirm without a doubt the constructor of latch is really constexpr and explicit.
I think this would be an addition that it would not harm to have. In another revision, I was asked to add tests for an almost identical case which made me consider adding this test for the latch class too.
Details
Details
- Reviewers
philnik - Group Reviewers
Restricted Project - Commits
- rGdd2cfabddb6d: [libc++] add test for latch ctor
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
Thanks! LGTM with green CI and the static_assert fixed.
libcxx/test/std/thread/thread.latch/ctor.pass.cpp | ||
---|---|---|
25 | You're missing an argument here. just thoughts, not an action item for you |
Comment Actions
Thanks for having a look.
Since I don't have commit access, here are my details for when CI turns green.
Edoardo Sanguineti <edoardo.sanguineti222@gmail.com>
Comment Actions
Remove xfail flag which probably is the culprit making the test fail on two Mac runners
You're missing an argument here.
just thoughts, not an action item for you
Maybe we should add a new test trait is_explicit which is an error if there is no constructor which matches, true if it's not convertible and false if it is. That would catch these kinds of errors.