Skip to content

Commit

Permalink
Make argc mutable for compatibility (e.g., Qt), closes #899
Browse files Browse the repository at this point in the history
  • Loading branch information
hsutter committed Dec 20, 2023
1 parent 89f1830 commit fd791a4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion include/cpp2util.h
Original file line number Diff line number Diff line change
Expand Up @@ -1700,7 +1700,7 @@ struct args_t : std::vector<std::string_view>
{
args_t(int c, char** v) : vector{static_cast<std::size_t>(c)}, argc{c}, argv{v} {}

int argc = 0;
mutable int argc = 0; // mutable for compatibility with frameworks that take 'int& argc'
char** argv = nullptr;
};

Expand Down
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.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
Expand Down
2 changes: 1 addition & 1 deletion source/build.info
Original file line number Diff line number Diff line change
@@ -1 +1 @@
"8C20:1033"
"8C20:1104"

0 comments on commit fd791a4

Please sign in to comment.