From 08533411bd2fe9f83fe0dca83c47876d2cf79551 Mon Sep 17 00:00:00 2001 From: Herb Sutter Date: Thu, 10 Oct 2024 09:50:59 -0700 Subject: [PATCH] Only convert `type_of` to the Cpp2 macro if unqualified --- regression-tests/test-results/version | 2 +- source/build.info | 2 +- source/to_cpp1.h | 6 +++++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/regression-tests/test-results/version b/regression-tests/test-results/version index 095a2183d..3e9d5db23 100644 --- a/regression-tests/test-results/version +++ b/regression-tests/test-results/version @@ -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 diff --git a/source/build.info b/source/build.info index 46369eca5..4aced9668 100644 --- a/source/build.info +++ b/source/build.info @@ -1 +1 @@ -"9A09:1351" \ No newline at end of file +"9A10:0946" \ No newline at end of file diff --git a/source/to_cpp1.h b/source/to_cpp1.h index 9628f3f30..3e08d83e6 100644 --- a/source/to_cpp1.h +++ b/source/to_cpp1.h @@ -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 {