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(to_cpp1): improve recognition of dependent types and deducible parameters #533

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

JohelEGP
Copy link
Contributor

@JohelEGP JohelEGP commented Jul 1, 2023

Resolves #534. Resolves #595.
Resolves #628 (as a discussion, this needs to be manually closed).
Adds what's needed to diagnose #572.

Testing summary:

99% tests passed, 3 tests failed out of 913

Total Test time (real) =  53.24 sec

The following tests FAILED:
	370 - build/pure2-bugfix-for-dependent-types-recursion (Failed)
	371 - build/check/pure2-bugfix-for-dependent-types-recursion (Not Run)
	372 - build/execute/pure2-bugfix-for-dependent-types-recursion (Not Run)

Acknowledgements:

@JohelEGP

This comment was marked as resolved.

@JohelEGP JohelEGP changed the title fix(cpp1): emit typename in dependent type-only contexts fix(cpp1): emit typename/template in unambiguous dependent contexts Jul 4, 2023
source/cppfront.cpp Outdated Show resolved Hide resolved
@JohelEGP JohelEGP changed the title fix(cpp1): emit typename/template in unambiguous dependent contexts fix(cpp1): improve recognition of dependent and deducible parameters Jul 6, 2023
@JohelEGP JohelEGP changed the title fix(cpp1): improve recognition of dependent and deducible parameters fix(cpp1): improve recognition of dependent types and deducible parameters Jul 6, 2023
source/cppfront.cpp Outdated Show resolved Hide resolved
source/cppfront.cpp Outdated Show resolved Hide resolved
@JohelEGP JohelEGP changed the title fix(cpp1): improve recognition of dependent types and deducible parameters fix(to_cpp1): improve recognition of dependent types and deducible parameters Nov 9, 2023
@JohelEGP
Copy link
Contributor Author

JohelEGP commented Dec 12, 2023

Patch for merging with #596:

diff --git a/source/to_cpp1.h b/source/to_cpp1.h
index 2ece7c3..503cf12 100644
--- a/source/to_cpp1.h
+++ b/source/to_cpp1.h
@@ -2019,6 +2019,12 @@ public:
         {
             return self->is_dependent(*expr.result_type);
         }
+
+        auto operator()(requires_expression_node const&) const
+             -> bool
+         {
+             return false;
+         }
     };
 
     auto is_dependent(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Template deduction fails [BUG] Recognize non-deducible parameter
2 participants