From 1bbcd048ed23cf51ed3011e1dcbd86f2a20c1997 Mon Sep 17 00:00:00 2001 From: Herb Sutter Date: Wed, 10 Jan 2024 18:11:34 -0800 Subject: [PATCH] Post-merge, resync `reflect.h` and bump build number --- regression-tests/test-results/version | 2 +- source/build.info | 2 +- source/reflect.h | 18 +++++++++--------- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/regression-tests/test-results/version b/regression-tests/test-results/version index 9d05845a7..f26b01d81 100644 --- a/regression-tests/test-results/version +++ b/regression-tests/test-results/version @@ -1,5 +1,5 @@ -cppfront compiler v0.3.0 Build 9108:1647 +cppfront compiler v0.3.0 Build 9110:1810 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 919a56d88..a29fbad5a 100644 --- a/source/build.info +++ b/source/build.info @@ -1 +1 @@ -"9108:1647" \ No newline at end of file +"9110:1810" \ No newline at end of file diff --git a/source/reflect.h b/source/reflect.h index e277b603a..a450fed1f 100644 --- a/source/reflect.h +++ b/source/reflect.h @@ -843,7 +843,7 @@ namespace meta { static_cast(CPP2_UFCS(emplace_back)((*cpp2::assert_not_null(_1)), s, source_line::category::cpp2)); }}; { -auto newline_pos = CPP2_UFCS(find)(source, '\n'); +auto newline_pos{CPP2_UFCS(find)(source, '\n')}; // First split this string into source_lines // @@ -1521,7 +1521,7 @@ auto basic_enum( auto found_non_numeric {false}; { -std::string value = "-1"; +std::string value{"-1"}; #line 991 "reflect.h2" for ( @@ -1651,7 +1651,7 @@ std::string value = "-1"; CPP2_UFCS(add_member)(t, " operator= : (out this, that) == { }"); CPP2_UFCS(add_member)(t, " operator<=> : (this, that) -> std::strong_ordering;"); { -std::string to_string = " to_string: (this) -> std::string = { \n"; +std::string to_string{" to_string: (this) -> std::string = { \n"}; // Provide a 'to_string' function to print enumerator name(s) @@ -1734,7 +1734,7 @@ auto cpp2_union(meta::type_declaration& t) -> void { std::vector alternatives {}; { -auto value = 0; +auto value{0}; // 1. Gather: All the user-written members, and find/compute the max size @@ -1783,14 +1783,14 @@ auto value = 0; CPP2_UFCS(remove_marked_members)(t); { -std::string storage = " _storage: cpp2::aligned_storage(_storage&), _args...); } else { reinterpret_cast<*" + cpp2::to_string(a.type) + ">(_storage&)* = :" + cpp2::to_string(a.type) + " = (_args...); } _discriminator = " + cpp2::to_string(a.value) + "; }\n")); } { -std::string destroy = " private _destroy: (inout this) = {\n"; +std::string destroy{" private _destroy: (inout this) = {\n"}; // Add destroy @@ -1862,7 +1862,7 @@ std::string destroy = " private _destroy: (inout this) = {\n"; // Add default constructor CPP2_UFCS(add_member)(t, " operator=: (out this) = { }"); { -std::string value_set = ""; +std::string value_set{""}; // Add copy/move construction and assignment