-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RangeEquals doesn't support literal std::initializer_list #2915
Labels
Comments
Sure, why not. |
stefanhaller
pushed a commit
to stefanhaller/Catch2
that referenced
this issue
Oct 12, 2024
…r_list This allows writing something like const auto v = calculateSomeVectorOfInts(); CHECK_THAT(v, RangeEquals({1, 2, 3})); Fixes catchorg#2915.
stefanhaller
pushed a commit
to stefanhaller/Catch2
that referenced
this issue
Oct 12, 2024
…r_list This allows writing something like const auto v = calculateSomeVectorOfInts(); CHECK_THAT(v, RangeEquals({1, 2, 3})); Fixes catchorg#2915.
stk-ableton
pushed a commit
to stk-ableton/Catch2
that referenced
this issue
Oct 12, 2024
…r_list This allows writing something like const auto v = calculateSomeVectorOfInts(); CHECK_THAT(v, RangeEquals({1, 2, 3})); Fixes catchorg#2915.
See #2919. |
stk-ableton
pushed a commit
to stk-ableton/Catch2
that referenced
this issue
Oct 13, 2024
…r_list This allows writing something like const auto v = calculateSomeVectorOfInts(); CHECK_THAT(v, RangeEquals({1, 2, 3})); Fixes catchorg#2915.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It would often be useful to write something like this:
This doesn't compile. It can be made to compile by adding an overload to RangeEquals that takes a std::initializer_list. Would a PR adding such an overload have a chance of being accepted?
It's not a huge issue since there are workarounds, including any of these:
Still, the convenience of writing the initializer_list inline without extra qualification would be nice.
The text was updated successfully, but these errors were encountered: