-
-
Notifications
You must be signed in to change notification settings - Fork 641
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
REQUIRE does not compile when operator== in different namespace #443 . #468
Conversation
Expression_lhs.op member method is not instantiated when it is missing a member operator and the user defined conversion is able to apply the global operator.
This solution adds SFINAE on the common instantiation path for all asserts and that would slow compile times - I'll leave this PR open for now and decide a bit later what to do with it. I also wonder if |
…faster in doctest_fwd.h .
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also wonder if declval can be implemented using only C++ without including - perhaps something like what's posted here. Not including any headers would be really great.
I removed utility and used the faster version of declval as per the link. Please pull the changes.
I removed utility and used the faster version of declval as per the link. Please pull the changes. |
Merge branch 'dev' of https://github.com/onqtam/doctest into dev
…forwarding references #399 . This is fixed by using rvalues as function argument and using forward for the right type of reference. Now both gcc and doctest either fails or either compiles but not like one compiles and the other fails
sorry for the delay - will look at this again soon. |
Thanks for this - I'll merge it as it is and fix 1 tiny thing later on (doctest already has |
… doctest - this is a fixup after merging #468
#468) * REQUIRE does not compile when operator== in different namespace #443 . Expression_lhs.op member method is not instantiated when it is missing a member operator and the user defined conversion is able to apply the global operator. * Removing utility and using an overloaded version of declval which is faster in doctest_fwd.h . * Using templated operator== inside TEST_CASE changes deduced types of forwarding references #399 . This is fixed by using rvalues as function argument and using forward for the right type of reference. Now both gcc and doctest either fails or either compiles but not like one compiles and the other fails
… doctest - this is a fixup after merging #468
Description
Expression_lhs.operator==(const R& rhs).
lhs == rhs
for equality operator. This comparison fails since the global operator is defined after the template and it doesn't take part in lookup.GitHub Issues
Closes #443