-
Notifications
You must be signed in to change notification settings - Fork 251
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(to_cpp1): improve recognition of dependent types and deducible parameters #533
base: main
Are you sure you want to change the base?
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
typename
in dependent type-only contextstypename
/template
in unambiguous dependent contexts
typename
/template
in unambiguous dependent contextsffacee7
to
58ee983
Compare
6262f55
to
c1d257b
Compare
c1d257b
to
15b7551
Compare
15b7551
to
cb586e6
Compare
cb586e6
to
4900c6c
Compare
b421c19
to
ccb10cf
Compare
ccb10cf
to
780b99a
Compare
780b99a
to
ae91505
Compare
b9b5592
to
591cd4b
Compare
Patch for merging with #596: diff --git a/source/to_cpp1.h b/source/to_cpp1.h
index 5286c3ee..01cb93b5 100644
--- a/source/to_cpp1.h
+++ b/source/to_cpp1.h
@@ -2234,6 +2234,12 @@ public:
{
return self->is_dependent(*expr.result_type);
}
+
+ auto operator()(requires_expression_node const&) const
+ -> bool
+ {
+ return false;
+ }
};
auto is_dependent( |
d0986ee
to
610c254
Compare
In type-only contexts, we can also allow a space between the identifier and the template-argument-list opener.
|
610c254
to
ace8cca
Compare
b15a82b
to
eb552be
Compare
eb552be
to
ab00e91
Compare
Hi! Sorry it took me so long to get to this one... but this looks like it might still be current. It's a bigger diff, but part of it is the Is this up to date, and would you like me to review it? |
Yes, and yes, please do. |
^ | ||
pure2-bugfix-for-dependent-types-recursion.cpp2:3:13: error: unknown type name 'a' | ||
using b = a; | ||
^ |
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.
Is it intended that these test cases fail?
- pure2-bugfix-for-dependent-types-recursion
- pure2-bugfix-for-dependent-types
For some reason the latter works on GCC 14?
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.
pure2-bugfix-for-dependent-types-recursion
should fail.
It tests that the algorithm detects recursio,
and returns false
(i.e., "not a dependent type"),
to let the Cpp1 compiler give its diagnostic.
pure2-bugfix-for-dependent-types
shouldn't fail on a modern compiler.
I see some are failing because they don't yet support optional typename
.
Resolves #534. Resolves #595.
Resolves #628 (as a discussion, this needs to be manually closed).
Adds what's needed to diagnose #572.