From fd791a4b143130e1ba4e34e4b4a68ae1cf5975dc Mon Sep 17 00:00:00 2001 From: Herb Sutter Date: Wed, 20 Dec 2023 11:33:32 -0800 Subject: [PATCH] Make `argc` mutable for compatibility (e.g., Qt), closes #899 --- include/cpp2util.h | 2 +- regression-tests/test-results/version | 2 +- source/build.info | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/cpp2util.h b/include/cpp2util.h index 414aed2af5..73bb930814 100644 --- a/include/cpp2util.h +++ b/include/cpp2util.h @@ -1700,7 +1700,7 @@ struct args_t : std::vector { args_t(int c, char** v) : vector{static_cast(c)}, argc{c}, argv{v} {} - int argc = 0; + mutable int argc = 0; // mutable for compatibility with frameworks that take 'int& argc' char** argv = nullptr; }; diff --git a/regression-tests/test-results/version b/regression-tests/test-results/version index 87355917b6..1770107713 100644 --- a/regression-tests/test-results/version +++ b/regression-tests/test-results/version @@ -1,5 +1,5 @@ -cppfront compiler v0.3.0 Build 8C20:1033 +cppfront compiler v0.3.0 Build 8C20:1104 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 14d90dfe87..f92d07db23 100644 --- a/source/build.info +++ b/source/build.info @@ -1 +1 @@ -"8C20:1033" \ No newline at end of file +"8C20:1104" \ No newline at end of file