Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(to_cpp1): add typename only to a _qualified-id_
Browse files Browse the repository at this point in the history
JohelEGP committed Oct 12, 2024
1 parent ab00e91 commit 0a63813
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions source/to_cpp1.h
Original file line number Diff line number Diff line change
@@ -5059,9 +5059,13 @@ class cppfront
auto req = std::string{"std::is_convertible_v<CPP2_TYPEOF("};
req += identifier;
req += "), std::add_const_t<";
// The call to 'print_to_string' just computed this.
// We could cache that so it's reused here.
if (is_dependent(type_id)) {
if (
get_if<type_id_node::qualified>(&type_id.id)
// The call to 'print_to_string' just computed this.
// We could cache that so it's reused here.
&& is_dependent(type_id)
)
{
req += "typename ";
}
req += param_type;

0 comments on commit 0a63813

Please sign in to comment.