Skip to content

Commit 0853341

Browse files
committedOct 10, 2024
Only convert type_of to the Cpp2 macro if unqualified
1 parent 3fe8d6f commit 0853341

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed
 

‎regression-tests/test-results/version

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

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

55
SPDX-License-Identifier: CC-BY-NC-ND-4.0

‎source/build.info

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
"9A09:1351"
1+
"9A10:0946"

‎source/to_cpp1.h

+5-1
Original file line numberDiff line numberDiff line change
@@ -1699,7 +1699,11 @@ class cppfront
16991699
{
17001700
printer.print_cpp2("cpp2_"+n.to_string(), pos);
17011701
}
1702-
else if (n == "type_of") {
1702+
else if (
1703+
!is_qualified
1704+
&& n == "type_of"
1705+
)
1706+
{
17031707
printer.print_cpp2("CPP2_TYPEOF", pos);
17041708
}
17051709
else {

0 commit comments

Comments
 (0)