Skip to content
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

fix(util): handle known UFCS corner cases #506

Merged
merged 29 commits into from
Dec 3, 2023
Merged

Conversation

JohelEGP
Copy link
Contributor

@JohelEGP JohelEGP commented Jun 10, 2023

Resolves #854.
Resolves #550.
Resolves #509. Resolves #769.
Resolves #497. Resolves #439. Closes #490. And discussion #810.
Resolves #496.
Resolves #493.
Provides a better name lookup implementation for #533.

Testing summary:

100% tests passed, 0 tests failed out of 858

Total Test time (real) =  47.47 sec

Acknowledgements:

Status:

Test (*-bugfix-for-ufcs-*) GCC 🐂 Clang 🐉 MSVC 🗔 Compiler Explorer 
mixed-*-non-local 10 ✅
11-14 ❌ᵈ
12 ❌ᵉ
13 ✅
🐂 10 , 🐲 12 https://cpp1.godbolt.org/z/Mb9nhzxhh
🐂 11 , 🐲 13 https://cpp1.godbolt.org/z/19d4xaW5E
💼 https://cpp1.godbolt.org/z/rrTjhcbj7
pure2-*-arguments 10 ✅ 12 ✅ https://cpp1.godbolt.org/z/njP74b7PW
💼 https://cpp1.godbolt.org/z/G6se4rnzr
pure2-*-name-lookup 10 ✅ 12 ✅ ✅ᵃ https://cpp1.godbolt.org/z/aWcvG9G1x
💼 https://cpp1.godbolt.org/z/7cqszTnbY
pure2-*-noexcept 10 ❌ᵇ
11 ✅
12 ❌ᵉ
13 ✅
🐂 10 , 🐲 12 https://cpp1.godbolt.org/z/8ecedrz9s
🐂 11 , 🐲 13 https://cpp1.godbolt.org/z/rxxGf7vWP
💼 https://cpp1.godbolt.org/z/qMsseKKqY
pure2-*-sfinae 10 ✅ 12 ❌ᵉ
13 ❌ᶜ
14 ✅
🐲 12 https://cpp1.godbolt.org/z/8s7P87YvT
🐲 14 https://cpp1.godbolt.org/z/69Trr5EYd
💼 https://cpp1.godbolt.org/z/Wx6hrdeT6

✅ᵃ: After disabling various tests in pure2-*-name-lookup.
❌ᵇ: GCC BUG101043 (the workaround makes it always potentially-throwing).
❌ᶜ: Clang 13 bug (error: static_assert expression is not an integral constant expression, https://cpp1.godbolt.org/z/WcEqYx8sG).
❌ᵈ: GCC BUG109781 (GCC bug on UFCS use).
❌ᵉ: Clang 12 doesn't support lambdas in unevaluated contexts.

@JohelEGP JohelEGP changed the title fix(cpp1): handle some UFCS corner cases fix(cpp1): handle known UFCS corner cases Jun 10, 2023
@JohelEGP

This comment was marked as resolved.

@JohelEGP

This comment was marked as off-topic.

@JohelEGP

This comment was marked as resolved.

@JohelEGP

This comment was marked as resolved.

@JohelEGP

This comment was marked as resolved.

@JohelEGP

This comment was marked as resolved.

@JohelEGP

This comment was marked as resolved.

@JohelEGP
Copy link
Contributor Author

JohelEGP commented Aug 29, 2023

fix(cpp1): handle known UFCS corner cases

Except for
3.2.int() (https://cpp2.godbolt.org/z/e3av4svTs),
#855,
#807,
#788,
#748?,
#555, and
#542 (comment) (not in main).

@JohelEGP

This comment was marked as resolved.

@JohelEGP
Copy link
Contributor Author

JohelEGP commented Dec 3, 2023

Done.

@hsutter hsutter merged commit a7ab29e into hsutter:main Dec 3, 2023
@hsutter
Copy link
Owner

hsutter commented Dec 3, 2023

Thanks! 🎉

Comment on lines +50 to +55
{ // Rejected by MSVC.
// f := :<f: _> (copy _: std::integral_constant<identity, f>) -> _ = {
// assert(t().f() == 0);
// return u().f();
// }(:std::integral_constant<identity, (:identity = ())> = ());
// _ = f;
Copy link
Contributor Author

@JohelEGP JohelEGP Jan 2, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to be accepted now: https://cpp1.godbolt.org/z/dTsWzfMcd.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment