Details
Details
- Reviewers
ldionne - Group Reviewers
Restricted Project - Commits
- rG92ac3600630c: [libc++][charconv] Adds operator bool.
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Unit Tests
Unit Tests
Event Timeline
Comment Actions
LGTM w/ comments and CI!
libcxx/test/std/utilities/charconv/charconv.syn/from_chars_result.operator_bool.verify.cpp | ||
---|---|---|
20 | I would suggest instead doing static_assert(!std::is_convertible<std::from_chars_result, bool>::value); static_assert( std::is_constructible<bool, std::from_chars_result>::value); This way we are also testing that this is SFINAE-friendly, which tests explicit more tightly than if we check for the error. We also decouple from the error message and we're able to merge this test into the .pass.cpp test you added. |
I would suggest instead doing
This way we are also testing that this is SFINAE-friendly, which tests explicit more tightly than if we check for the error. We also decouple from the error message and we're able to merge this test into the .pass.cpp test you added.