Skip to content

Commit

Permalink
Only convert type_of to the Cpp2 macro if unqualified
Browse files Browse the repository at this point in the history
  • Loading branch information
hsutter committed Oct 10, 2024
1 parent 3fe8d6f commit 0853341
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion regression-tests/test-results/version
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

cppfront compiler v0.8.0 Build 9A09:1351
cppfront compiler v0.8.0 Build 9A10:0946
Copyright(c) Herb Sutter All rights reserved

SPDX-License-Identifier: CC-BY-NC-ND-4.0
Expand Down
2 changes: 1 addition & 1 deletion source/build.info
Original file line number Diff line number Diff line change
@@ -1 +1 @@
"9A09:1351"
"9A10:0946"
6 changes: 5 additions & 1 deletion source/to_cpp1.h
Original file line number Diff line number Diff line change
Expand Up @@ -1699,7 +1699,11 @@ class cppfront
{
printer.print_cpp2("cpp2_"+n.to_string(), pos);
}
else if (n == "type_of") {
else if (
!is_qualified
&& n == "type_of"
)
{
printer.print_cpp2("CPP2_TYPEOF", pos);
}
else {
Expand Down

0 comments on commit 0853341

Please sign in to comment.