From 1a14004dcb96f30bbd46db6ed877b96fae6ca8e6 Mon Sep 17 00:00:00 2001 From: Aaron Webster Date: Tue, 2 Dec 2025 15:27:50 -0800 Subject: [PATCH 1/6] Port optimized conditionals v2 --- compiler/back_end/cpp/BUILD | 12 + compiler/back_end/cpp/build_defs.bzl | 5 +- .../back_end/cpp/generated_code_templates | 14 +- compiler/back_end/cpp/header_generator.py | 61 +- compiler/back_end/cpp/one_golden_test.py | 3 + compiler/back_end/cpp/run_one_golden_test.py | 16 +- .../testcode/many_conditionals_benchmark.cc | 45 + compiler/util/parser_types.py | 2 +- testdata/BUILD | 10 +- testdata/golden_cpp/alignments.emb.h | 164 +- testdata/golden_cpp/anonymous_bits.emb.h | 151 +- testdata/golden_cpp/auto_array_size.emb.h | 93 +- testdata/golden_cpp/bcd.emb.h | 193 ++- testdata/golden_cpp/bits.emb.h | 301 +++- testdata/golden_cpp/complex_offset.emb.h | 206 ++- testdata/golden_cpp/complex_structure.emb.h | 267 +++- testdata/golden_cpp/condition.emb.h | 1359 ++++++++++++----- testdata/golden_cpp/dynamic_size.emb.h | 543 +++++-- testdata/golden_cpp/enum.emb.h | 151 +- testdata/golden_cpp/enum_case.emb.h | 43 +- testdata/golden_cpp/explicit_sizes.emb.h | 158 +- testdata/golden_cpp/float.emb.h | 72 +- testdata/golden_cpp/imported.emb.h | 29 +- testdata/golden_cpp/imported_genfiles.emb.h | 29 +- testdata/golden_cpp/importer.emb.h | 36 +- testdata/golden_cpp/importer2.emb.h | 29 +- testdata/golden_cpp/inline_type.emb.h | 36 +- testdata/golden_cpp/int_sizes.emb.h | 78 +- testdata/golden_cpp/large_array.emb.h | 36 +- testdata/golden_cpp/nested_structure.emb.h | 115 +- testdata/golden_cpp/next_keyword.emb.h | 50 +- testdata/golden_cpp/no_enum_traits.emb.h | 192 +-- testdata/golden_cpp/parameters.emb.h | 570 +++++-- testdata/golden_cpp/requires.emb.h | 410 +++-- testdata/golden_cpp/start_size_range.emb.h | 50 +- testdata/golden_cpp/subtypes.emb.h | 214 ++- testdata/golden_cpp/text_format.emb.h | 122 +- testdata/golden_cpp/uint_sizes.emb.h | 476 ++++-- testdata/golden_cpp/virtual_field.emb.h | 916 +++++++---- testdata/many_conditionals.emb | 305 ++++ 40 files changed, 5455 insertions(+), 2107 deletions(-) create mode 100644 compiler/back_end/cpp/testcode/many_conditionals_benchmark.cc create mode 100644 testdata/many_conditionals.emb diff --git a/compiler/back_end/cpp/BUILD b/compiler/back_end/cpp/BUILD index 14eac6a..5e23832 100644 --- a/compiler/back_end/cpp/BUILD +++ b/compiler/back_end/cpp/BUILD @@ -388,6 +388,17 @@ emboss_cc_test( ], ) +emboss_cc_test( + name = "many_conditionals_benchmark", + srcs = [ + "testcode/many_conditionals_benchmark.cc", + ], + deps = [ + "//testdata:many_conditionals_emboss", + "@com_google_googletest//:gtest_main", + ], +) + # New golden test infrastructure py_library( name = "one_golden_test_lib", @@ -535,6 +546,7 @@ cpp_golden_test( cpp_golden_test( name = "no_enum_traits_golden_test", emb_file = "//testdata:no_enum_traits.emb", + extra_args = ["--no-cc-enum-traits"], golden_file = "//testdata/golden_cpp:no_enum_traits.emb.h", ) diff --git a/compiler/back_end/cpp/build_defs.bzl b/compiler/back_end/cpp/build_defs.bzl index 78d22f3..3775466 100644 --- a/compiler/back_end/cpp/build_defs.bzl +++ b/compiler/back_end/cpp/build_defs.bzl @@ -46,7 +46,7 @@ def emboss_cc_test(name, copts = None, no_w_sign_compare = False, **kwargs): **kwargs ) -def cpp_golden_test(name, emb_file, golden_file, import_dirs = []): +def cpp_golden_test(name, emb_file, golden_file, import_dirs = [], extra_args = []): """Defines a C++ golden file test. Args: @@ -54,6 +54,7 @@ def cpp_golden_test(name, emb_file, golden_file, import_dirs = []): emb_file: The .emb file to test. golden_file: The golden .h file. import_dirs: A list of import directories. + extra_args: A list of extra arguments to pass to the compiler. """ py_test( name = name, @@ -65,7 +66,7 @@ def cpp_golden_test(name, emb_file, golden_file, import_dirs = []): "$(location :emboss_codegen_cpp)", "$(location %s)" % emb_file, "$(location %s)" % golden_file, - ] + ["--import-dir=" + d for d in import_dirs], + ] + ["--import-dir=" + d for d in import_dirs] + extra_args, data = [ "//compiler/front_end:emboss_front_end", ":emboss_codegen_cpp", diff --git a/compiler/back_end/cpp/generated_code_templates b/compiler/back_end/cpp/generated_code_templates index e8f7c46..5ea3ca5 100644 --- a/compiler/back_end/cpp/generated_code_templates +++ b/compiler/back_end/cpp/generated_code_templates @@ -127,6 +127,7 @@ class Generic${name}View final { bool Ok() const { if (!IsComplete()) return false; ${parameter_ok_checks} +${ok_subexpressions} ${field_ok_checks} ${requires_check} return true; @@ -391,11 +392,14 @@ ${write_fields} // ** ok_method_test ** //////////////////////////////////////////////////////// // If we don't have enough information to determine whether ${field} is // present in the structure, then structure.Ok() should be false. - if (!has_${field}.Known()) return false; - // If ${field} is present, but not Ok(), then structure.Ok() should be - // false. If ${field} is not present, it does not matter whether it is - // Ok(). - if (has_${field}.ValueOrDefault() && !${field}.Ok()) return false; + { + const auto emboss_reserved_local_field_present = ${existence_condition}; + if (!emboss_reserved_local_field_present.Known()) return false; + // If ${field} is present, but not Ok(), then structure.Ok() should be + // false. If ${field} is not present, it does not matter whether it is + // Ok(). + if (emboss_reserved_local_field_present.ValueOrDefault() && !${field}.Ok()) return false; + } // ** equals_method_test ** //////////////////////////////////////////////////// diff --git a/compiler/back_end/cpp/header_generator.py b/compiler/back_end/cpp/header_generator.py index 5860bc8..8e504ad 100644 --- a/compiler/back_end/cpp/header_generator.py +++ b/compiler/back_end/cpp/header_generator.py @@ -791,6 +791,44 @@ def subexprs(self): ] +class _UsageCountingStore(object): + """A mock SubexpressionStore that counts subexpression usage.""" + + def __init__(self): + self.counts = collections.defaultdict(int) + + def add(self, subexpr): + self.counts[subexpr] += 1 + return subexpr + + +class _SmartSubexpressionStore(object): + """A SubexpressionStore that only caches subexpressions used multiple times.""" + + def __init__(self, prefix, counts): + self._prefix = prefix + self._counts = counts + self._subexpr_to_name = {} + self._index_to_subexpr = [] + + def add(self, subexpr): + if self._counts[subexpr] <= 1: + return subexpr + + if subexpr not in self._subexpr_to_name: + self._index_to_subexpr.append(subexpr) + self._subexpr_to_name[subexpr] = self._prefix + str( + len(self._index_to_subexpr) + ) + return self._subexpr_to_name[subexpr] + + def subexprs(self): + return [ + (self._subexpr_to_name[subexpr], subexpr) + for subexpr in self._index_to_subexpr + ] + + _ExpressionResult = collections.namedtuple( "ExpressionResult", ["rendered", "is_constant"] ) @@ -871,7 +909,9 @@ def _render_expression(expression, ir, field_reader=None, subexpressions=None): def _render_existence_test(field, ir, subexpressions=None): - return _render_expression(field.existence_condition, ir, subexpressions) + return _render_expression( + field.existence_condition, ir, subexpressions=subexpressions + ) def _alignment_of_location(location): @@ -1421,6 +1461,16 @@ def _generate_structure_definition(type_ir, ir, config: Config): initialize_parameters_initialized_true = "" parameter_checks = [""] + # Pass 1: Count subexpression usage. + ok_usage_counter = _UsageCountingStore() + for field_index in type_ir.structure.fields_in_dependency_order: + field = type_ir.structure.field[field_index] + _render_existence_test(field, ir, ok_usage_counter) + + # Pass 2: Generate code using smart store. + ok_subexpressions = _SmartSubexpressionStore( + "emboss_reserved_local_ok_subexpr_", ok_usage_counter.counts + ) for field_index in type_ir.structure.fields_in_dependency_order: field = type_ir.structure.field[field_index] helper_types, declaration, definition = _generate_structure_field_methods( @@ -1432,6 +1482,9 @@ def _generate_structure_definition(type_ir, ir, config: Config): code_template.format_template( _TEMPLATES.ok_method_test, field=_cpp_field_name(field.name.name.text) + "()", + existence_condition=_render_existence_test( + field, ir, subexpressions=ok_subexpressions + ).rendered, ) ) if not ir_util.field_is_virtual(field): @@ -1499,6 +1552,12 @@ def _generate_structure_definition(type_ir, ir, config: Config): size_method=_render_size_method(type_ir.structure.field, ir), field_method_declarations="".join(field_method_declarations), field_ok_checks="\n".join(ok_method_clauses), + ok_subexpressions="".join( + [ + " const auto {} = {};\n".format(name, subexpr) + for name, subexpr in ok_subexpressions.subexprs() + ] + ), parameter_ok_checks="\n".join(parameter_checks), requires_check=requires_check, equals_method_body="\n".join(equals_method_clauses), diff --git a/compiler/back_end/cpp/one_golden_test.py b/compiler/back_end/cpp/one_golden_test.py index 196e4a2..6c65491 100644 --- a/compiler/back_end/cpp/one_golden_test.py +++ b/compiler/back_end/cpp/one_golden_test.py @@ -27,6 +27,7 @@ def __init__( emb_file, golden_file, include_dirs=None, + compiler_flags=None, ): super(OneGoldenTest, self).__init__("test_golden_file") self.emboss_front_end = emboss_front_end @@ -34,6 +35,7 @@ def __init__( self.emb_file = emb_file self.golden_file = golden_file self.include_dirs = include_dirs if include_dirs is not None else [] + self.compiler_flags = compiler_flags if compiler_flags is not None else [] def test_golden_file(self): temp_dir = os.environ.get("TEST_TMPDIR", "") @@ -61,6 +63,7 @@ def test_golden_file(self): "--output-file", output_path, ] + compiler_args.extend(self.compiler_flags) process = subprocess.run(compiler_args, capture_output=True, text=True) diff --git a/compiler/back_end/cpp/run_one_golden_test.py b/compiler/back_end/cpp/run_one_golden_test.py index 36f166e..0faa513 100644 --- a/compiler/back_end/cpp/run_one_golden_test.py +++ b/compiler/back_end/cpp/run_one_golden_test.py @@ -34,12 +34,24 @@ def main(argv): emboss_compiler = argv[2] emb_file = argv[3] golden_file = argv[4] - include_dirs = argv[5:] + + include_dirs = [] + compiler_flags = [] + for arg in argv[5:]: + if arg.startswith("--import-dir="): + include_dirs.append(arg[len("--import-dir=") :]) + else: + compiler_flags.append(arg) suite = unittest.TestSuite() suite.addTest( OneGoldenTest( - emboss_front_end, emboss_compiler, emb_file, golden_file, include_dirs + emboss_front_end, + emboss_compiler, + emb_file, + golden_file, + include_dirs, + compiler_flags, ) ) runner = unittest.TextTestRunner() diff --git a/compiler/back_end/cpp/testcode/many_conditionals_benchmark.cc b/compiler/back_end/cpp/testcode/many_conditionals_benchmark.cc new file mode 100644 index 0000000..bc4ab96 --- /dev/null +++ b/compiler/back_end/cpp/testcode/many_conditionals_benchmark.cc @@ -0,0 +1,45 @@ +#include + +#include +#include +#include + +#include "testdata/many_conditionals.emb.h" + +// A simple test that acts as a benchmark/sanity check. +// Since this file is in compiler/back_end/cpp/testcode/, it will be built as a +// cc_test. We can use GoogleTest macros. + +namespace emboss { +namespace test { +namespace { + +TEST(ComplexConditionals, PerformanceBenchmark) { + std::vector buffer(100, 0); + auto view = emboss::test::MakeLargeConditionalsView(&buffer); + + auto start = std::chrono::high_resolution_clock::now(); + int iterations = 10000; + volatile bool result = false; + for (int i = 0; i < iterations; ++i) { + for (int tag = 0; tag < 100; ++tag) { + view.tag().Write(tag); + result = view.Ok(); + } + } + auto end = std::chrono::high_resolution_clock::now(); + + std::chrono::duration elapsed = end - start; + // We don't strictly fail on time, but we print it. + // In a real CI system we might assert upper bounds. + std::cout << "Time for " << iterations + << " iterations (x100 tags): " << elapsed.count() << "s" + << std::endl; + + EXPECT_TRUE(result); + EXPECT_TRUE(view.Ok()); +} + +} // namespace +} // namespace test +} // namespace emboss diff --git a/compiler/util/parser_types.py b/compiler/util/parser_types.py index a3ef34d..89cb186 100644 --- a/compiler/util/parser_types.py +++ b/compiler/util/parser_types.py @@ -15,7 +15,7 @@ """Types related to the LR(1) parser. This module contains types used by the LR(1) parser, which are also used in -other parts of the compiler: +other parts of the compiler: SourcePosition: a position (zero-width) within a source file. SourceLocation: a span within a source file. diff --git a/testdata/BUILD b/testdata/BUILD index 95716da..8498fe5 100644 --- a/testdata/BUILD +++ b/testdata/BUILD @@ -36,11 +36,8 @@ filegroup( ], ) - - exports_files(glob(["**/*.emb"])) - filegroup( name = "test_embs", srcs = [ @@ -369,3 +366,10 @@ emboss_cc_library( "complex_offset.emb", ], ) + +emboss_cc_library( + name = "many_conditionals_emboss", + srcs = [ + "many_conditionals.emb", + ], +) diff --git a/testdata/golden_cpp/alignments.emb.h b/testdata/golden_cpp/alignments.emb.h index e60daf5..f225198 100644 --- a/testdata/golden_cpp/alignments.emb.h +++ b/testdata/golden_cpp/alignments.emb.h @@ -116,60 +116,103 @@ class GenericAlignmentsView final { bool Ok() const { if (!IsComplete()) return false; - if (!has_zero_offset().Known()) return false; - if (has_zero_offset().ValueOrDefault() && !zero_offset().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !zero_offset().Ok()) return false; + } - if (!has_zero_offset_substructure().Known()) return false; - if (has_zero_offset_substructure().ValueOrDefault() && !zero_offset_substructure().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !zero_offset_substructure().Ok()) return false; + } - if (!has_two_offset_substructure().Known()) return false; - if (has_two_offset_substructure().ValueOrDefault() && !two_offset_substructure().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !two_offset_substructure().Ok()) return false; + } - if (!has_three_offset().Known()) return false; - if (has_three_offset().ValueOrDefault() && !three_offset().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !three_offset().Ok()) return false; + } - if (!has_four_offset().Known()) return false; - if (has_four_offset().ValueOrDefault() && !four_offset().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !four_offset().Ok()) return false; + } - if (!has_eleven_offset().Known()) return false; - if (has_eleven_offset().ValueOrDefault() && !eleven_offset().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !eleven_offset().Ok()) return false; + } - if (!has_twelve_offset().Known()) return false; - if (has_twelve_offset().ValueOrDefault() && !twelve_offset().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !twelve_offset().Ok()) return false; + } - if (!has_zero_offset_four_stride_array().Known()) return false; - if (has_zero_offset_four_stride_array().ValueOrDefault() && !zero_offset_four_stride_array().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !zero_offset_four_stride_array().Ok()) return false; + } - if (!has_zero_offset_six_stride_array().Known()) return false; - if (has_zero_offset_six_stride_array().ValueOrDefault() && !zero_offset_six_stride_array().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !zero_offset_six_stride_array().Ok()) return false; + } - if (!has_three_offset_four_stride_array().Known()) return false; - if (has_three_offset_four_stride_array().ValueOrDefault() && !three_offset_four_stride_array().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !three_offset_four_stride_array().Ok()) return false; + } - if (!has_four_offset_six_stride_array().Known()) return false; - if (has_four_offset_six_stride_array().ValueOrDefault() && !four_offset_six_stride_array().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !four_offset_six_stride_array().Ok()) return false; + } - if (!has_IntrinsicSizeInBytes().Known()) return false; - if (has_IntrinsicSizeInBytes().ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + } - if (!has_MaxSizeInBytes().Known()) return false; - if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + } - if (!has_MinSizeInBytes().Known()) return false; - if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + } @@ -1338,20 +1381,33 @@ class GenericPlaceholder4View final { bool Ok() const { if (!IsComplete()) return false; - if (!has_dummy().Known()) return false; - if (has_dummy().ValueOrDefault() && !dummy().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !dummy().Ok()) return false; + } - if (!has_IntrinsicSizeInBytes().Known()) return false; - if (has_IntrinsicSizeInBytes().ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + } - if (!has_MaxSizeInBytes().Known()) return false; - if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + } - if (!has_MinSizeInBytes().Known()) return false; - if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + } @@ -1757,24 +1813,40 @@ class GenericPlaceholder6View final { bool Ok() const { if (!IsComplete()) return false; - if (!has_zero_offset().Known()) return false; - if (has_zero_offset().ValueOrDefault() && !zero_offset().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !zero_offset().Ok()) return false; + } - if (!has_two_offset().Known()) return false; - if (has_two_offset().ValueOrDefault() && !two_offset().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !two_offset().Ok()) return false; + } - if (!has_IntrinsicSizeInBytes().Known()) return false; - if (has_IntrinsicSizeInBytes().ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + } - if (!has_MaxSizeInBytes().Known()) return false; - if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + } - if (!has_MinSizeInBytes().Known()) return false; - if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + } diff --git a/testdata/golden_cpp/anonymous_bits.emb.h b/testdata/golden_cpp/anonymous_bits.emb.h index 7d505c9..42b1aac 100644 --- a/testdata/golden_cpp/anonymous_bits.emb.h +++ b/testdata/golden_cpp/anonymous_bits.emb.h @@ -122,28 +122,47 @@ class GenericEmbossReservedAnonymousField2View final { bool Ok() const { if (!IsComplete()) return false; - if (!has_high_bit().Known()) return false; - if (has_high_bit().ValueOrDefault() && !high_bit().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !high_bit().Ok()) return false; + } - if (!has_bar().Known()) return false; - if (has_bar().ValueOrDefault() && !bar().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !bar().Ok()) return false; + } - if (!has_first_bit().Known()) return false; - if (has_first_bit().ValueOrDefault() && !first_bit().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !first_bit().Ok()) return false; + } - if (!has_IntrinsicSizeInBits().Known()) return false; - if (has_IntrinsicSizeInBits().ValueOrDefault() && !IntrinsicSizeInBits().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBits().Ok()) return false; + } - if (!has_MaxSizeInBits().Known()) return false; - if (has_MaxSizeInBits().ValueOrDefault() && !MaxSizeInBits().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBits().Ok()) return false; + } - if (!has_MinSizeInBits().Known()) return false; - if (has_MinSizeInBits().ValueOrDefault() && !MinSizeInBits().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBits().Ok()) return false; + } @@ -793,24 +812,40 @@ class GenericEmbossReservedAnonymousField1View final { bool Ok() const { if (!IsComplete()) return false; - if (!has_bit_23().Known()) return false; - if (has_bit_23().ValueOrDefault() && !bit_23().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !bit_23().Ok()) return false; + } - if (!has_low_bit().Known()) return false; - if (has_low_bit().ValueOrDefault() && !low_bit().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !low_bit().Ok()) return false; + } - if (!has_IntrinsicSizeInBits().Known()) return false; - if (has_IntrinsicSizeInBits().ValueOrDefault() && !IntrinsicSizeInBits().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBits().Ok()) return false; + } - if (!has_MaxSizeInBits().Known()) return false; - if (has_MaxSizeInBits().ValueOrDefault() && !MaxSizeInBits().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBits().Ok()) return false; + } - if (!has_MinSizeInBits().Known()) return false; - if (has_MinSizeInBits().ValueOrDefault() && !MinSizeInBits().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBits().Ok()) return false; + } @@ -1288,44 +1323,76 @@ class GenericFooView final { bool Ok() const { if (!IsComplete()) return false; - if (!has_emboss_reserved_anonymous_field_2().Known()) return false; - if (has_emboss_reserved_anonymous_field_2().ValueOrDefault() && !emboss_reserved_anonymous_field_2().Ok()) return false; + const auto emboss_reserved_local_ok_subexpr_1 = ::emboss::support::And(::emboss::support::Maybe(true), ::emboss::support::Maybe(true)); + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !emboss_reserved_anonymous_field_2().Ok()) return false; + } - if (!has_high_bit().Known()) return false; - if (has_high_bit().ValueOrDefault() && !high_bit().Ok()) return false; + { + const auto emboss_reserved_local_field_present = emboss_reserved_local_ok_subexpr_1; + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !high_bit().Ok()) return false; + } - if (!has_bar().Known()) return false; - if (has_bar().ValueOrDefault() && !bar().Ok()) return false; + { + const auto emboss_reserved_local_field_present = emboss_reserved_local_ok_subexpr_1; + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !bar().Ok()) return false; + } - if (!has_first_bit().Known()) return false; - if (has_first_bit().ValueOrDefault() && !first_bit().Ok()) return false; + { + const auto emboss_reserved_local_field_present = emboss_reserved_local_ok_subexpr_1; + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !first_bit().Ok()) return false; + } - if (!has_emboss_reserved_anonymous_field_1().Known()) return false; - if (has_emboss_reserved_anonymous_field_1().ValueOrDefault() && !emboss_reserved_anonymous_field_1().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !emboss_reserved_anonymous_field_1().Ok()) return false; + } - if (!has_bit_23().Known()) return false; - if (has_bit_23().ValueOrDefault() && !bit_23().Ok()) return false; + { + const auto emboss_reserved_local_field_present = emboss_reserved_local_ok_subexpr_1; + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !bit_23().Ok()) return false; + } - if (!has_low_bit().Known()) return false; - if (has_low_bit().ValueOrDefault() && !low_bit().Ok()) return false; + { + const auto emboss_reserved_local_field_present = emboss_reserved_local_ok_subexpr_1; + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !low_bit().Ok()) return false; + } - if (!has_IntrinsicSizeInBytes().Known()) return false; - if (has_IntrinsicSizeInBytes().ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + } - if (!has_MaxSizeInBytes().Known()) return false; - if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + } - if (!has_MinSizeInBytes().Known()) return false; - if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + } diff --git a/testdata/golden_cpp/auto_array_size.emb.h b/testdata/golden_cpp/auto_array_size.emb.h index 64e2973..66e01f0 100644 --- a/testdata/golden_cpp/auto_array_size.emb.h +++ b/testdata/golden_cpp/auto_array_size.emb.h @@ -99,24 +99,40 @@ class GenericElementView final { bool Ok() const { if (!IsComplete()) return false; - if (!has_a().Known()) return false; - if (has_a().ValueOrDefault() && !a().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !a().Ok()) return false; + } - if (!has_b().Known()) return false; - if (has_b().ValueOrDefault() && !b().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !b().Ok()) return false; + } - if (!has_IntrinsicSizeInBytes().Known()) return false; - if (has_IntrinsicSizeInBytes().ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + } - if (!has_MaxSizeInBytes().Known()) return false; - if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + } - if (!has_MinSizeInBytes().Known()) return false; - if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + } @@ -602,36 +618,61 @@ class GenericAutoSizeView final { bool Ok() const { if (!IsComplete()) return false; - if (!has_array_size().Known()) return false; - if (has_array_size().ValueOrDefault() && !array_size().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !array_size().Ok()) return false; + } - if (!has_four_byte_array().Known()) return false; - if (has_four_byte_array().ValueOrDefault() && !four_byte_array().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !four_byte_array().Ok()) return false; + } - if (!has_four_struct_array().Known()) return false; - if (has_four_struct_array().ValueOrDefault() && !four_struct_array().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !four_struct_array().Ok()) return false; + } - if (!has_dynamic_byte_array().Known()) return false; - if (has_dynamic_byte_array().ValueOrDefault() && !dynamic_byte_array().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !dynamic_byte_array().Ok()) return false; + } - if (!has_dynamic_struct_array().Known()) return false; - if (has_dynamic_struct_array().ValueOrDefault() && !dynamic_struct_array().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !dynamic_struct_array().Ok()) return false; + } - if (!has_IntrinsicSizeInBytes().Known()) return false; - if (has_IntrinsicSizeInBytes().ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + } - if (!has_MaxSizeInBytes().Known()) return false; - if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + } - if (!has_MinSizeInBytes().Known()) return false; - if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + } diff --git a/testdata/golden_cpp/bcd.emb.h b/testdata/golden_cpp/bcd.emb.h index 1e4edc2..c10e884 100644 --- a/testdata/golden_cpp/bcd.emb.h +++ b/testdata/golden_cpp/bcd.emb.h @@ -125,32 +125,54 @@ class GenericEmbossReservedAnonymousField1View final { bool Ok() const { if (!IsComplete()) return false; - if (!has_four_bit().Known()) return false; - if (has_four_bit().ValueOrDefault() && !four_bit().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !four_bit().Ok()) return false; + } - if (!has_six_bit().Known()) return false; - if (has_six_bit().ValueOrDefault() && !six_bit().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !six_bit().Ok()) return false; + } - if (!has_ten_bit().Known()) return false; - if (has_ten_bit().ValueOrDefault() && !ten_bit().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !ten_bit().Ok()) return false; + } - if (!has_twelve_bit().Known()) return false; - if (has_twelve_bit().ValueOrDefault() && !twelve_bit().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !twelve_bit().Ok()) return false; + } - if (!has_IntrinsicSizeInBits().Known()) return false; - if (has_IntrinsicSizeInBits().ValueOrDefault() && !IntrinsicSizeInBits().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBits().Ok()) return false; + } - if (!has_MaxSizeInBits().Known()) return false; - if (has_MaxSizeInBits().ValueOrDefault() && !MaxSizeInBits().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBits().Ok()) return false; + } - if (!has_MinSizeInBits().Known()) return false; - if (has_MinSizeInBits().ValueOrDefault() && !MinSizeInBits().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBits().Ok()) return false; + } @@ -782,68 +804,118 @@ class GenericBcdSizesView final { bool Ok() const { if (!IsComplete()) return false; - if (!has_one_byte().Known()) return false; - if (has_one_byte().ValueOrDefault() && !one_byte().Ok()) return false; + const auto emboss_reserved_local_ok_subexpr_1 = ::emboss::support::And(::emboss::support::Maybe(true), ::emboss::support::Maybe(true)); + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !one_byte().Ok()) return false; + } - if (!has_two_byte().Known()) return false; - if (has_two_byte().ValueOrDefault() && !two_byte().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !two_byte().Ok()) return false; + } - if (!has_three_byte().Known()) return false; - if (has_three_byte().ValueOrDefault() && !three_byte().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !three_byte().Ok()) return false; + } - if (!has_four_byte().Known()) return false; - if (has_four_byte().ValueOrDefault() && !four_byte().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !four_byte().Ok()) return false; + } - if (!has_five_byte().Known()) return false; - if (has_five_byte().ValueOrDefault() && !five_byte().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !five_byte().Ok()) return false; + } - if (!has_six_byte().Known()) return false; - if (has_six_byte().ValueOrDefault() && !six_byte().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !six_byte().Ok()) return false; + } - if (!has_seven_byte().Known()) return false; - if (has_seven_byte().ValueOrDefault() && !seven_byte().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !seven_byte().Ok()) return false; + } - if (!has_eight_byte().Known()) return false; - if (has_eight_byte().ValueOrDefault() && !eight_byte().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !eight_byte().Ok()) return false; + } - if (!has_emboss_reserved_anonymous_field_1().Known()) return false; - if (has_emboss_reserved_anonymous_field_1().ValueOrDefault() && !emboss_reserved_anonymous_field_1().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !emboss_reserved_anonymous_field_1().Ok()) return false; + } - if (!has_four_bit().Known()) return false; - if (has_four_bit().ValueOrDefault() && !four_bit().Ok()) return false; + { + const auto emboss_reserved_local_field_present = emboss_reserved_local_ok_subexpr_1; + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !four_bit().Ok()) return false; + } - if (!has_six_bit().Known()) return false; - if (has_six_bit().ValueOrDefault() && !six_bit().Ok()) return false; + { + const auto emboss_reserved_local_field_present = emboss_reserved_local_ok_subexpr_1; + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !six_bit().Ok()) return false; + } - if (!has_ten_bit().Known()) return false; - if (has_ten_bit().ValueOrDefault() && !ten_bit().Ok()) return false; + { + const auto emboss_reserved_local_field_present = emboss_reserved_local_ok_subexpr_1; + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !ten_bit().Ok()) return false; + } - if (!has_twelve_bit().Known()) return false; - if (has_twelve_bit().ValueOrDefault() && !twelve_bit().Ok()) return false; + { + const auto emboss_reserved_local_field_present = emboss_reserved_local_ok_subexpr_1; + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !twelve_bit().Ok()) return false; + } - if (!has_IntrinsicSizeInBytes().Known()) return false; - if (has_IntrinsicSizeInBytes().ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + } - if (!has_MaxSizeInBytes().Known()) return false; - if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + } - if (!has_MinSizeInBytes().Known()) return false; - if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + } @@ -2004,20 +2076,33 @@ class GenericBcdBigEndianView final { bool Ok() const { if (!IsComplete()) return false; - if (!has_four_byte().Known()) return false; - if (has_four_byte().ValueOrDefault() && !four_byte().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !four_byte().Ok()) return false; + } - if (!has_IntrinsicSizeInBytes().Known()) return false; - if (has_IntrinsicSizeInBytes().ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + } - if (!has_MaxSizeInBytes().Known()) return false; - if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + } - if (!has_MinSizeInBytes().Known()) return false; - if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + } diff --git a/testdata/golden_cpp/bits.emb.h b/testdata/golden_cpp/bits.emb.h index e6f29da..1509726 100644 --- a/testdata/golden_cpp/bits.emb.h +++ b/testdata/golden_cpp/bits.emb.h @@ -142,36 +142,61 @@ class GenericOneByteView final { bool Ok() const { if (!IsComplete()) return false; - if (!has_high_bit().Known()) return false; - if (has_high_bit().ValueOrDefault() && !high_bit().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !high_bit().Ok()) return false; + } - if (!has_less_high_bit().Known()) return false; - if (has_less_high_bit().ValueOrDefault() && !less_high_bit().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !less_high_bit().Ok()) return false; + } - if (!has_mid_nibble().Known()) return false; - if (has_mid_nibble().ValueOrDefault() && !mid_nibble().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !mid_nibble().Ok()) return false; + } - if (!has_less_low_bit().Known()) return false; - if (has_less_low_bit().ValueOrDefault() && !less_low_bit().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !less_low_bit().Ok()) return false; + } - if (!has_low_bit().Known()) return false; - if (has_low_bit().ValueOrDefault() && !low_bit().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !low_bit().Ok()) return false; + } - if (!has_IntrinsicSizeInBits().Known()) return false; - if (has_IntrinsicSizeInBits().ValueOrDefault() && !IntrinsicSizeInBits().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBits().Ok()) return false; + } - if (!has_MaxSizeInBits().Known()) return false; - if (has_MaxSizeInBits().ValueOrDefault() && !MaxSizeInBits().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBits().Ok()) return false; + } - if (!has_MinSizeInBits().Known()) return false; - if (has_MinSizeInBits().ValueOrDefault() && !MinSizeInBits().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBits().Ok()) return false; + } @@ -907,28 +932,47 @@ class GenericTwoByteWithGapsView final { bool Ok() const { if (!IsComplete()) return false; - if (!has_high_bit().Known()) return false; - if (has_high_bit().ValueOrDefault() && !high_bit().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !high_bit().Ok()) return false; + } - if (!has_mid_nibble().Known()) return false; - if (has_mid_nibble().ValueOrDefault() && !mid_nibble().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !mid_nibble().Ok()) return false; + } - if (!has_low_bit().Known()) return false; - if (has_low_bit().ValueOrDefault() && !low_bit().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !low_bit().Ok()) return false; + } - if (!has_IntrinsicSizeInBits().Known()) return false; - if (has_IntrinsicSizeInBits().ValueOrDefault() && !IntrinsicSizeInBits().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBits().Ok()) return false; + } - if (!has_MaxSizeInBits().Known()) return false; - if (has_MaxSizeInBits().ValueOrDefault() && !MaxSizeInBits().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBits().Ok()) return false; + } - if (!has_MinSizeInBits().Known()) return false; - if (has_MinSizeInBits().ValueOrDefault() && !MinSizeInBits().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBits().Ok()) return false; + } @@ -1483,36 +1527,61 @@ class GenericFourByteView final { bool Ok() const { if (!IsComplete()) return false; - if (!has_high_nibble().Known()) return false; - if (has_high_nibble().ValueOrDefault() && !high_nibble().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !high_nibble().Ok()) return false; + } - if (!has_one_byte().Known()) return false; - if (has_one_byte().ValueOrDefault() && !one_byte().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !one_byte().Ok()) return false; + } - if (!has_two_byte().Known()) return false; - if (has_two_byte().ValueOrDefault() && !two_byte().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !two_byte().Ok()) return false; + } - if (!has_raw_low_nibble().Known()) return false; - if (has_raw_low_nibble().ValueOrDefault() && !raw_low_nibble().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !raw_low_nibble().Ok()) return false; + } - if (!has_low_nibble().Known()) return false; - if (has_low_nibble().ValueOrDefault() && !low_nibble().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !low_nibble().Ok()) return false; + } - if (!has_IntrinsicSizeInBits().Known()) return false; - if (has_IntrinsicSizeInBits().ValueOrDefault() && !IntrinsicSizeInBits().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBits().Ok()) return false; + } - if (!has_MaxSizeInBits().Known()) return false; - if (has_MaxSizeInBits().ValueOrDefault() && !MaxSizeInBits().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBits().Ok()) return false; + } - if (!has_MinSizeInBits().Known()) return false; - if (has_MinSizeInBits().ValueOrDefault() && !MinSizeInBits().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBits().Ok()) return false; + } @@ -2274,24 +2343,40 @@ class GenericArrayInBitsView final { bool Ok() const { if (!IsComplete()) return false; - if (!has_lone_flag().Known()) return false; - if (has_lone_flag().ValueOrDefault() && !lone_flag().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !lone_flag().Ok()) return false; + } - if (!has_flags().Known()) return false; - if (has_flags().ValueOrDefault() && !flags().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !flags().Ok()) return false; + } - if (!has_IntrinsicSizeInBits().Known()) return false; - if (has_IntrinsicSizeInBits().ValueOrDefault() && !IntrinsicSizeInBits().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBits().Ok()) return false; + } - if (!has_MaxSizeInBits().Known()) return false; - if (has_MaxSizeInBits().ValueOrDefault() && !MaxSizeInBits().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBits().Ok()) return false; + } - if (!has_MinSizeInBits().Known()) return false; - if (has_MinSizeInBits().ValueOrDefault() && !MinSizeInBits().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBits().Ok()) return false; + } @@ -2777,20 +2862,33 @@ class GenericArrayInBitsInStructView final { bool Ok() const { if (!IsComplete()) return false; - if (!has_array_in_bits().Known()) return false; - if (has_array_in_bits().ValueOrDefault() && !array_in_bits().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !array_in_bits().Ok()) return false; + } - if (!has_IntrinsicSizeInBytes().Known()) return false; - if (has_IntrinsicSizeInBytes().ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + } - if (!has_MaxSizeInBytes().Known()) return false; - if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + } - if (!has_MinSizeInBytes().Known()) return false; - if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + } @@ -3196,32 +3294,54 @@ class GenericStructOfBitsView final { bool Ok() const { if (!IsComplete()) return false; - if (!has_one_byte().Known()) return false; - if (has_one_byte().ValueOrDefault() && !one_byte().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !one_byte().Ok()) return false; + } - if (!has_two_byte().Known()) return false; - if (has_two_byte().ValueOrDefault() && !two_byte().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !two_byte().Ok()) return false; + } - if (!has_four_byte().Known()) return false; - if (has_four_byte().ValueOrDefault() && !four_byte().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !four_byte().Ok()) return false; + } - if (!has_located_byte().Known()) return false; - if (has_located_byte().ValueOrDefault() && !located_byte().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !located_byte().Ok()) return false; + } - if (!has_IntrinsicSizeInBytes().Known()) return false; - if (has_IntrinsicSizeInBytes().ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + } - if (!has_MaxSizeInBytes().Known()) return false; - if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + } - if (!has_MinSizeInBytes().Known()) return false; - if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + } @@ -3881,20 +4001,33 @@ class GenericBitArrayView final { bool Ok() const { if (!IsComplete()) return false; - if (!has_one_byte().Known()) return false; - if (has_one_byte().ValueOrDefault() && !one_byte().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !one_byte().Ok()) return false; + } - if (!has_IntrinsicSizeInBytes().Known()) return false; - if (has_IntrinsicSizeInBytes().ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + } - if (!has_MaxSizeInBytes().Known()) return false; - if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + } - if (!has_MinSizeInBytes().Known()) return false; - if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + } diff --git a/testdata/golden_cpp/complex_offset.emb.h b/testdata/golden_cpp/complex_offset.emb.h index 31889b0..e478bf3 100644 --- a/testdata/golden_cpp/complex_offset.emb.h +++ b/testdata/golden_cpp/complex_offset.emb.h @@ -106,20 +106,33 @@ class GenericLengthView final { bool Ok() const { if (!IsComplete()) return false; - if (!has_length().Known()) return false; - if (has_length().ValueOrDefault() && !length().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !length().Ok()) return false; + } - if (!has_IntrinsicSizeInBytes().Known()) return false; - if (has_IntrinsicSizeInBytes().ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + } - if (!has_MaxSizeInBytes().Known()) return false; - if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + } - if (!has_MinSizeInBytes().Known()) return false; - if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + } @@ -525,24 +538,40 @@ class GenericDataView final { bool Ok() const { if (!IsComplete()) return false; - if (!has_length().Known()) return false; - if (has_length().ValueOrDefault() && !length().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !length().Ok()) return false; + } - if (!has_data().Known()) return false; - if (has_data().ValueOrDefault() && !data().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !data().Ok()) return false; + } - if (!has_IntrinsicSizeInBytes().Known()) return false; - if (has_IntrinsicSizeInBytes().ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + } - if (!has_MaxSizeInBytes().Known()) return false; - if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + } - if (!has_MinSizeInBytes().Known()) return false; - if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + } @@ -1072,84 +1101,145 @@ class GenericPackedFieldsView final { bool Ok() const { if (!IsComplete()) return false; - if (!has_length1().Known()) return false; - if (has_length1().ValueOrDefault() && !length1().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !length1().Ok()) return false; + } - if (!has_data1().Known()) return false; - if (has_data1().ValueOrDefault() && !data1().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !data1().Ok()) return false; + } - if (!has_o1().Known()) return false; - if (has_o1().ValueOrDefault() && !o1().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !o1().Ok()) return false; + } - if (!has_length2().Known()) return false; - if (has_length2().ValueOrDefault() && !length2().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !length2().Ok()) return false; + } - if (!has_data2().Known()) return false; - if (has_data2().ValueOrDefault() && !data2().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !data2().Ok()) return false; + } - if (!has_o2().Known()) return false; - if (has_o2().ValueOrDefault() && !o2().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !o2().Ok()) return false; + } - if (!has_length3().Known()) return false; - if (has_length3().ValueOrDefault() && !length3().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !length3().Ok()) return false; + } - if (!has_data3().Known()) return false; - if (has_data3().ValueOrDefault() && !data3().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !data3().Ok()) return false; + } - if (!has_o3().Known()) return false; - if (has_o3().ValueOrDefault() && !o3().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !o3().Ok()) return false; + } - if (!has_length4().Known()) return false; - if (has_length4().ValueOrDefault() && !length4().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !length4().Ok()) return false; + } - if (!has_data4().Known()) return false; - if (has_data4().ValueOrDefault() && !data4().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !data4().Ok()) return false; + } - if (!has_o4().Known()) return false; - if (has_o4().ValueOrDefault() && !o4().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !o4().Ok()) return false; + } - if (!has_length5().Known()) return false; - if (has_length5().ValueOrDefault() && !length5().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !length5().Ok()) return false; + } - if (!has_data5().Known()) return false; - if (has_data5().ValueOrDefault() && !data5().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !data5().Ok()) return false; + } - if (!has_o5().Known()) return false; - if (has_o5().ValueOrDefault() && !o5().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !o5().Ok()) return false; + } - if (!has_length6().Known()) return false; - if (has_length6().ValueOrDefault() && !length6().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !length6().Ok()) return false; + } - if (!has_data6().Known()) return false; - if (has_data6().ValueOrDefault() && !data6().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !data6().Ok()) return false; + } - if (!has_IntrinsicSizeInBytes().Known()) return false; - if (has_IntrinsicSizeInBytes().ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + } - if (!has_MaxSizeInBytes().Known()) return false; - if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + } - if (!has_MinSizeInBytes().Known()) return false; - if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + } diff --git a/testdata/golden_cpp/complex_structure.emb.h b/testdata/golden_cpp/complex_structure.emb.h index 745976a..2ea9495 100644 --- a/testdata/golden_cpp/complex_structure.emb.h +++ b/testdata/golden_cpp/complex_structure.emb.h @@ -115,28 +115,47 @@ class GenericRegisterLayoutView final { bool Ok() const { if (!IsComplete()) return false; - if (!has_x().Known()) return false; - if (has_x().ValueOrDefault() && !x().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !x().Ok()) return false; + } - if (!has_l().Known()) return false; - if (has_l().ValueOrDefault() && !l().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !l().Ok()) return false; + } - if (!has_h().Known()) return false; - if (has_h().ValueOrDefault() && !h().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !h().Ok()) return false; + } - if (!has_IntrinsicSizeInBits().Known()) return false; - if (has_IntrinsicSizeInBits().ValueOrDefault() && !IntrinsicSizeInBits().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBits().Ok()) return false; + } - if (!has_MaxSizeInBits().Known()) return false; - if (has_MaxSizeInBits().ValueOrDefault() && !MaxSizeInBits().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBits().Ok()) return false; + } - if (!has_MinSizeInBits().Known()) return false; - if (has_MinSizeInBits().ValueOrDefault() && !MinSizeInBits().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBits().Ok()) return false; + } @@ -695,20 +714,33 @@ class GenericArrayElementView final { bool Ok() const { if (!IsComplete()) return false; - if (!has_a().Known()) return false; - if (has_a().ValueOrDefault() && !a().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !a().Ok()) return false; + } - if (!has_IntrinsicSizeInBytes().Known()) return false; - if (has_IntrinsicSizeInBytes().ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + } - if (!has_MaxSizeInBytes().Known()) return false; - if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + } - if (!has_MinSizeInBytes().Known()) return false; - if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + } @@ -1134,32 +1166,54 @@ class GenericEmbossReservedAnonymousField1View final { bool Ok() const { if (!IsComplete()) return false; - if (!has_a0().Known()) return false; - if (has_a0().ValueOrDefault() && !a0().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !a0().Ok()) return false; + } - if (!has_s0().Known()) return false; - if (has_s0().ValueOrDefault() && !s0().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !s0().Ok()) return false; + } - if (!has_l0().Known()) return false; - if (has_l0().ValueOrDefault() && !l0().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !l0().Ok()) return false; + } - if (!has_h0().Known()) return false; - if (has_h0().ValueOrDefault() && !h0().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !h0().Ok()) return false; + } - if (!has_IntrinsicSizeInBits().Known()) return false; - if (has_IntrinsicSizeInBits().ValueOrDefault() && !IntrinsicSizeInBits().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBits().Ok()) return false; + } - if (!has_MaxSizeInBits().Known()) return false; - if (has_MaxSizeInBits().ValueOrDefault() && !MaxSizeInBits().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBits().Ok()) return false; + } - if (!has_MinSizeInBits().Known()) return false; - if (has_MinSizeInBits().ValueOrDefault() && !MinSizeInBits().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBits().Ok()) return false; + } @@ -1791,84 +1845,149 @@ class GenericComplexView final { bool Ok() const { if (!IsComplete()) return false; - if (!has_s().Known()) return false; - if (has_s().ValueOrDefault() && !s().Ok()) return false; + const auto emboss_reserved_local_ok_subexpr_1 = ::emboss::support::And(::emboss::support::Maybe(true), ::emboss::support::Maybe(true)); + const auto emboss_reserved_local_ok_subexpr_2 = a0(); + const auto emboss_reserved_local_ok_subexpr_3 = b2(); + const auto emboss_reserved_local_ok_subexpr_4 = s(); + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !s().Ok()) return false; + } - if (!has_u().Known()) return false; - if (has_u().ValueOrDefault() && !u().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !u().Ok()) return false; + } - if (!has_i().Known()) return false; - if (has_i().ValueOrDefault() && !i().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !i().Ok()) return false; + } - if (!has_b().Known()) return false; - if (has_b().ValueOrDefault() && !b().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !b().Ok()) return false; + } - if (!has_a().Known()) return false; - if (has_a().ValueOrDefault() && !a().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !a().Ok()) return false; + } - if (!has_emboss_reserved_anonymous_field_1().Known()) return false; - if (has_emboss_reserved_anonymous_field_1().ValueOrDefault() && !emboss_reserved_anonymous_field_1().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !emboss_reserved_anonymous_field_1().Ok()) return false; + } - if (!has_a0().Known()) return false; - if (has_a0().ValueOrDefault() && !a0().Ok()) return false; + { + const auto emboss_reserved_local_field_present = emboss_reserved_local_ok_subexpr_1; + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !a0().Ok()) return false; + } - if (!has_s0().Known()) return false; - if (has_s0().ValueOrDefault() && !s0().Ok()) return false; + { + const auto emboss_reserved_local_field_present = emboss_reserved_local_ok_subexpr_1; + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !s0().Ok()) return false; + } - if (!has_l0().Known()) return false; - if (has_l0().ValueOrDefault() && !l0().Ok()) return false; + { + const auto emboss_reserved_local_field_present = emboss_reserved_local_ok_subexpr_1; + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !l0().Ok()) return false; + } - if (!has_h0().Known()) return false; - if (has_h0().ValueOrDefault() && !h0().Ok()) return false; + { + const auto emboss_reserved_local_field_present = emboss_reserved_local_ok_subexpr_1; + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !h0().Ok()) return false; + } - if (!has_e1().Known()) return false; - if (has_e1().ValueOrDefault() && !e1().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !e1().Ok()) return false; + } - if (!has_e2().Known()) return false; - if (has_e2().ValueOrDefault() && !e2().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::GreaterThanOrEqual((emboss_reserved_local_ok_subexpr_2.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_2.UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(128LL))); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !e2().Ok()) return false; + } - if (!has_b2().Known()) return false; - if (has_b2().ValueOrDefault() && !b2().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::LessThan((emboss_reserved_local_ok_subexpr_2.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_2.UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(128LL))); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !b2().Ok()) return false; + } - if (!has_e3().Known()) return false; - if (has_e3().ValueOrDefault() && !e3().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::GreaterThan((emboss_reserved_local_ok_subexpr_3.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_3.UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(25LL))); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !e3().Ok()) return false; + } - if (!has_e4().Known()) return false; - if (has_e4().ValueOrDefault() && !e4().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::And(::emboss::support::GreaterThanOrEqual((emboss_reserved_local_ok_subexpr_4.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_4.UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(4LL))), ::emboss::support::Choice(::emboss::support::GreaterThanOrEqual((emboss_reserved_local_ok_subexpr_2.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_2.UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(80LL))), ::emboss::support::GreaterThanOrEqual((e3().Ok() ? ::emboss::support::Maybe(static_cast(e3().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(128LL))), ::emboss::support::LessThan((emboss_reserved_local_ok_subexpr_3.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_3.UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(50LL))))); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !e4().Ok()) return false; + } - if (!has_e5().Known()) return false; - if (has_e5().ValueOrDefault() && !e5().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::And(::emboss::support::GreaterThanOrEqual((emboss_reserved_local_ok_subexpr_4.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_4.UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(5LL))), ::emboss::support::GreaterThan((e4().Ok() ? ::emboss::support::Maybe(static_cast(e4().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(0LL)))); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !e5().Ok()) return false; + } - if (!has_e0().Known()) return false; - if (has_e0().ValueOrDefault() && !e0().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Or(::emboss::support::LessThan((emboss_reserved_local_ok_subexpr_4.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_4.UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(2LL))), ::emboss::support::LessThan((emboss_reserved_local_ok_subexpr_2.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_2.UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(4LL)))); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !e0().Ok()) return false; + } - if (!has_IntrinsicSizeInBytes().Known()) return false; - if (has_IntrinsicSizeInBytes().ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + } - if (!has_MaxSizeInBytes().Known()) return false; - if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + } - if (!has_MinSizeInBytes().Known()) return false; - if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + } diff --git a/testdata/golden_cpp/condition.emb.h b/testdata/golden_cpp/condition.emb.h index 9d11fb7..1ba3f50 100644 --- a/testdata/golden_cpp/condition.emb.h +++ b/testdata/golden_cpp/condition.emb.h @@ -360,24 +360,40 @@ class GenericBasicConditionalView final { bool Ok() const { if (!IsComplete()) return false; - if (!has_x().Known()) return false; - if (has_x().ValueOrDefault() && !x().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !x().Ok()) return false; + } - if (!has_xc().Known()) return false; - if (has_xc().ValueOrDefault() && !xc().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Equal((x().Ok() ? ::emboss::support::Maybe(static_cast(x().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(0LL))); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !xc().Ok()) return false; + } - if (!has_IntrinsicSizeInBytes().Known()) return false; - if (has_IntrinsicSizeInBytes().ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + } - if (!has_MaxSizeInBytes().Known()) return false; - if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + } - if (!has_MinSizeInBytes().Known()) return false; - if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + } @@ -890,24 +906,40 @@ class GenericNegativeConditionalView final { bool Ok() const { if (!IsComplete()) return false; - if (!has_x().Known()) return false; - if (has_x().ValueOrDefault() && !x().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !x().Ok()) return false; + } - if (!has_xc().Known()) return false; - if (has_xc().ValueOrDefault() && !xc().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::NotEqual((x().Ok() ? ::emboss::support::Maybe(static_cast(x().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(0LL))); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !xc().Ok()) return false; + } - if (!has_IntrinsicSizeInBytes().Known()) return false; - if (has_IntrinsicSizeInBytes().ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + } - if (!has_MaxSizeInBytes().Known()) return false; - if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + } - if (!has_MinSizeInBytes().Known()) return false; - if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + } @@ -1421,28 +1453,47 @@ class GenericConditionalAndUnconditionalOverlappingFinalFieldView final { bool Ok() const { if (!IsComplete()) return false; - if (!has_x().Known()) return false; - if (has_x().ValueOrDefault() && !x().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !x().Ok()) return false; + } - if (!has_xc().Known()) return false; - if (has_xc().ValueOrDefault() && !xc().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Equal((x().Ok() ? ::emboss::support::Maybe(static_cast(x().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(0LL))); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !xc().Ok()) return false; + } - if (!has_z().Known()) return false; - if (has_z().ValueOrDefault() && !z().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !z().Ok()) return false; + } - if (!has_IntrinsicSizeInBytes().Known()) return false; - if (has_IntrinsicSizeInBytes().ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + } - if (!has_MaxSizeInBytes().Known()) return false; - if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + } - if (!has_MinSizeInBytes().Known()) return false; - if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + } @@ -2002,24 +2053,40 @@ class GenericConditionalBasicConditionalFieldFirstView final { bool Ok() const { if (!IsComplete()) return false; - if (!has_x().Known()) return false; - if (has_x().ValueOrDefault() && !x().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !x().Ok()) return false; + } - if (!has_xc().Known()) return false; - if (has_xc().ValueOrDefault() && !xc().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Equal((x().Ok() ? ::emboss::support::Maybe(static_cast(x().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(0LL))); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !xc().Ok()) return false; + } - if (!has_IntrinsicSizeInBytes().Known()) return false; - if (has_IntrinsicSizeInBytes().ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + } - if (!has_MaxSizeInBytes().Known()) return false; - if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + } - if (!has_MinSizeInBytes().Known()) return false; - if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + } @@ -2503,28 +2570,47 @@ class GenericConditionalAndDynamicLocationView final { bool Ok() const { if (!IsComplete()) return false; - if (!has_x().Known()) return false; - if (has_x().ValueOrDefault() && !x().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !x().Ok()) return false; + } - if (!has_y().Known()) return false; - if (has_y().ValueOrDefault() && !y().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !y().Ok()) return false; + } - if (!has_xc().Known()) return false; - if (has_xc().ValueOrDefault() && !xc().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Equal((x().Ok() ? ::emboss::support::Maybe(static_cast(x().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(0LL))); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !xc().Ok()) return false; + } - if (!has_IntrinsicSizeInBytes().Known()) return false; - if (has_IntrinsicSizeInBytes().ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + } - if (!has_MaxSizeInBytes().Known()) return false; - if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + } - if (!has_MinSizeInBytes().Known()) return false; - if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + } @@ -3117,24 +3203,40 @@ class GenericConditionUsesMinIntView final { bool Ok() const { if (!IsComplete()) return false; - if (!has_x().Known()) return false; - if (has_x().ValueOrDefault() && !x().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !x().Ok()) return false; + } - if (!has_xc().Known()) return false; - if (has_xc().ValueOrDefault() && !xc().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Equal(::emboss::support::Difference((x().Ok() ? ::emboss::support::Maybe(static_cast(x().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(9223372036854775680LL))), ::emboss::support::Maybe(static_cast(-9223372036854775807LL - 1))); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !xc().Ok()) return false; + } - if (!has_IntrinsicSizeInBytes().Known()) return false; - if (has_IntrinsicSizeInBytes().ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + } - if (!has_MaxSizeInBytes().Known()) return false; - if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + } - if (!has_MinSizeInBytes().Known()) return false; - if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + } @@ -3649,28 +3751,47 @@ class GenericNestedConditionalView final { bool Ok() const { if (!IsComplete()) return false; - if (!has_x().Known()) return false; - if (has_x().ValueOrDefault() && !x().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !x().Ok()) return false; + } - if (!has_xc().Known()) return false; - if (has_xc().ValueOrDefault() && !xc().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Equal((x().Ok() ? ::emboss::support::Maybe(static_cast(x().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(0LL))); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !xc().Ok()) return false; + } - if (!has_xcc().Known()) return false; - if (has_xcc().ValueOrDefault() && !xcc().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Equal((xc().Ok() ? ::emboss::support::Maybe(static_cast(xc().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(0LL))); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !xcc().Ok()) return false; + } - if (!has_IntrinsicSizeInBytes().Known()) return false; - if (has_IntrinsicSizeInBytes().ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + } - if (!has_MaxSizeInBytes().Known()) return false; - if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + } - if (!has_MinSizeInBytes().Known()) return false; - if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + } @@ -4265,28 +4386,48 @@ class GenericCorrectNestedConditionalView final { bool Ok() const { if (!IsComplete()) return false; - if (!has_x().Known()) return false; - if (has_x().ValueOrDefault() && !x().Ok()) return false; + const auto emboss_reserved_local_ok_subexpr_1 = x(); + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !x().Ok()) return false; + } - if (!has_xc().Known()) return false; - if (has_xc().ValueOrDefault() && !xc().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Equal((emboss_reserved_local_ok_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(0LL))); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !xc().Ok()) return false; + } - if (!has_xcc().Known()) return false; - if (has_xcc().ValueOrDefault() && !xcc().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::And(::emboss::support::Equal((emboss_reserved_local_ok_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(0LL))), ::emboss::support::Equal((xc().Ok() ? ::emboss::support::Maybe(static_cast(xc().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(0LL)))); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !xcc().Ok()) return false; + } - if (!has_IntrinsicSizeInBytes().Known()) return false; - if (has_IntrinsicSizeInBytes().ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + } - if (!has_MaxSizeInBytes().Known()) return false; - if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + } - if (!has_MinSizeInBytes().Known()) return false; - if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + } @@ -4881,24 +5022,40 @@ class GenericAlwaysFalseConditionView final { bool Ok() const { if (!IsComplete()) return false; - if (!has_x().Known()) return false; - if (has_x().ValueOrDefault() && !x().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !x().Ok()) return false; + } - if (!has_xc().Known()) return false; - if (has_xc().ValueOrDefault() && !xc().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(false); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !xc().Ok()) return false; + } - if (!has_IntrinsicSizeInBytes().Known()) return false; - if (has_IntrinsicSizeInBytes().ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + } - if (!has_MaxSizeInBytes().Known()) return false; - if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + } - if (!has_MinSizeInBytes().Known()) return false; - if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + } @@ -5380,20 +5537,33 @@ class GenericOnlyAlwaysFalseConditionView final { bool Ok() const { if (!IsComplete()) return false; - if (!has_xc().Known()) return false; - if (has_xc().ValueOrDefault() && !xc().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(false); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !xc().Ok()) return false; + } - if (!has_IntrinsicSizeInBytes().Known()) return false; - if (has_IntrinsicSizeInBytes().ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + } - if (!has_MaxSizeInBytes().Known()) return false; - if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + } - if (!has_MinSizeInBytes().Known()) return false; - if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + } @@ -5797,16 +5967,26 @@ class GenericEmptyStructView final { bool Ok() const { if (!IsComplete()) return false; - if (!has_IntrinsicSizeInBytes().Known()) return false; - if (has_IntrinsicSizeInBytes().ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + } - if (!has_MaxSizeInBytes().Known()) return false; - if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + } - if (!has_MinSizeInBytes().Known()) return false; - if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + } @@ -6140,28 +6320,47 @@ class GenericAlwaysFalseConditionDynamicSizeView final { bool Ok() const { if (!IsComplete()) return false; - if (!has_x().Known()) return false; - if (has_x().ValueOrDefault() && !x().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !x().Ok()) return false; + } - if (!has_y().Known()) return false; - if (has_y().ValueOrDefault() && !y().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !y().Ok()) return false; + } - if (!has_xc().Known()) return false; - if (has_xc().ValueOrDefault() && !xc().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(false); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !xc().Ok()) return false; + } - if (!has_IntrinsicSizeInBytes().Known()) return false; - if (has_IntrinsicSizeInBytes().ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + } - if (!has_MaxSizeInBytes().Known()) return false; - if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + } - if (!has_MinSizeInBytes().Known()) return false; - if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + } @@ -6752,28 +6951,47 @@ class GenericConditionDoesNotContributeToSizeView final { bool Ok() const { if (!IsComplete()) return false; - if (!has_x().Known()) return false; - if (has_x().ValueOrDefault() && !x().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !x().Ok()) return false; + } - if (!has_xc().Known()) return false; - if (has_xc().ValueOrDefault() && !xc().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Equal((x().Ok() ? ::emboss::support::Maybe(static_cast(x().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(0LL))); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !xc().Ok()) return false; + } - if (!has_y().Known()) return false; - if (has_y().ValueOrDefault() && !y().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !y().Ok()) return false; + } - if (!has_IntrinsicSizeInBytes().Known()) return false; - if (has_IntrinsicSizeInBytes().ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + } - if (!has_MaxSizeInBytes().Known()) return false; - if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + } - if (!has_MinSizeInBytes().Known()) return false; - if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + } @@ -7421,28 +7639,48 @@ class GenericEnumConditionView final { bool Ok() const { if (!IsComplete()) return false; - if (!has_x().Known()) return false; - if (has_x().ValueOrDefault() && !x().Ok()) return false; + const auto emboss_reserved_local_ok_subexpr_1 = x(); + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !x().Ok()) return false; + } - if (!has_xc().Known()) return false; - if (has_xc().ValueOrDefault() && !xc().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Equal((emboss_reserved_local_ok_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(1))); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !xc().Ok()) return false; + } - if (!has_xc2().Known()) return false; - if (has_xc2().ValueOrDefault() && !xc2().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::GreaterThan((emboss_reserved_local_ok_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(0))); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !xc2().Ok()) return false; + } - if (!has_IntrinsicSizeInBytes().Known()) return false; - if (has_IntrinsicSizeInBytes().ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + } - if (!has_MaxSizeInBytes().Known()) return false; - if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + } - if (!has_MinSizeInBytes().Known()) return false; - if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + } @@ -8035,24 +8273,40 @@ class GenericNegativeEnumConditionView final { bool Ok() const { if (!IsComplete()) return false; - if (!has_x().Known()) return false; - if (has_x().ValueOrDefault() && !x().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !x().Ok()) return false; + } - if (!has_xc().Known()) return false; - if (has_xc().ValueOrDefault() && !xc().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::NotEqual((x().Ok() ? ::emboss::support::Maybe(static_cast(x().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(1))); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !xc().Ok()) return false; + } - if (!has_IntrinsicSizeInBytes().Known()) return false; - if (has_IntrinsicSizeInBytes().ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + } - if (!has_MaxSizeInBytes().Known()) return false; - if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + } - if (!has_MinSizeInBytes().Known()) return false; - if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + } @@ -8566,24 +8820,40 @@ class GenericLessThanConditionView final { bool Ok() const { if (!IsComplete()) return false; - if (!has_x().Known()) return false; - if (has_x().ValueOrDefault() && !x().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !x().Ok()) return false; + } - if (!has_xc().Known()) return false; - if (has_xc().ValueOrDefault() && !xc().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::LessThan((x().Ok() ? ::emboss::support::Maybe(static_cast(x().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(5LL))); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !xc().Ok()) return false; + } - if (!has_IntrinsicSizeInBytes().Known()) return false; - if (has_IntrinsicSizeInBytes().ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + } - if (!has_MaxSizeInBytes().Known()) return false; - if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + } - if (!has_MinSizeInBytes().Known()) return false; - if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + } @@ -9096,24 +9366,40 @@ class GenericLessThanOrEqualConditionView final { bool Ok() const { if (!IsComplete()) return false; - if (!has_x().Known()) return false; - if (has_x().ValueOrDefault() && !x().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !x().Ok()) return false; + } - if (!has_xc().Known()) return false; - if (has_xc().ValueOrDefault() && !xc().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::LessThanOrEqual((x().Ok() ? ::emboss::support::Maybe(static_cast(x().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(5LL))); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !xc().Ok()) return false; + } - if (!has_IntrinsicSizeInBytes().Known()) return false; - if (has_IntrinsicSizeInBytes().ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + } - if (!has_MaxSizeInBytes().Known()) return false; - if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + } - if (!has_MinSizeInBytes().Known()) return false; - if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + } @@ -9626,24 +9912,40 @@ class GenericGreaterThanOrEqualConditionView final { bool Ok() const { if (!IsComplete()) return false; - if (!has_x().Known()) return false; - if (has_x().ValueOrDefault() && !x().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !x().Ok()) return false; + } - if (!has_xc().Known()) return false; - if (has_xc().ValueOrDefault() && !xc().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::GreaterThanOrEqual((x().Ok() ? ::emboss::support::Maybe(static_cast(x().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(5LL))); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !xc().Ok()) return false; + } - if (!has_IntrinsicSizeInBytes().Known()) return false; - if (has_IntrinsicSizeInBytes().ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + } - if (!has_MaxSizeInBytes().Known()) return false; - if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + } - if (!has_MinSizeInBytes().Known()) return false; - if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + } @@ -10156,24 +10458,40 @@ class GenericGreaterThanConditionView final { bool Ok() const { if (!IsComplete()) return false; - if (!has_x().Known()) return false; - if (has_x().ValueOrDefault() && !x().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !x().Ok()) return false; + } - if (!has_xc().Known()) return false; - if (has_xc().ValueOrDefault() && !xc().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::GreaterThan((x().Ok() ? ::emboss::support::Maybe(static_cast(x().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(5LL))); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !xc().Ok()) return false; + } - if (!has_IntrinsicSizeInBytes().Known()) return false; - if (has_IntrinsicSizeInBytes().ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + } - if (!has_MaxSizeInBytes().Known()) return false; - if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + } - if (!has_MinSizeInBytes().Known()) return false; - if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + } @@ -10687,28 +11005,49 @@ class GenericRangeConditionView final { bool Ok() const { if (!IsComplete()) return false; - if (!has_x().Known()) return false; - if (has_x().ValueOrDefault() && !x().Ok()) return false; + const auto emboss_reserved_local_ok_subexpr_1 = x(); + const auto emboss_reserved_local_ok_subexpr_2 = y(); + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !x().Ok()) return false; + } - if (!has_y().Known()) return false; - if (has_y().ValueOrDefault() && !y().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !y().Ok()) return false; + } - if (!has_xc().Known()) return false; - if (has_xc().ValueOrDefault() && !xc().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::And(::emboss::support::And(::emboss::support::LessThan(::emboss::support::Maybe(static_cast(5LL)), (emboss_reserved_local_ok_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe())), ::emboss::support::LessThanOrEqual((emboss_reserved_local_ok_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()), (emboss_reserved_local_ok_subexpr_2.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_2.UncheckedRead())) : ::emboss::support::Maybe()))), ::emboss::support::LessThan((emboss_reserved_local_ok_subexpr_2.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_2.UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(10LL)))); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !xc().Ok()) return false; + } - if (!has_IntrinsicSizeInBytes().Known()) return false; - if (has_IntrinsicSizeInBytes().ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + } - if (!has_MaxSizeInBytes().Known()) return false; - if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + } - if (!has_MinSizeInBytes().Known()) return false; - if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + } @@ -11305,28 +11644,49 @@ class GenericReverseRangeConditionView final { bool Ok() const { if (!IsComplete()) return false; - if (!has_x().Known()) return false; - if (has_x().ValueOrDefault() && !x().Ok()) return false; + const auto emboss_reserved_local_ok_subexpr_1 = y(); + const auto emboss_reserved_local_ok_subexpr_2 = x(); + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !x().Ok()) return false; + } - if (!has_y().Known()) return false; - if (has_y().ValueOrDefault() && !y().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !y().Ok()) return false; + } - if (!has_xc().Known()) return false; - if (has_xc().ValueOrDefault() && !xc().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::And(::emboss::support::And(::emboss::support::GreaterThan(::emboss::support::Maybe(static_cast(10LL)), (emboss_reserved_local_ok_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe())), ::emboss::support::GreaterThanOrEqual((emboss_reserved_local_ok_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()), (emboss_reserved_local_ok_subexpr_2.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_2.UncheckedRead())) : ::emboss::support::Maybe()))), ::emboss::support::GreaterThan((emboss_reserved_local_ok_subexpr_2.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_2.UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(5LL)))); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !xc().Ok()) return false; + } - if (!has_IntrinsicSizeInBytes().Known()) return false; - if (has_IntrinsicSizeInBytes().ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + } - if (!has_MaxSizeInBytes().Known()) return false; - if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + } - if (!has_MinSizeInBytes().Known()) return false; - if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + } @@ -11923,28 +12283,47 @@ class GenericAndConditionView final { bool Ok() const { if (!IsComplete()) return false; - if (!has_x().Known()) return false; - if (has_x().ValueOrDefault() && !x().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !x().Ok()) return false; + } - if (!has_y().Known()) return false; - if (has_y().ValueOrDefault() && !y().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !y().Ok()) return false; + } - if (!has_xc().Known()) return false; - if (has_xc().ValueOrDefault() && !xc().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::And(::emboss::support::Equal((x().Ok() ? ::emboss::support::Maybe(static_cast(x().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(5LL))), ::emboss::support::Equal((y().Ok() ? ::emboss::support::Maybe(static_cast(y().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(5LL)))); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !xc().Ok()) return false; + } - if (!has_IntrinsicSizeInBytes().Known()) return false; - if (has_IntrinsicSizeInBytes().ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + } - if (!has_MaxSizeInBytes().Known()) return false; - if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + } - if (!has_MinSizeInBytes().Known()) return false; - if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + } @@ -12539,28 +12918,47 @@ class GenericOrConditionView final { bool Ok() const { if (!IsComplete()) return false; - if (!has_x().Known()) return false; - if (has_x().ValueOrDefault() && !x().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !x().Ok()) return false; + } - if (!has_y().Known()) return false; - if (has_y().ValueOrDefault() && !y().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !y().Ok()) return false; + } - if (!has_xc().Known()) return false; - if (has_xc().ValueOrDefault() && !xc().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Or(::emboss::support::Equal((x().Ok() ? ::emboss::support::Maybe(static_cast(x().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(5LL))), ::emboss::support::Equal((y().Ok() ? ::emboss::support::Maybe(static_cast(y().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(5LL)))); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !xc().Ok()) return false; + } - if (!has_IntrinsicSizeInBytes().Known()) return false; - if (has_IntrinsicSizeInBytes().ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + } - if (!has_MaxSizeInBytes().Known()) return false; - if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + } - if (!has_MinSizeInBytes().Known()) return false; - if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + } @@ -13243,32 +13641,54 @@ class GenericChoiceConditionView final { bool Ok() const { if (!IsComplete()) return false; - if (!has_field().Known()) return false; - if (has_field().ValueOrDefault() && !field().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !field().Ok()) return false; + } - if (!has_x().Known()) return false; - if (has_x().ValueOrDefault() && !x().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !x().Ok()) return false; + } - if (!has_y().Known()) return false; - if (has_y().ValueOrDefault() && !y().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !y().Ok()) return false; + } - if (!has_xyc().Known()) return false; - if (has_xyc().ValueOrDefault() && !xyc().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Equal(::emboss::support::Choice(::emboss::support::Equal((field().Ok() ? ::emboss::support::Maybe(static_cast(field().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(1))), (x().Ok() ? ::emboss::support::Maybe(static_cast(x().UncheckedRead())) : ::emboss::support::Maybe()), (y().Ok() ? ::emboss::support::Maybe(static_cast(y().UncheckedRead())) : ::emboss::support::Maybe())), ::emboss::support::Maybe(static_cast(5LL))); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !xyc().Ok()) return false; + } - if (!has_IntrinsicSizeInBytes().Known()) return false; - if (has_IntrinsicSizeInBytes().ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + } - if (!has_MaxSizeInBytes().Known()) return false; - if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + } - if (!has_MinSizeInBytes().Known()) return false; - if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + } @@ -13948,24 +14368,40 @@ class GenericEmbossReservedAnonymousField3View final { bool Ok() const { if (!IsComplete()) return false; - if (!has_has_top().Known()) return false; - if (has_has_top().ValueOrDefault() && !has_top().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !has_top().Ok()) return false; + } - if (!has_has_bottom().Known()) return false; - if (has_has_bottom().ValueOrDefault() && !has_bottom().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !has_bottom().Ok()) return false; + } - if (!has_IntrinsicSizeInBits().Known()) return false; - if (has_IntrinsicSizeInBits().ValueOrDefault() && !IntrinsicSizeInBits().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBits().Ok()) return false; + } - if (!has_MaxSizeInBits().Known()) return false; - if (has_MaxSizeInBits().ValueOrDefault() && !MaxSizeInBits().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBits().Ok()) return false; + } - if (!has_MinSizeInBits().Known()) return false; - if (has_MinSizeInBits().ValueOrDefault() && !MinSizeInBits().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBits().Ok()) return false; + } @@ -14443,28 +14879,48 @@ class GenericContainsBitsView final { bool Ok() const { if (!IsComplete()) return false; - if (!has_emboss_reserved_anonymous_field_3().Known()) return false; - if (has_emboss_reserved_anonymous_field_3().ValueOrDefault() && !emboss_reserved_anonymous_field_3().Ok()) return false; + const auto emboss_reserved_local_ok_subexpr_1 = ::emboss::support::And(::emboss::support::Maybe(true), ::emboss::support::Maybe(true)); + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !emboss_reserved_anonymous_field_3().Ok()) return false; + } - if (!has_has_top().Known()) return false; - if (has_has_top().ValueOrDefault() && !has_top().Ok()) return false; + { + const auto emboss_reserved_local_field_present = emboss_reserved_local_ok_subexpr_1; + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !has_top().Ok()) return false; + } - if (!has_has_bottom().Known()) return false; - if (has_has_bottom().ValueOrDefault() && !has_bottom().Ok()) return false; + { + const auto emboss_reserved_local_field_present = emboss_reserved_local_ok_subexpr_1; + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !has_bottom().Ok()) return false; + } - if (!has_IntrinsicSizeInBytes().Known()) return false; - if (has_IntrinsicSizeInBytes().ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + } - if (!has_MaxSizeInBytes().Known()) return false; - if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + } - if (!has_MinSizeInBytes().Known()) return false; - if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + } @@ -14920,24 +15376,40 @@ class GenericContainsContainsBitsView final { bool Ok() const { if (!IsComplete()) return false; - if (!has_condition().Known()) return false; - if (has_condition().ValueOrDefault() && !condition().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !condition().Ok()) return false; + } - if (!has_top().Known()) return false; - if (has_top().ValueOrDefault() && !top().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Equal((condition().has_top().Ok() ? ::emboss::support::Maybe(static_cast(condition().has_top().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(1LL))); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !top().Ok()) return false; + } - if (!has_IntrinsicSizeInBytes().Known()) return false; - if (has_IntrinsicSizeInBytes().ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + } - if (!has_MaxSizeInBytes().Known()) return false; - if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + } - if (!has_MinSizeInBytes().Known()) return false; - if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + } @@ -15455,28 +15927,47 @@ class GenericType0View final { bool Ok() const { if (!IsComplete()) return false; - if (!has_a().Known()) return false; - if (has_a().ValueOrDefault() && !a().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !a().Ok()) return false; + } - if (!has_b().Known()) return false; - if (has_b().ValueOrDefault() && !b().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !b().Ok()) return false; + } - if (!has_c().Known()) return false; - if (has_c().ValueOrDefault() && !c().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !c().Ok()) return false; + } - if (!has_IntrinsicSizeInBytes().Known()) return false; - if (has_IntrinsicSizeInBytes().ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + } - if (!has_MaxSizeInBytes().Known()) return false; - if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + } - if (!has_MinSizeInBytes().Known()) return false; - if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + } @@ -16038,28 +16529,47 @@ class GenericType1View final { bool Ok() const { if (!IsComplete()) return false; - if (!has_a().Known()) return false; - if (has_a().ValueOrDefault() && !a().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !a().Ok()) return false; + } - if (!has_b().Known()) return false; - if (has_b().ValueOrDefault() && !b().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !b().Ok()) return false; + } - if (!has_c().Known()) return false; - if (has_c().ValueOrDefault() && !c().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !c().Ok()) return false; + } - if (!has_IntrinsicSizeInBytes().Known()) return false; - if (has_IntrinsicSizeInBytes().ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + } - if (!has_MaxSizeInBytes().Known()) return false; - if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + } - if (!has_MinSizeInBytes().Known()) return false; - if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + } @@ -16614,28 +17124,48 @@ class GenericConditionalInlineView final { bool Ok() const { if (!IsComplete()) return false; - if (!has_payload_id().Known()) return false; - if (has_payload_id().ValueOrDefault() && !payload_id().Ok()) return false; + const auto emboss_reserved_local_ok_subexpr_1 = payload_id(); + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !payload_id().Ok()) return false; + } - if (!has_type_0().Known()) return false; - if (has_type_0().ValueOrDefault() && !type_0().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Equal((emboss_reserved_local_ok_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(0LL))); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !type_0().Ok()) return false; + } - if (!has_type_1().Known()) return false; - if (has_type_1().ValueOrDefault() && !type_1().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Equal((emboss_reserved_local_ok_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(1LL))); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !type_1().Ok()) return false; + } - if (!has_IntrinsicSizeInBytes().Known()) return false; - if (has_IntrinsicSizeInBytes().ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + } - if (!has_MaxSizeInBytes().Known()) return false; - if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + } - if (!has_MinSizeInBytes().Known()) return false; - if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + } @@ -17232,28 +17762,47 @@ class GenericEmbossReservedAnonymousField2View final { bool Ok() const { if (!IsComplete()) return false; - if (!has_low().Known()) return false; - if (has_low().ValueOrDefault() && !low().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !low().Ok()) return false; + } - if (!has_mid().Known()) return false; - if (has_mid().ValueOrDefault() && !mid().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Equal((low().Ok() ? ::emboss::support::Maybe(static_cast(low().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(1LL))); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !mid().Ok()) return false; + } - if (!has_high().Known()) return false; - if (has_high().ValueOrDefault() && !high().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !high().Ok()) return false; + } - if (!has_IntrinsicSizeInBits().Known()) return false; - if (has_IntrinsicSizeInBits().ValueOrDefault() && !IntrinsicSizeInBits().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBits().Ok()) return false; + } - if (!has_MaxSizeInBits().Known()) return false; - if (has_MaxSizeInBits().ValueOrDefault() && !MaxSizeInBits().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBits().Ok()) return false; + } - if (!has_MinSizeInBits().Known()) return false; - if (has_MinSizeInBits().ValueOrDefault() && !MinSizeInBits().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBits().Ok()) return false; + } @@ -17808,36 +18357,62 @@ class GenericConditionalAnonymousView final { bool Ok() const { if (!IsComplete()) return false; - if (!has_x().Known()) return false; - if (has_x().ValueOrDefault() && !x().Ok()) return false; + const auto emboss_reserved_local_ok_subexpr_1 = has_emboss_reserved_anonymous_field_2(); + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !x().Ok()) return false; + } - if (!has_emboss_reserved_anonymous_field_2().Known()) return false; - if (has_emboss_reserved_anonymous_field_2().ValueOrDefault() && !emboss_reserved_anonymous_field_2().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::GreaterThan((x().Ok() ? ::emboss::support::Maybe(static_cast(x().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(10LL))); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !emboss_reserved_anonymous_field_2().Ok()) return false; + } - if (!has_low().Known()) return false; - if (has_low().ValueOrDefault() && !low().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::And(emboss_reserved_local_ok_subexpr_1, ::emboss::support::Maybe(true)); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !low().Ok()) return false; + } - if (!has_mid().Known()) return false; - if (has_mid().ValueOrDefault() && !mid().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::And(emboss_reserved_local_ok_subexpr_1, emboss_reserved_anonymous_field_2().has_mid()); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !mid().Ok()) return false; + } - if (!has_high().Known()) return false; - if (has_high().ValueOrDefault() && !high().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::And(emboss_reserved_local_ok_subexpr_1, ::emboss::support::Maybe(true)); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !high().Ok()) return false; + } - if (!has_IntrinsicSizeInBytes().Known()) return false; - if (has_IntrinsicSizeInBytes().ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + } - if (!has_MaxSizeInBytes().Known()) return false; - if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + } - if (!has_MinSizeInBytes().Known()) return false; - if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + } @@ -18450,20 +19025,33 @@ class GenericEmbossReservedAnonymousField1View final { bool Ok() const { if (!IsComplete()) return false; - if (!has_enabled().Known()) return false; - if (has_enabled().ValueOrDefault() && !enabled().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !enabled().Ok()) return false; + } - if (!has_IntrinsicSizeInBits().Known()) return false; - if (has_IntrinsicSizeInBits().ValueOrDefault() && !IntrinsicSizeInBits().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBits().Ok()) return false; + } - if (!has_MaxSizeInBits().Known()) return false; - if (has_MaxSizeInBits().ValueOrDefault() && !MaxSizeInBits().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBits().Ok()) return false; + } - if (!has_MinSizeInBits().Known()) return false; - if (has_MinSizeInBits().ValueOrDefault() && !MinSizeInBits().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBits().Ok()) return false; + } @@ -18864,28 +19452,47 @@ class GenericConditionalOnFlagView final { bool Ok() const { if (!IsComplete()) return false; - if (!has_emboss_reserved_anonymous_field_1().Known()) return false; - if (has_emboss_reserved_anonymous_field_1().ValueOrDefault() && !emboss_reserved_anonymous_field_1().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !emboss_reserved_anonymous_field_1().Ok()) return false; + } - if (!has_enabled().Known()) return false; - if (has_enabled().ValueOrDefault() && !enabled().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::And(::emboss::support::Maybe(true), ::emboss::support::Maybe(true)); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !enabled().Ok()) return false; + } - if (!has_value().Known()) return false; - if (has_value().ValueOrDefault() && !value().Ok()) return false; + { + const auto emboss_reserved_local_field_present = (enabled().Ok() ? ::emboss::support::Maybe(static_cast(enabled().UncheckedRead())) : ::emboss::support::Maybe()); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !value().Ok()) return false; + } - if (!has_IntrinsicSizeInBytes().Known()) return false; - if (has_IntrinsicSizeInBytes().ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + } - if (!has_MaxSizeInBytes().Known()) return false; - if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + } - if (!has_MinSizeInBytes().Known()) return false; - if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + } diff --git a/testdata/golden_cpp/dynamic_size.emb.h b/testdata/golden_cpp/dynamic_size.emb.h index 8c5f5b5..cfbe3b7 100644 --- a/testdata/golden_cpp/dynamic_size.emb.h +++ b/testdata/golden_cpp/dynamic_size.emb.h @@ -174,36 +174,61 @@ class GenericMessageView final { bool Ok() const { if (!IsComplete()) return false; - if (!has_header_length().Known()) return false; - if (has_header_length().ValueOrDefault() && !header_length().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !header_length().Ok()) return false; + } - if (!has_message_length().Known()) return false; - if (has_message_length().ValueOrDefault() && !message_length().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !message_length().Ok()) return false; + } - if (!has_padding().Known()) return false; - if (has_padding().ValueOrDefault() && !padding().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !padding().Ok()) return false; + } - if (!has_message().Known()) return false; - if (has_message().ValueOrDefault() && !message().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !message().Ok()) return false; + } - if (!has_crc32().Known()) return false; - if (has_crc32().ValueOrDefault() && !crc32().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !crc32().Ok()) return false; + } - if (!has_IntrinsicSizeInBytes().Known()) return false; - if (has_IntrinsicSizeInBytes().ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + } - if (!has_MaxSizeInBytes().Known()) return false; - if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + } - if (!has_MinSizeInBytes().Known()) return false; - if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + } @@ -962,24 +987,40 @@ class GenericImageView final { bool Ok() const { if (!IsComplete()) return false; - if (!has_size().Known()) return false; - if (has_size().ValueOrDefault() && !size().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !size().Ok()) return false; + } - if (!has_pixels().Known()) return false; - if (has_pixels().ValueOrDefault() && !pixels().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !pixels().Ok()) return false; + } - if (!has_IntrinsicSizeInBytes().Known()) return false; - if (has_IntrinsicSizeInBytes().ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + } - if (!has_MaxSizeInBytes().Known()) return false; - if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + } - if (!has_MinSizeInBytes().Known()) return false; - if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + } @@ -1509,40 +1550,68 @@ class GenericTwoRegionsView final { bool Ok() const { if (!IsComplete()) return false; - if (!has_b_end().Known()) return false; - if (has_b_end().ValueOrDefault() && !b_end().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !b_end().Ok()) return false; + } - if (!has_b_start().Known()) return false; - if (has_b_start().ValueOrDefault() && !b_start().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !b_start().Ok()) return false; + } - if (!has_a_size().Known()) return false; - if (has_a_size().ValueOrDefault() && !a_size().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !a_size().Ok()) return false; + } - if (!has_a_start().Known()) return false; - if (has_a_start().ValueOrDefault() && !a_start().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !a_start().Ok()) return false; + } - if (!has_region_a().Known()) return false; - if (has_region_a().ValueOrDefault() && !region_a().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !region_a().Ok()) return false; + } - if (!has_region_b().Known()) return false; - if (has_region_b().ValueOrDefault() && !region_b().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !region_b().Ok()) return false; + } - if (!has_IntrinsicSizeInBytes().Known()) return false; - if (has_IntrinsicSizeInBytes().ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + } - if (!has_MaxSizeInBytes().Known()) return false; - if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + } - if (!has_MinSizeInBytes().Known()) return false; - if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + } @@ -2381,28 +2450,47 @@ class GenericMultipliedSizeView final { bool Ok() const { if (!IsComplete()) return false; - if (!has_width().Known()) return false; - if (has_width().ValueOrDefault() && !width().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !width().Ok()) return false; + } - if (!has_height().Known()) return false; - if (has_height().ValueOrDefault() && !height().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !height().Ok()) return false; + } - if (!has_data().Known()) return false; - if (has_data().ValueOrDefault() && !data().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !data().Ok()) return false; + } - if (!has_IntrinsicSizeInBytes().Known()) return false; - if (has_IntrinsicSizeInBytes().ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + } - if (!has_MaxSizeInBytes().Known()) return false; - if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + } - if (!has_MinSizeInBytes().Known()) return false; - if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + } @@ -3006,52 +3094,89 @@ class GenericNegativeTermsInSizesView final { bool Ok() const { if (!IsComplete()) return false; - if (!has_a().Known()) return false; - if (has_a().ValueOrDefault() && !a().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !a().Ok()) return false; + } - if (!has_b().Known()) return false; - if (has_b().ValueOrDefault() && !b().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !b().Ok()) return false; + } - if (!has_c().Known()) return false; - if (has_c().ValueOrDefault() && !c().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !c().Ok()) return false; + } - if (!has_a_minus_b().Known()) return false; - if (has_a_minus_b().ValueOrDefault() && !a_minus_b().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !a_minus_b().Ok()) return false; + } - if (!has_a_minus_2b().Known()) return false; - if (has_a_minus_2b().ValueOrDefault() && !a_minus_2b().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !a_minus_2b().Ok()) return false; + } - if (!has_a_minus_b_minus_c().Known()) return false; - if (has_a_minus_b_minus_c().ValueOrDefault() && !a_minus_b_minus_c().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !a_minus_b_minus_c().Ok()) return false; + } - if (!has_ten_minus_a().Known()) return false; - if (has_ten_minus_a().ValueOrDefault() && !ten_minus_a().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !ten_minus_a().Ok()) return false; + } - if (!has_a_minus_2c().Known()) return false; - if (has_a_minus_2c().ValueOrDefault() && !a_minus_2c().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !a_minus_2c().Ok()) return false; + } - if (!has_a_minus_c().Known()) return false; - if (has_a_minus_c().ValueOrDefault() && !a_minus_c().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !a_minus_c().Ok()) return false; + } - if (!has_IntrinsicSizeInBytes().Known()) return false; - if (has_IntrinsicSizeInBytes().ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + } - if (!has_MaxSizeInBytes().Known()) return false; - if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + } - if (!has_MinSizeInBytes().Known()) return false; - if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + } @@ -4154,24 +4279,40 @@ class GenericNegativeTermInLocationView final { bool Ok() const { if (!IsComplete()) return false; - if (!has_a().Known()) return false; - if (has_a().ValueOrDefault() && !a().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !a().Ok()) return false; + } - if (!has_b().Known()) return false; - if (has_b().ValueOrDefault() && !b().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !b().Ok()) return false; + } - if (!has_IntrinsicSizeInBytes().Known()) return false; - if (has_IntrinsicSizeInBytes().ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + } - if (!has_MaxSizeInBytes().Known()) return false; - if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + } - if (!has_MinSizeInBytes().Known()) return false; - if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + } @@ -4687,32 +4828,54 @@ class GenericChainedSizeView final { bool Ok() const { if (!IsComplete()) return false; - if (!has_a().Known()) return false; - if (has_a().ValueOrDefault() && !a().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !a().Ok()) return false; + } - if (!has_b().Known()) return false; - if (has_b().ValueOrDefault() && !b().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !b().Ok()) return false; + } - if (!has_c().Known()) return false; - if (has_c().ValueOrDefault() && !c().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !c().Ok()) return false; + } - if (!has_d().Known()) return false; - if (has_d().ValueOrDefault() && !d().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !d().Ok()) return false; + } - if (!has_IntrinsicSizeInBytes().Known()) return false; - if (has_IntrinsicSizeInBytes().ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + } - if (!has_MaxSizeInBytes().Known()) return false; - if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + } - if (!has_MinSizeInBytes().Known()) return false; - if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + } @@ -5388,28 +5551,47 @@ class GenericFinalFieldOverlapsView final { bool Ok() const { if (!IsComplete()) return false; - if (!has_a().Known()) return false; - if (has_a().ValueOrDefault() && !a().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !a().Ok()) return false; + } - if (!has_b().Known()) return false; - if (has_b().ValueOrDefault() && !b().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !b().Ok()) return false; + } - if (!has_c().Known()) return false; - if (has_c().ValueOrDefault() && !c().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !c().Ok()) return false; + } - if (!has_IntrinsicSizeInBytes().Known()) return false; - if (has_IntrinsicSizeInBytes().ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + } - if (!has_MaxSizeInBytes().Known()) return false; - if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + } - if (!has_MinSizeInBytes().Known()) return false; - if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + } @@ -5971,32 +6153,54 @@ class GenericDynamicFinalFieldOverlapsView final { bool Ok() const { if (!IsComplete()) return false; - if (!has_a().Known()) return false; - if (has_a().ValueOrDefault() && !a().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !a().Ok()) return false; + } - if (!has_b().Known()) return false; - if (has_b().ValueOrDefault() && !b().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !b().Ok()) return false; + } - if (!has_c().Known()) return false; - if (has_c().ValueOrDefault() && !c().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !c().Ok()) return false; + } - if (!has_d().Known()) return false; - if (has_d().ValueOrDefault() && !d().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !d().Ok()) return false; + } - if (!has_IntrinsicSizeInBytes().Known()) return false; - if (has_IntrinsicSizeInBytes().ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + } - if (!has_MaxSizeInBytes().Known()) return false; - if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + } - if (!has_MinSizeInBytes().Known()) return false; - if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + } @@ -6666,24 +6870,40 @@ class GenericDynamicFieldDependsOnLaterFieldView final { bool Ok() const { if (!IsComplete()) return false; - if (!has_a().Known()) return false; - if (has_a().ValueOrDefault() && !a().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !a().Ok()) return false; + } - if (!has_b().Known()) return false; - if (has_b().ValueOrDefault() && !b().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !b().Ok()) return false; + } - if (!has_IntrinsicSizeInBytes().Known()) return false; - if (has_IntrinsicSizeInBytes().ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + } - if (!has_MaxSizeInBytes().Known()) return false; - if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + } - if (!has_MinSizeInBytes().Known()) return false; - if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + } @@ -7198,28 +7418,47 @@ class GenericDynamicFieldDoesNotAffectSizeView final { bool Ok() const { if (!IsComplete()) return false; - if (!has_a().Known()) return false; - if (has_a().ValueOrDefault() && !a().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !a().Ok()) return false; + } - if (!has_b().Known()) return false; - if (has_b().ValueOrDefault() && !b().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !b().Ok()) return false; + } - if (!has_c().Known()) return false; - if (has_c().ValueOrDefault() && !c().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !c().Ok()) return false; + } - if (!has_IntrinsicSizeInBytes().Known()) return false; - if (has_IntrinsicSizeInBytes().ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + } - if (!has_MaxSizeInBytes().Known()) return false; - if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + } - if (!has_MinSizeInBytes().Known()) return false; - if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + } diff --git a/testdata/golden_cpp/enum.emb.h b/testdata/golden_cpp/enum.emb.h index f056862..1d03fb6 100644 --- a/testdata/golden_cpp/enum.emb.h +++ b/testdata/golden_cpp/enum.emb.h @@ -139,24 +139,40 @@ class GenericConstantsView final { bool Ok() const { if (!IsComplete()) return false; - if (!has_sprocket().Known()) return false; - if (has_sprocket().ValueOrDefault() && !sprocket().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !sprocket().Ok()) return false; + } - if (!has_geegaw().Known()) return false; - if (has_geegaw().ValueOrDefault() && !geegaw().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !geegaw().Ok()) return false; + } - if (!has_IntrinsicSizeInBytes().Known()) return false; - if (has_IntrinsicSizeInBytes().ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + } - if (!has_MaxSizeInBytes().Known()) return false; - if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + } - if (!has_MinSizeInBytes().Known()) return false; - if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + } @@ -1546,20 +1562,33 @@ class GenericEmbossReservedAnonymousField1View final { bool Ok() const { if (!IsComplete()) return false; - if (!has_wide_kind_in_bits().Known()) return false; - if (has_wide_kind_in_bits().ValueOrDefault() && !wide_kind_in_bits().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !wide_kind_in_bits().Ok()) return false; + } - if (!has_IntrinsicSizeInBits().Known()) return false; - if (has_IntrinsicSizeInBits().ValueOrDefault() && !IntrinsicSizeInBits().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBits().Ok()) return false; + } - if (!has_MaxSizeInBits().Known()) return false; - if (has_MaxSizeInBits().ValueOrDefault() && !MaxSizeInBits().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBits().Ok()) return false; + } - if (!has_MinSizeInBits().Known()) return false; - if (has_MinSizeInBits().ValueOrDefault() && !MinSizeInBits().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBits().Ok()) return false; + } @@ -1961,36 +1990,61 @@ class GenericManifestEntryView final { bool Ok() const { if (!IsComplete()) return false; - if (!has_kind().Known()) return false; - if (has_kind().ValueOrDefault() && !kind().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !kind().Ok()) return false; + } - if (!has_count().Known()) return false; - if (has_count().ValueOrDefault() && !count().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !count().Ok()) return false; + } - if (!has_wide_kind().Known()) return false; - if (has_wide_kind().ValueOrDefault() && !wide_kind().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !wide_kind().Ok()) return false; + } - if (!has_emboss_reserved_anonymous_field_1().Known()) return false; - if (has_emboss_reserved_anonymous_field_1().ValueOrDefault() && !emboss_reserved_anonymous_field_1().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !emboss_reserved_anonymous_field_1().Ok()) return false; + } - if (!has_wide_kind_in_bits().Known()) return false; - if (has_wide_kind_in_bits().ValueOrDefault() && !wide_kind_in_bits().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::And(::emboss::support::Maybe(true), ::emboss::support::Maybe(true)); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !wide_kind_in_bits().Ok()) return false; + } - if (!has_IntrinsicSizeInBytes().Known()) return false; - if (has_IntrinsicSizeInBytes().ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + } - if (!has_MaxSizeInBytes().Known()) return false; - if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + } - if (!has_MinSizeInBytes().Known()) return false; - if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + } @@ -2720,20 +2774,33 @@ class GenericStructContainingEnumView final { bool Ok() const { if (!IsComplete()) return false; - if (!has_bar().Known()) return false; - if (has_bar().ValueOrDefault() && !bar().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !bar().Ok()) return false; + } - if (!has_IntrinsicSizeInBytes().Known()) return false; - if (has_IntrinsicSizeInBytes().ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + } - if (!has_MaxSizeInBytes().Known()) return false; - if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + } - if (!has_MinSizeInBytes().Known()) return false; - if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + } diff --git a/testdata/golden_cpp/enum_case.emb.h b/testdata/golden_cpp/enum_case.emb.h index 5738596..4d6c432 100644 --- a/testdata/golden_cpp/enum_case.emb.h +++ b/testdata/golden_cpp/enum_case.emb.h @@ -334,28 +334,47 @@ class GenericUseKCamelEnumCaseView final { bool Ok() const { if (!IsComplete()) return false; - if (!has_v().Known()) return false; - if (has_v().ValueOrDefault() && !v().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !v().Ok()) return false; + } - if (!has_first().Known()) return false; - if (has_first().ValueOrDefault() && !first().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !first().Ok()) return false; + } - if (!has_v_is_first().Known()) return false; - if (has_v_is_first().ValueOrDefault() && !v_is_first().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !v_is_first().Ok()) return false; + } - if (!has_IntrinsicSizeInBytes().Known()) return false; - if (has_IntrinsicSizeInBytes().ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + } - if (!has_MaxSizeInBytes().Known()) return false; - if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + } - if (!has_MinSizeInBytes().Known()) return false; - if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + } diff --git a/testdata/golden_cpp/explicit_sizes.emb.h b/testdata/golden_cpp/explicit_sizes.emb.h index f8fd46f..8005e47 100644 --- a/testdata/golden_cpp/explicit_sizes.emb.h +++ b/testdata/golden_cpp/explicit_sizes.emb.h @@ -118,28 +118,47 @@ class GenericSizedUIntArraysView final { bool Ok() const { if (!IsComplete()) return false; - if (!has_one_nibble().Known()) return false; - if (has_one_nibble().ValueOrDefault() && !one_nibble().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !one_nibble().Ok()) return false; + } - if (!has_two_nibble().Known()) return false; - if (has_two_nibble().ValueOrDefault() && !two_nibble().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !two_nibble().Ok()) return false; + } - if (!has_four_nibble().Known()) return false; - if (has_four_nibble().ValueOrDefault() && !four_nibble().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !four_nibble().Ok()) return false; + } - if (!has_IntrinsicSizeInBits().Known()) return false; - if (has_IntrinsicSizeInBits().ValueOrDefault() && !IntrinsicSizeInBits().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBits().Ok()) return false; + } - if (!has_MaxSizeInBits().Known()) return false; - if (has_MaxSizeInBits().ValueOrDefault() && !MaxSizeInBits().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBits().Ok()) return false; + } - if (!has_MinSizeInBits().Known()) return false; - if (has_MinSizeInBits().ValueOrDefault() && !MinSizeInBits().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBits().Ok()) return false; + } @@ -712,28 +731,47 @@ class GenericSizedIntArraysView final { bool Ok() const { if (!IsComplete()) return false; - if (!has_one_nibble().Known()) return false; - if (has_one_nibble().ValueOrDefault() && !one_nibble().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !one_nibble().Ok()) return false; + } - if (!has_two_nibble().Known()) return false; - if (has_two_nibble().ValueOrDefault() && !two_nibble().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !two_nibble().Ok()) return false; + } - if (!has_four_nibble().Known()) return false; - if (has_four_nibble().ValueOrDefault() && !four_nibble().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !four_nibble().Ok()) return false; + } - if (!has_IntrinsicSizeInBits().Known()) return false; - if (has_IntrinsicSizeInBits().ValueOrDefault() && !IntrinsicSizeInBits().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBits().Ok()) return false; + } - if (!has_MaxSizeInBits().Known()) return false; - if (has_MaxSizeInBits().ValueOrDefault() && !MaxSizeInBits().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBits().Ok()) return false; + } - if (!has_MinSizeInBits().Known()) return false; - if (has_MinSizeInBits().ValueOrDefault() && !MinSizeInBits().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBits().Ok()) return false; + } @@ -1306,28 +1344,47 @@ class GenericSizedEnumArraysView final { bool Ok() const { if (!IsComplete()) return false; - if (!has_one_nibble().Known()) return false; - if (has_one_nibble().ValueOrDefault() && !one_nibble().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !one_nibble().Ok()) return false; + } - if (!has_two_nibble().Known()) return false; - if (has_two_nibble().ValueOrDefault() && !two_nibble().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !two_nibble().Ok()) return false; + } - if (!has_four_nibble().Known()) return false; - if (has_four_nibble().ValueOrDefault() && !four_nibble().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !four_nibble().Ok()) return false; + } - if (!has_IntrinsicSizeInBits().Known()) return false; - if (has_IntrinsicSizeInBits().ValueOrDefault() && !IntrinsicSizeInBits().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBits().Ok()) return false; + } - if (!has_MaxSizeInBits().Known()) return false; - if (has_MaxSizeInBits().ValueOrDefault() && !MaxSizeInBits().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBits().Ok()) return false; + } - if (!has_MinSizeInBits().Known()) return false; - if (has_MinSizeInBits().ValueOrDefault() && !MinSizeInBits().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBits().Ok()) return false; + } @@ -1901,20 +1958,33 @@ class GenericBitArrayContainerView final { bool Ok() const { if (!IsComplete()) return false; - if (!has_uint_arrays().Known()) return false; - if (has_uint_arrays().ValueOrDefault() && !uint_arrays().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !uint_arrays().Ok()) return false; + } - if (!has_IntrinsicSizeInBytes().Known()) return false; - if (has_IntrinsicSizeInBytes().ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + } - if (!has_MaxSizeInBytes().Known()) return false; - if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + } - if (!has_MinSizeInBytes().Known()) return false; - if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + } diff --git a/testdata/golden_cpp/float.emb.h b/testdata/golden_cpp/float.emb.h index d43d32e..c54aa66 100644 --- a/testdata/golden_cpp/float.emb.h +++ b/testdata/golden_cpp/float.emb.h @@ -99,24 +99,40 @@ class GenericFloatsView final { bool Ok() const { if (!IsComplete()) return false; - if (!has_float_little_endian().Known()) return false; - if (has_float_little_endian().ValueOrDefault() && !float_little_endian().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !float_little_endian().Ok()) return false; + } - if (!has_float_big_endian().Known()) return false; - if (has_float_big_endian().ValueOrDefault() && !float_big_endian().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !float_big_endian().Ok()) return false; + } - if (!has_IntrinsicSizeInBytes().Known()) return false; - if (has_IntrinsicSizeInBytes().ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + } - if (!has_MaxSizeInBytes().Known()) return false; - if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + } - if (!has_MinSizeInBytes().Known()) return false; - if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + } @@ -599,24 +615,40 @@ class GenericDoublesView final { bool Ok() const { if (!IsComplete()) return false; - if (!has_double_little_endian().Known()) return false; - if (has_double_little_endian().ValueOrDefault() && !double_little_endian().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !double_little_endian().Ok()) return false; + } - if (!has_double_big_endian().Known()) return false; - if (has_double_big_endian().ValueOrDefault() && !double_big_endian().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !double_big_endian().Ok()) return false; + } - if (!has_IntrinsicSizeInBytes().Known()) return false; - if (has_IntrinsicSizeInBytes().ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + } - if (!has_MaxSizeInBytes().Known()) return false; - if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + } - if (!has_MinSizeInBytes().Known()) return false; - if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + } diff --git a/testdata/golden_cpp/imported.emb.h b/testdata/golden_cpp/imported.emb.h index 2217543..ce0cbea 100644 --- a/testdata/golden_cpp/imported.emb.h +++ b/testdata/golden_cpp/imported.emb.h @@ -90,20 +90,33 @@ class GenericInnerView final { bool Ok() const { if (!IsComplete()) return false; - if (!has_value().Known()) return false; - if (has_value().ValueOrDefault() && !value().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !value().Ok()) return false; + } - if (!has_IntrinsicSizeInBytes().Known()) return false; - if (has_IntrinsicSizeInBytes().ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + } - if (!has_MaxSizeInBytes().Known()) return false; - if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + } - if (!has_MinSizeInBytes().Known()) return false; - if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + } diff --git a/testdata/golden_cpp/imported_genfiles.emb.h b/testdata/golden_cpp/imported_genfiles.emb.h index af1ef31..eb26bc9 100644 --- a/testdata/golden_cpp/imported_genfiles.emb.h +++ b/testdata/golden_cpp/imported_genfiles.emb.h @@ -91,20 +91,33 @@ class GenericInnerView final { bool Ok() const { if (!IsComplete()) return false; - if (!has_value().Known()) return false; - if (has_value().ValueOrDefault() && !value().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !value().Ok()) return false; + } - if (!has_IntrinsicSizeInBytes().Known()) return false; - if (has_IntrinsicSizeInBytes().ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + } - if (!has_MaxSizeInBytes().Known()) return false; - if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + } - if (!has_MinSizeInBytes().Known()) return false; - if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + } diff --git a/testdata/golden_cpp/importer.emb.h b/testdata/golden_cpp/importer.emb.h index 75ad2d2..3c54911 100644 --- a/testdata/golden_cpp/importer.emb.h +++ b/testdata/golden_cpp/importer.emb.h @@ -95,24 +95,40 @@ class GenericOuterView final { bool Ok() const { if (!IsComplete()) return false; - if (!has_inner().Known()) return false; - if (has_inner().ValueOrDefault() && !inner().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !inner().Ok()) return false; + } - if (!has_inner_gen().Known()) return false; - if (has_inner_gen().ValueOrDefault() && !inner_gen().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !inner_gen().Ok()) return false; + } - if (!has_IntrinsicSizeInBytes().Known()) return false; - if (has_IntrinsicSizeInBytes().ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + } - if (!has_MaxSizeInBytes().Known()) return false; - if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + } - if (!has_MinSizeInBytes().Known()) return false; - if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + } diff --git a/testdata/golden_cpp/importer2.emb.h b/testdata/golden_cpp/importer2.emb.h index ca22c93..8b99ad6 100644 --- a/testdata/golden_cpp/importer2.emb.h +++ b/testdata/golden_cpp/importer2.emb.h @@ -92,20 +92,33 @@ class GenericOuter2View final { bool Ok() const { if (!IsComplete()) return false; - if (!has_outer().Known()) return false; - if (has_outer().ValueOrDefault() && !outer().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !outer().Ok()) return false; + } - if (!has_IntrinsicSizeInBytes().Known()) return false; - if (has_IntrinsicSizeInBytes().ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + } - if (!has_MaxSizeInBytes().Known()) return false; - if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + } - if (!has_MinSizeInBytes().Known()) return false; - if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + } diff --git a/testdata/golden_cpp/inline_type.emb.h b/testdata/golden_cpp/inline_type.emb.h index 8f89827..0adbce3 100644 --- a/testdata/golden_cpp/inline_type.emb.h +++ b/testdata/golden_cpp/inline_type.emb.h @@ -272,24 +272,40 @@ class GenericFooView final { bool Ok() const { if (!IsComplete()) return false; - if (!has_status().Known()) return false; - if (has_status().ValueOrDefault() && !status().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !status().Ok()) return false; + } - if (!has_secondary_status().Known()) return false; - if (has_secondary_status().ValueOrDefault() && !secondary_status().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !secondary_status().Ok()) return false; + } - if (!has_IntrinsicSizeInBytes().Known()) return false; - if (has_IntrinsicSizeInBytes().ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + } - if (!has_MaxSizeInBytes().Known()) return false; - if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + } - if (!has_MinSizeInBytes().Known()) return false; - if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + } diff --git a/testdata/golden_cpp/int_sizes.emb.h b/testdata/golden_cpp/int_sizes.emb.h index fe697e9..ddb7e4d 100644 --- a/testdata/golden_cpp/int_sizes.emb.h +++ b/testdata/golden_cpp/int_sizes.emb.h @@ -97,48 +97,82 @@ class GenericSizesView final { bool Ok() const { if (!IsComplete()) return false; - if (!has_one_byte().Known()) return false; - if (has_one_byte().ValueOrDefault() && !one_byte().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !one_byte().Ok()) return false; + } - if (!has_two_byte().Known()) return false; - if (has_two_byte().ValueOrDefault() && !two_byte().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !two_byte().Ok()) return false; + } - if (!has_three_byte().Known()) return false; - if (has_three_byte().ValueOrDefault() && !three_byte().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !three_byte().Ok()) return false; + } - if (!has_four_byte().Known()) return false; - if (has_four_byte().ValueOrDefault() && !four_byte().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !four_byte().Ok()) return false; + } - if (!has_five_byte().Known()) return false; - if (has_five_byte().ValueOrDefault() && !five_byte().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !five_byte().Ok()) return false; + } - if (!has_six_byte().Known()) return false; - if (has_six_byte().ValueOrDefault() && !six_byte().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !six_byte().Ok()) return false; + } - if (!has_seven_byte().Known()) return false; - if (has_seven_byte().ValueOrDefault() && !seven_byte().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !seven_byte().Ok()) return false; + } - if (!has_eight_byte().Known()) return false; - if (has_eight_byte().ValueOrDefault() && !eight_byte().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !eight_byte().Ok()) return false; + } - if (!has_IntrinsicSizeInBytes().Known()) return false; - if (has_IntrinsicSizeInBytes().ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + } - if (!has_MaxSizeInBytes().Known()) return false; - if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + } - if (!has_MinSizeInBytes().Known()) return false; - if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + } diff --git a/testdata/golden_cpp/large_array.emb.h b/testdata/golden_cpp/large_array.emb.h index 47b4511..81048d8 100644 --- a/testdata/golden_cpp/large_array.emb.h +++ b/testdata/golden_cpp/large_array.emb.h @@ -91,24 +91,40 @@ class GenericUIntArrayView final { bool Ok() const { if (!IsComplete()) return false; - if (!has_element_count().Known()) return false; - if (has_element_count().ValueOrDefault() && !element_count().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !element_count().Ok()) return false; + } - if (!has_elements().Known()) return false; - if (has_elements().ValueOrDefault() && !elements().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !elements().Ok()) return false; + } - if (!has_IntrinsicSizeInBytes().Known()) return false; - if (has_IntrinsicSizeInBytes().ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + } - if (!has_MaxSizeInBytes().Known()) return false; - if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + } - if (!has_MinSizeInBytes().Known()) return false; - if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + } diff --git a/testdata/golden_cpp/nested_structure.emb.h b/testdata/golden_cpp/nested_structure.emb.h index b953e31..9da33ea 100644 --- a/testdata/golden_cpp/nested_structure.emb.h +++ b/testdata/golden_cpp/nested_structure.emb.h @@ -108,28 +108,47 @@ class GenericContainerView final { bool Ok() const { if (!IsComplete()) return false; - if (!has_weight().Known()) return false; - if (has_weight().ValueOrDefault() && !weight().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !weight().Ok()) return false; + } - if (!has_important_box().Known()) return false; - if (has_important_box().ValueOrDefault() && !important_box().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !important_box().Ok()) return false; + } - if (!has_other_box().Known()) return false; - if (has_other_box().ValueOrDefault() && !other_box().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !other_box().Ok()) return false; + } - if (!has_IntrinsicSizeInBytes().Known()) return false; - if (has_IntrinsicSizeInBytes().ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + } - if (!has_MaxSizeInBytes().Known()) return false; - if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + } - if (!has_MinSizeInBytes().Known()) return false; - if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + } @@ -685,24 +704,40 @@ class GenericBoxView final { bool Ok() const { if (!IsComplete()) return false; - if (!has_id().Known()) return false; - if (has_id().ValueOrDefault() && !id().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !id().Ok()) return false; + } - if (!has_count().Known()) return false; - if (has_count().ValueOrDefault() && !count().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !count().Ok()) return false; + } - if (!has_IntrinsicSizeInBytes().Known()) return false; - if (has_IntrinsicSizeInBytes().ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + } - if (!has_MaxSizeInBytes().Known()) return false; - if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + } - if (!has_MinSizeInBytes().Known()) return false; - if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + } @@ -1185,24 +1220,40 @@ class GenericTruckView final { bool Ok() const { if (!IsComplete()) return false; - if (!has_id().Known()) return false; - if (has_id().ValueOrDefault() && !id().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !id().Ok()) return false; + } - if (!has_cargo().Known()) return false; - if (has_cargo().ValueOrDefault() && !cargo().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !cargo().Ok()) return false; + } - if (!has_IntrinsicSizeInBytes().Known()) return false; - if (has_IntrinsicSizeInBytes().ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + } - if (!has_MaxSizeInBytes().Known()) return false; - if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + } - if (!has_MinSizeInBytes().Known()) return false; - if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + } diff --git a/testdata/golden_cpp/next_keyword.emb.h b/testdata/golden_cpp/next_keyword.emb.h index 624c954..eb40049 100644 --- a/testdata/golden_cpp/next_keyword.emb.h +++ b/testdata/golden_cpp/next_keyword.emb.h @@ -93,32 +93,54 @@ class GenericNextKeywordView final { bool Ok() const { if (!IsComplete()) return false; - if (!has_value32().Known()) return false; - if (has_value32().ValueOrDefault() && !value32().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !value32().Ok()) return false; + } - if (!has_value16().Known()) return false; - if (has_value16().ValueOrDefault() && !value16().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !value16().Ok()) return false; + } - if (!has_value8().Known()) return false; - if (has_value8().ValueOrDefault() && !value8().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !value8().Ok()) return false; + } - if (!has_value8_offset().Known()) return false; - if (has_value8_offset().ValueOrDefault() && !value8_offset().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !value8_offset().Ok()) return false; + } - if (!has_IntrinsicSizeInBytes().Known()) return false; - if (has_IntrinsicSizeInBytes().ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + } - if (!has_MaxSizeInBytes().Known()) return false; - if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + } - if (!has_MinSizeInBytes().Known()) return false; - if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + } diff --git a/testdata/golden_cpp/no_enum_traits.emb.h b/testdata/golden_cpp/no_enum_traits.emb.h index 5f97e05..c0aaafa 100644 --- a/testdata/golden_cpp/no_enum_traits.emb.h +++ b/testdata/golden_cpp/no_enum_traits.emb.h @@ -14,10 +14,6 @@ #include "runtime/cpp/emboss_prelude.h" -#include "runtime/cpp/emboss_enum_view.h" - -#include "runtime/cpp/emboss_text_util.h" - /* NOLINTBEGIN */ @@ -38,79 +34,6 @@ enum class Foo : ::std::uint64_t { VALUE = static_cast(10LL), }; -template -class EnumTraits; - -template <> -class EnumTraits final { - public: - static bool TryToGetEnumFromName(const char *emboss_reserved_local_name, - Foo *emboss_reserved_local_result) { - if (emboss_reserved_local_name == nullptr) return false; - if (!strcmp("VALUE", emboss_reserved_local_name)) { - *emboss_reserved_local_result = Foo::VALUE; - return true; - } - - return false; - } - - static const char *TryToGetNameFromEnum( - Foo emboss_reserved_local_value) { - switch (emboss_reserved_local_value) { - case Foo::VALUE: return "VALUE"; - - default: return nullptr; - } - } - - static bool EnumIsKnown(Foo emboss_reserved_local_value) { - switch (emboss_reserved_local_value) { - case Foo::VALUE: return true; - - default: - return false; - } - } - - static ::std::ostream &SendToOstream(::std::ostream &emboss_reserved_local_os, - Foo emboss_reserved_local_value) { - const char *emboss_reserved_local_name = - TryToGetNameFromEnum(emboss_reserved_local_value); - if (emboss_reserved_local_name == nullptr) { - emboss_reserved_local_os - << static_cast::type>( - emboss_reserved_local_value); - } else { - emboss_reserved_local_os << emboss_reserved_local_name; - } - return emboss_reserved_local_os; - } -}; - -static inline bool TryToGetEnumFromName( - const char *emboss_reserved_local_name, - Foo *emboss_reserved_local_result) { - return EnumTraits::TryToGetEnumFromName( - emboss_reserved_local_name, emboss_reserved_local_result); -} - -static inline const char *TryToGetNameFromEnum( - Foo emboss_reserved_local_value) { - return EnumTraits::TryToGetNameFromEnum( - emboss_reserved_local_value); -} - -static inline bool EnumIsKnown(Foo emboss_reserved_local_value) { - return EnumTraits::EnumIsKnown(emboss_reserved_local_value); -} - -static inline ::std::ostream &operator<<( - ::std::ostream &emboss_reserved_local_os, - Foo emboss_reserved_local_value) { - return EnumTraits::SendToOstream(emboss_reserved_local_os, - emboss_reserved_local_value); -} @@ -169,20 +92,33 @@ class GenericBarView final { bool Ok() const { if (!IsComplete()) return false; - if (!has_foo().Known()) return false; - if (has_foo().ValueOrDefault() && !foo().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !foo().Ok()) return false; + } - if (!has_IntrinsicSizeInBytes().Known()) return false; - if (has_IntrinsicSizeInBytes().ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + } - if (!has_MaxSizeInBytes().Known()) return false; - if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + } - if (!has_MinSizeInBytes().Known()) return false; - if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + } @@ -265,92 +201,6 @@ class GenericBarView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } - template - bool UpdateFromTextStream(Stream *emboss_reserved_local_stream) const { - ::std::string emboss_reserved_local_brace; - if (!::emboss::support::ReadToken(emboss_reserved_local_stream, - &emboss_reserved_local_brace)) - return false; - if (emboss_reserved_local_brace != "{") return false; - for (;;) { - ::std::string emboss_reserved_local_name; - if (!::emboss::support::ReadToken(emboss_reserved_local_stream, - &emboss_reserved_local_name)) - return false; - if (emboss_reserved_local_name == ",") - if (!::emboss::support::ReadToken(emboss_reserved_local_stream, - &emboss_reserved_local_name)) - return false; - if (emboss_reserved_local_name == "}") return true; - ::std::string emboss_reserved_local_colon; - if (!::emboss::support::ReadToken(emboss_reserved_local_stream, - &emboss_reserved_local_colon)) - return false; - if (emboss_reserved_local_colon != ":") return false; - if (emboss_reserved_local_name == "foo") { - if (!foo().UpdateFromTextStream( - emboss_reserved_local_stream)) { - return false; - } - continue; - } - - return false; - } - } - - template - void WriteToTextStream( - Stream *emboss_reserved_local_stream, - ::emboss::TextOutputOptions emboss_reserved_local_options) const { - ::emboss::TextOutputOptions emboss_reserved_local_field_options = - emboss_reserved_local_options.PlusOneIndent(); - if (emboss_reserved_local_options.multiline()) { - emboss_reserved_local_stream->Write("{\n"); - } else { - emboss_reserved_local_stream->Write("{"); - } - bool emboss_reserved_local_wrote_field = false; - if (has_foo().ValueOr(false)) { - if (!emboss_reserved_local_field_options.allow_partial_output() || - foo().IsAggregate() || foo().Ok()) { - if (emboss_reserved_local_field_options.multiline()) { - emboss_reserved_local_stream->Write( - emboss_reserved_local_field_options.current_indent()); - } else { - if (emboss_reserved_local_wrote_field) { - emboss_reserved_local_stream->Write(","); - } - emboss_reserved_local_stream->Write(" "); - } - emboss_reserved_local_stream->Write("foo: "); - foo().WriteToTextStream(emboss_reserved_local_stream, - emboss_reserved_local_field_options); - emboss_reserved_local_wrote_field = true; - if (emboss_reserved_local_field_options.multiline()) { - emboss_reserved_local_stream->Write("\n"); - } - } else if (emboss_reserved_local_field_options.allow_partial_output() && - emboss_reserved_local_field_options.comments() && - !foo().IsAggregate() && !foo().Ok()) { - if (emboss_reserved_local_field_options.multiline()) { - emboss_reserved_local_stream->Write( - emboss_reserved_local_field_options.current_indent()); - } - emboss_reserved_local_stream->Write("# foo: UNREADABLE\n"); - } - } - - (void)emboss_reserved_local_wrote_field; - if (emboss_reserved_local_options.multiline()) { - emboss_reserved_local_stream->Write( - emboss_reserved_local_options.current_indent()); - emboss_reserved_local_stream->Write("}"); - } else { - emboss_reserved_local_stream->Write(" }"); - } - } - static constexpr bool IsAggregate() { return true; } diff --git a/testdata/golden_cpp/parameters.emb.h b/testdata/golden_cpp/parameters.emb.h index d60f164..b6c33ae 100644 --- a/testdata/golden_cpp/parameters.emb.h +++ b/testdata/golden_cpp/parameters.emb.h @@ -388,32 +388,55 @@ class GenericMultiVersionView final { bool Ok() const { if (!IsComplete()) return false; if (!parameters_initialized_) return false; - if (!has_message_id().Known()) return false; - if (has_message_id().ValueOrDefault() && !message_id().Ok()) return false; + const auto emboss_reserved_local_ok_subexpr_1 = message_id(); + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !message_id().Ok()) return false; + } - if (!has_axes().Known()) return false; - if (has_axes().ValueOrDefault() && !axes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Equal((emboss_reserved_local_ok_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(0))); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !axes().Ok()) return false; + } - if (!has_config().Known()) return false; - if (has_config().ValueOrDefault() && !config().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Equal((emboss_reserved_local_ok_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(1))); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !config().Ok()) return false; + } - if (!has_config_vx().Known()) return false; - if (has_config_vx().ValueOrDefault() && !config_vx().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::And(::emboss::support::Equal((product().Ok() ? ::emboss::support::Maybe(static_cast(product().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(23))), ::emboss::support::Equal((emboss_reserved_local_ok_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(1)))); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !config_vx().Ok()) return false; + } - if (!has_IntrinsicSizeInBytes().Known()) return false; - if (has_IntrinsicSizeInBytes().ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + } - if (!has_MaxSizeInBytes().Known()) return false; - if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + } - if (!has_MinSizeInBytes().Known()) return false; - if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + } @@ -1129,36 +1152,62 @@ class GenericAxesView final { bool Ok() const { if (!IsComplete()) return false; if (!parameters_initialized_) return false; - if (!has_values().Known()) return false; - if (has_values().ValueOrDefault() && !values().Ok()) return false; + const auto emboss_reserved_local_ok_subexpr_1 = axes(); + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !values().Ok()) return false; + } - if (!has_x().Known()) return false; - if (has_x().ValueOrDefault() && !x().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::GreaterThan((emboss_reserved_local_ok_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(0LL))); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !x().Ok()) return false; + } - if (!has_y().Known()) return false; - if (has_y().ValueOrDefault() && !y().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::GreaterThan((emboss_reserved_local_ok_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(1LL))); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !y().Ok()) return false; + } - if (!has_z().Known()) return false; - if (has_z().ValueOrDefault() && !z().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::GreaterThan((emboss_reserved_local_ok_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(2LL))); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !z().Ok()) return false; + } - if (!has_axis_count_plus_one().Known()) return false; - if (has_axis_count_plus_one().ValueOrDefault() && !axis_count_plus_one().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !axis_count_plus_one().Ok()) return false; + } - if (!has_IntrinsicSizeInBytes().Known()) return false; - if (has_IntrinsicSizeInBytes().ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + } - if (!has_MaxSizeInBytes().Known()) return false; - if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + } - if (!has_MinSizeInBytes().Known()) return false; - if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + } @@ -1961,32 +2010,54 @@ class GenericAxisPairView final { bool Ok() const { if (!IsComplete()) return false; if (!parameters_initialized_) return false; - if (!has_axis_type_a().Known()) return false; - if (has_axis_type_a().ValueOrDefault() && !axis_type_a().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !axis_type_a().Ok()) return false; + } - if (!has_axis_a().Known()) return false; - if (has_axis_a().ValueOrDefault() && !axis_a().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !axis_a().Ok()) return false; + } - if (!has_axis_type_b().Known()) return false; - if (has_axis_type_b().ValueOrDefault() && !axis_type_b().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !axis_type_b().Ok()) return false; + } - if (!has_axis_b().Known()) return false; - if (has_axis_b().ValueOrDefault() && !axis_b().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !axis_b().Ok()) return false; + } - if (!has_IntrinsicSizeInBytes().Known()) return false; - if (has_IntrinsicSizeInBytes().ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + } - if (!has_MaxSizeInBytes().Known()) return false; - if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + } - if (!has_MinSizeInBytes().Known()) return false; - if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + } @@ -2716,24 +2787,40 @@ class GenericAxesEnvelopeView final { bool Ok() const { if (!IsComplete()) return false; - if (!has_axis_count().Known()) return false; - if (has_axis_count().ValueOrDefault() && !axis_count().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !axis_count().Ok()) return false; + } - if (!has_axes().Known()) return false; - if (has_axes().ValueOrDefault() && !axes().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !axes().Ok()) return false; + } - if (!has_IntrinsicSizeInBytes().Known()) return false; - if (has_IntrinsicSizeInBytes().ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + } - if (!has_MaxSizeInBytes().Known()) return false; - if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + } - if (!has_MinSizeInBytes().Known()) return false; - if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + } @@ -3356,36 +3443,62 @@ class GenericAxisView final { bool Ok() const { if (!IsComplete()) return false; if (!parameters_initialized_) return false; - if (!has_value().Known()) return false; - if (has_value().ValueOrDefault() && !value().Ok()) return false; + const auto emboss_reserved_local_ok_subexpr_1 = axis_type(); + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !value().Ok()) return false; + } - if (!has_axis_type().Known()) return false; - if (has_axis_type().ValueOrDefault() && !axis_type().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !axis_type().Ok()) return false; + } - if (!has_x().Known()) return false; - if (has_x().ValueOrDefault() && !x().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Equal((emboss_reserved_local_ok_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(1))); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !x().Ok()) return false; + } - if (!has_y().Known()) return false; - if (has_y().ValueOrDefault() && !y().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Equal((emboss_reserved_local_ok_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(2))); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !y().Ok()) return false; + } - if (!has_z().Known()) return false; - if (has_z().ValueOrDefault() && !z().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Equal((emboss_reserved_local_ok_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(3))); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !z().Ok()) return false; + } - if (!has_IntrinsicSizeInBytes().Known()) return false; - if (has_IntrinsicSizeInBytes().ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + } - if (!has_MaxSizeInBytes().Known()) return false; - if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + } - if (!has_MinSizeInBytes().Known()) return false; - if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + } @@ -4146,20 +4259,33 @@ class GenericConfigView final { bool Ok() const { if (!IsComplete()) return false; - if (!has_power().Known()) return false; - if (has_power().ValueOrDefault() && !power().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !power().Ok()) return false; + } - if (!has_IntrinsicSizeInBits().Known()) return false; - if (has_IntrinsicSizeInBits().ValueOrDefault() && !IntrinsicSizeInBits().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBits().Ok()) return false; + } - if (!has_MaxSizeInBits().Known()) return false; - if (has_MaxSizeInBits().ValueOrDefault() && !MaxSizeInBits().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBits().Ok()) return false; + } - if (!has_MinSizeInBits().Known()) return false; - if (has_MinSizeInBits().ValueOrDefault() && !MinSizeInBits().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBits().Ok()) return false; + } @@ -4570,20 +4696,33 @@ class GenericEmbossReservedAnonymousField1View final { bool Ok() const { if (!IsComplete()) return false; - if (!has_power().Known()) return false; - if (has_power().ValueOrDefault() && !power().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !power().Ok()) return false; + } - if (!has_IntrinsicSizeInBits().Known()) return false; - if (has_IntrinsicSizeInBits().ValueOrDefault() && !IntrinsicSizeInBits().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBits().Ok()) return false; + } - if (!has_MaxSizeInBits().Known()) return false; - if (has_MaxSizeInBits().ValueOrDefault() && !MaxSizeInBits().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBits().Ok()) return false; + } - if (!has_MinSizeInBits().Known()) return false; - if (has_MinSizeInBits().ValueOrDefault() && !MinSizeInBits().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBits().Ok()) return false; + } @@ -4984,28 +5123,47 @@ class GenericConfigVXView final { bool Ok() const { if (!IsComplete()) return false; - if (!has_emboss_reserved_anonymous_field_1().Known()) return false; - if (has_emboss_reserved_anonymous_field_1().ValueOrDefault() && !emboss_reserved_anonymous_field_1().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !emboss_reserved_anonymous_field_1().Ok()) return false; + } - if (!has_power().Known()) return false; - if (has_power().ValueOrDefault() && !power().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::And(::emboss::support::Maybe(true), ::emboss::support::Maybe(true)); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !power().Ok()) return false; + } - if (!has_gain().Known()) return false; - if (has_gain().ValueOrDefault() && !gain().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !gain().Ok()) return false; + } - if (!has_IntrinsicSizeInBytes().Known()) return false; - if (has_IntrinsicSizeInBytes().ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + } - if (!has_MaxSizeInBytes().Known()) return false; - if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + } - if (!has_MinSizeInBytes().Known()) return false; - if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + } @@ -5493,20 +5651,33 @@ class GenericStructWithUnusedParameterView final { bool Ok() const { if (!IsComplete()) return false; if (!parameters_initialized_) return false; - if (!has_y().Known()) return false; - if (has_y().ValueOrDefault() && !y().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !y().Ok()) return false; + } - if (!has_IntrinsicSizeInBytes().Known()) return false; - if (has_IntrinsicSizeInBytes().ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + } - if (!has_MaxSizeInBytes().Known()) return false; - if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + } - if (!has_MinSizeInBytes().Known()) return false; - if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + } @@ -5955,24 +6126,40 @@ class GenericStructContainingStructWithUnusedParameterView final { bool Ok() const { if (!IsComplete()) return false; - if (!has_x().Known()) return false; - if (has_x().ValueOrDefault() && !x().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !x().Ok()) return false; + } - if (!has_swup().Known()) return false; - if (has_swup().ValueOrDefault() && !swup().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !swup().Ok()) return false; + } - if (!has_IntrinsicSizeInBytes().Known()) return false; - if (has_IntrinsicSizeInBytes().ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + } - if (!has_MaxSizeInBytes().Known()) return false; - if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + } - if (!has_MinSizeInBytes().Known()) return false; - if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + } @@ -6454,24 +6641,40 @@ class GenericBiasedValueView final { bool Ok() const { if (!IsComplete()) return false; if (!parameters_initialized_) return false; - if (!has_raw_value().Known()) return false; - if (has_raw_value().ValueOrDefault() && !raw_value().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !raw_value().Ok()) return false; + } - if (!has_value().Known()) return false; - if (has_value().ValueOrDefault() && !value().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !value().Ok()) return false; + } - if (!has_IntrinsicSizeInBytes().Known()) return false; - if (has_IntrinsicSizeInBytes().ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + } - if (!has_MaxSizeInBytes().Known()) return false; - if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + } - if (!has_MinSizeInBytes().Known()) return false; - if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + } @@ -7006,24 +7209,40 @@ class GenericVirtualFirstFieldWithParamView final { bool Ok() const { if (!IsComplete()) return false; if (!parameters_initialized_) return false; - if (!has_x().Known()) return false; - if (has_x().ValueOrDefault() && !x().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !x().Ok()) return false; + } - if (!has_value().Known()) return false; - if (has_value().ValueOrDefault() && !value().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !value().Ok()) return false; + } - if (!has_IntrinsicSizeInBytes().Known()) return false; - if (has_IntrinsicSizeInBytes().ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + } - if (!has_MaxSizeInBytes().Known()) return false; - if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + } - if (!has_MinSizeInBytes().Known()) return false; - if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + } @@ -7518,24 +7737,40 @@ class GenericConstVirtualFirstFieldWithParamView final { bool Ok() const { if (!IsComplete()) return false; if (!parameters_initialized_) return false; - if (!has_value().Known()) return false; - if (has_value().ValueOrDefault() && !value().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !value().Ok()) return false; + } - if (!has_x().Known()) return false; - if (has_x().ValueOrDefault() && !x().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !x().Ok()) return false; + } - if (!has_IntrinsicSizeInBytes().Known()) return false; - if (has_IntrinsicSizeInBytes().ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + } - if (!has_MaxSizeInBytes().Known()) return false; - if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + } - if (!has_MinSizeInBytes().Known()) return false; - if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + } @@ -8039,28 +8274,47 @@ class GenericSizedArrayOfBiasedValuesView final { bool Ok() const { if (!IsComplete()) return false; - if (!has_element_count().Known()) return false; - if (has_element_count().ValueOrDefault() && !element_count().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !element_count().Ok()) return false; + } - if (!has_bias().Known()) return false; - if (has_bias().ValueOrDefault() && !bias().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !bias().Ok()) return false; + } - if (!has_values().Known()) return false; - if (has_values().ValueOrDefault() && !values().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !values().Ok()) return false; + } - if (!has_IntrinsicSizeInBytes().Known()) return false; - if (has_IntrinsicSizeInBytes().ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + } - if (!has_MaxSizeInBytes().Known()) return false; - if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + } - if (!has_MinSizeInBytes().Known()) return false; - if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + } diff --git a/testdata/golden_cpp/requires.emb.h b/testdata/golden_cpp/requires.emb.h index 500813b..1d2c250 100644 --- a/testdata/golden_cpp/requires.emb.h +++ b/testdata/golden_cpp/requires.emb.h @@ -192,40 +192,68 @@ class GenericRequiresIntegersView final { bool Ok() const { if (!IsComplete()) return false; - if (!has_zero_through_nine().Known()) return false; - if (has_zero_through_nine().ValueOrDefault() && !zero_through_nine().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !zero_through_nine().Ok()) return false; + } - if (!has_ten_through_twenty().Known()) return false; - if (has_ten_through_twenty().ValueOrDefault() && !ten_through_twenty().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !ten_through_twenty().Ok()) return false; + } - if (!has_disjoint().Known()) return false; - if (has_disjoint().ValueOrDefault() && !disjoint().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !disjoint().Ok()) return false; + } - if (!has_ztn_plus_ttt().Known()) return false; - if (has_ztn_plus_ttt().ValueOrDefault() && !ztn_plus_ttt().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !ztn_plus_ttt().Ok()) return false; + } - if (!has_alias_of_zero_through_nine().Known()) return false; - if (has_alias_of_zero_through_nine().ValueOrDefault() && !alias_of_zero_through_nine().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !alias_of_zero_through_nine().Ok()) return false; + } - if (!has_zero_through_nine_plus_five().Known()) return false; - if (has_zero_through_nine_plus_five().ValueOrDefault() && !zero_through_nine_plus_five().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !zero_through_nine_plus_five().Ok()) return false; + } - if (!has_IntrinsicSizeInBytes().Known()) return false; - if (has_IntrinsicSizeInBytes().ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + } - if (!has_MaxSizeInBytes().Known()) return false; - if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + } - if (!has_MinSizeInBytes().Known()) return false; - if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + } if (!(::emboss::support::LessThanOrEqual((zero_through_nine().Ok() ? ::emboss::support::Maybe(static_cast(zero_through_nine().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Difference((ten_through_twenty().Ok() ? ::emboss::support::Maybe(static_cast(ten_through_twenty().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(10LL))))).ValueOr(false)) @@ -1166,32 +1194,54 @@ class GenericEmbossReservedAnonymousField2View final { bool Ok() const { if (!IsComplete()) return false; - if (!has_a().Known()) return false; - if (has_a().ValueOrDefault() && !a().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !a().Ok()) return false; + } - if (!has_b().Known()) return false; - if (has_b().ValueOrDefault() && !b().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !b().Ok()) return false; + } - if (!has_must_be_true().Known()) return false; - if (has_must_be_true().ValueOrDefault() && !must_be_true().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !must_be_true().Ok()) return false; + } - if (!has_must_be_false().Known()) return false; - if (has_must_be_false().ValueOrDefault() && !must_be_false().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !must_be_false().Ok()) return false; + } - if (!has_IntrinsicSizeInBits().Known()) return false; - if (has_IntrinsicSizeInBits().ValueOrDefault() && !IntrinsicSizeInBits().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBits().Ok()) return false; + } - if (!has_MaxSizeInBits().Known()) return false; - if (has_MaxSizeInBits().ValueOrDefault() && !MaxSizeInBits().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBits().Ok()) return false; + } - if (!has_MinSizeInBits().Known()) return false; - if (has_MinSizeInBits().ValueOrDefault() && !MinSizeInBits().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBits().Ok()) return false; + } @@ -1823,44 +1873,76 @@ class GenericRequiresBoolsView final { bool Ok() const { if (!IsComplete()) return false; - if (!has_emboss_reserved_anonymous_field_2().Known()) return false; - if (has_emboss_reserved_anonymous_field_2().ValueOrDefault() && !emboss_reserved_anonymous_field_2().Ok()) return false; + const auto emboss_reserved_local_ok_subexpr_1 = ::emboss::support::And(::emboss::support::Maybe(true), ::emboss::support::Maybe(true)); + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !emboss_reserved_anonymous_field_2().Ok()) return false; + } - if (!has_a().Known()) return false; - if (has_a().ValueOrDefault() && !a().Ok()) return false; + { + const auto emboss_reserved_local_field_present = emboss_reserved_local_ok_subexpr_1; + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !a().Ok()) return false; + } - if (!has_b().Known()) return false; - if (has_b().ValueOrDefault() && !b().Ok()) return false; + { + const auto emboss_reserved_local_field_present = emboss_reserved_local_ok_subexpr_1; + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !b().Ok()) return false; + } - if (!has_must_be_true().Known()) return false; - if (has_must_be_true().ValueOrDefault() && !must_be_true().Ok()) return false; + { + const auto emboss_reserved_local_field_present = emboss_reserved_local_ok_subexpr_1; + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !must_be_true().Ok()) return false; + } - if (!has_must_be_false().Known()) return false; - if (has_must_be_false().ValueOrDefault() && !must_be_false().Ok()) return false; + { + const auto emboss_reserved_local_field_present = emboss_reserved_local_ok_subexpr_1; + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !must_be_false().Ok()) return false; + } - if (!has_b_must_be_false().Known()) return false; - if (has_b_must_be_false().ValueOrDefault() && !b_must_be_false().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !b_must_be_false().Ok()) return false; + } - if (!has_alias_of_a_must_be_true().Known()) return false; - if (has_alias_of_a_must_be_true().ValueOrDefault() && !alias_of_a_must_be_true().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !alias_of_a_must_be_true().Ok()) return false; + } - if (!has_IntrinsicSizeInBytes().Known()) return false; - if (has_IntrinsicSizeInBytes().ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + } - if (!has_MaxSizeInBytes().Known()) return false; - if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + } - if (!has_MinSizeInBytes().Known()) return false; - if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + } if (!(::emboss::support::Or((a().Ok() ? ::emboss::support::Maybe(static_cast(a().UncheckedRead())) : ::emboss::support::Maybe()), (b().Ok() ? ::emboss::support::Maybe(static_cast(b().UncheckedRead())) : ::emboss::support::Maybe()))).ValueOr(false)) @@ -2741,36 +2823,61 @@ class GenericRequiresEnumsView final { bool Ok() const { if (!IsComplete()) return false; - if (!has_a().Known()) return false; - if (has_a().ValueOrDefault() && !a().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !a().Ok()) return false; + } - if (!has_b().Known()) return false; - if (has_b().ValueOrDefault() && !b().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !b().Ok()) return false; + } - if (!has_c().Known()) return false; - if (has_c().ValueOrDefault() && !c().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !c().Ok()) return false; + } - if (!has_filtered_a().Known()) return false; - if (has_filtered_a().ValueOrDefault() && !filtered_a().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !filtered_a().Ok()) return false; + } - if (!has_alias_of_a().Known()) return false; - if (has_alias_of_a().ValueOrDefault() && !alias_of_a().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !alias_of_a().Ok()) return false; + } - if (!has_IntrinsicSizeInBytes().Known()) return false; - if (has_IntrinsicSizeInBytes().ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + } - if (!has_MaxSizeInBytes().Known()) return false; - if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + } - if (!has_MinSizeInBytes().Known()) return false; - if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + } if (!(::emboss::support::Or(::emboss::support::Equal((a().Ok() ? ::emboss::support::Maybe(static_cast(a().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(0))), ::emboss::support::Equal((b().Ok() ? ::emboss::support::Maybe(static_cast(b().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(0))))).ValueOr(false)) @@ -3569,32 +3676,55 @@ class GenericEmbossReservedAnonymousField1View final { bool Ok() const { if (!IsComplete()) return false; - if (!has_a().Known()) return false; - if (has_a().ValueOrDefault() && !a().Ok()) return false; + const auto emboss_reserved_local_ok_subexpr_1 = b_exists(); + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !a().Ok()) return false; + } - if (!has_b_exists().Known()) return false; - if (has_b_exists().ValueOrDefault() && !b_exists().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !b_exists().Ok()) return false; + } - if (!has_b().Known()) return false; - if (has_b().ValueOrDefault() && !b().Ok()) return false; + { + const auto emboss_reserved_local_field_present = (emboss_reserved_local_ok_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !b().Ok()) return false; + } - if (!has_b_true().Known()) return false; - if (has_b_true().ValueOrDefault() && !b_true().Ok()) return false; + { + const auto emboss_reserved_local_field_present = (emboss_reserved_local_ok_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !b_true().Ok()) return false; + } - if (!has_IntrinsicSizeInBits().Known()) return false; - if (has_IntrinsicSizeInBits().ValueOrDefault() && !IntrinsicSizeInBits().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBits().Ok()) return false; + } - if (!has_MaxSizeInBits().Known()) return false; - if (has_MaxSizeInBits().ValueOrDefault() && !MaxSizeInBits().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBits().Ok()) return false; + } - if (!has_MinSizeInBits().Known()) return false; - if (has_MinSizeInBits().ValueOrDefault() && !MinSizeInBits().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBits().Ok()) return false; + } @@ -4255,36 +4385,62 @@ class GenericRequiresWithOptionalFieldsView final { bool Ok() const { if (!IsComplete()) return false; - if (!has_emboss_reserved_anonymous_field_1().Known()) return false; - if (has_emboss_reserved_anonymous_field_1().ValueOrDefault() && !emboss_reserved_anonymous_field_1().Ok()) return false; + const auto emboss_reserved_local_ok_subexpr_1 = ::emboss::support::And(::emboss::support::Maybe(true), ::emboss::support::Maybe(true)); + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !emboss_reserved_anonymous_field_1().Ok()) return false; + } - if (!has_a().Known()) return false; - if (has_a().ValueOrDefault() && !a().Ok()) return false; + { + const auto emboss_reserved_local_field_present = emboss_reserved_local_ok_subexpr_1; + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !a().Ok()) return false; + } - if (!has_b_exists().Known()) return false; - if (has_b_exists().ValueOrDefault() && !b_exists().Ok()) return false; + { + const auto emboss_reserved_local_field_present = emboss_reserved_local_ok_subexpr_1; + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !b_exists().Ok()) return false; + } - if (!has_b().Known()) return false; - if (has_b().ValueOrDefault() && !b().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::And(::emboss::support::Maybe(true), emboss_reserved_anonymous_field_1().has_b()); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !b().Ok()) return false; + } - if (!has_b_true().Known()) return false; - if (has_b_true().ValueOrDefault() && !b_true().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::And(::emboss::support::Maybe(true), emboss_reserved_anonymous_field_1().has_b_true()); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !b_true().Ok()) return false; + } - if (!has_IntrinsicSizeInBytes().Known()) return false; - if (has_IntrinsicSizeInBytes().ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + } - if (!has_MaxSizeInBytes().Known()) return false; - if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + } - if (!has_MinSizeInBytes().Known()) return false; - if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + } if (!(::emboss::support::Or((a().Ok() ? ::emboss::support::Maybe(static_cast(a().UncheckedRead())) : ::emboss::support::Maybe()), (b().Ok() ? ::emboss::support::Maybe(static_cast(b().UncheckedRead())) : ::emboss::support::Maybe()))).ValueOr(false)) @@ -4847,20 +5003,33 @@ class GenericElementView final { bool Ok() const { if (!IsComplete()) return false; - if (!has_x().Known()) return false; - if (has_x().ValueOrDefault() && !x().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !x().Ok()) return false; + } - if (!has_IntrinsicSizeInBytes().Known()) return false; - if (has_IntrinsicSizeInBytes().ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + } - if (!has_MaxSizeInBytes().Known()) return false; - if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + } - if (!has_MinSizeInBytes().Known()) return false; - if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + } @@ -5261,20 +5430,33 @@ class GenericRequiresInArrayElementsView final { bool Ok() const { if (!IsComplete()) return false; - if (!has_xs().Known()) return false; - if (has_xs().ValueOrDefault() && !xs().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !xs().Ok()) return false; + } - if (!has_IntrinsicSizeInBytes().Known()) return false; - if (has_IntrinsicSizeInBytes().ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + } - if (!has_MaxSizeInBytes().Known()) return false; - if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + } - if (!has_MinSizeInBytes().Known()) return false; - if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + } diff --git a/testdata/golden_cpp/start_size_range.emb.h b/testdata/golden_cpp/start_size_range.emb.h index d9f0166..f4f3c71 100644 --- a/testdata/golden_cpp/start_size_range.emb.h +++ b/testdata/golden_cpp/start_size_range.emb.h @@ -93,32 +93,54 @@ class GenericStartSizeView final { bool Ok() const { if (!IsComplete()) return false; - if (!has_size().Known()) return false; - if (has_size().ValueOrDefault() && !size().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !size().Ok()) return false; + } - if (!has_start_size_constants().Known()) return false; - if (has_start_size_constants().ValueOrDefault() && !start_size_constants().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !start_size_constants().Ok()) return false; + } - if (!has_payload().Known()) return false; - if (has_payload().ValueOrDefault() && !payload().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !payload().Ok()) return false; + } - if (!has_counter().Known()) return false; - if (has_counter().ValueOrDefault() && !counter().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !counter().Ok()) return false; + } - if (!has_IntrinsicSizeInBytes().Known()) return false; - if (has_IntrinsicSizeInBytes().ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + } - if (!has_MaxSizeInBytes().Known()) return false; - if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + } - if (!has_MinSizeInBytes().Known()) return false; - if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + } diff --git a/testdata/golden_cpp/subtypes.emb.h b/testdata/golden_cpp/subtypes.emb.h index 860d554..5177de1 100644 --- a/testdata/golden_cpp/subtypes.emb.h +++ b/testdata/golden_cpp/subtypes.emb.h @@ -226,28 +226,47 @@ class GenericInInView final { bool Ok() const { if (!IsComplete()) return false; - if (!has_outer_offset().Known()) return false; - if (has_outer_offset().ValueOrDefault() && !outer_offset().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !outer_offset().Ok()) return false; + } - if (!has_field_enum().Known()) return false; - if (has_field_enum().ValueOrDefault() && !field_enum().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !field_enum().Ok()) return false; + } - if (!has_in_2().Known()) return false; - if (has_in_2().ValueOrDefault() && !in_2().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !in_2().Ok()) return false; + } - if (!has_IntrinsicSizeInBytes().Known()) return false; - if (has_IntrinsicSizeInBytes().ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + } - if (!has_MaxSizeInBytes().Known()) return false; - if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + } - if (!has_MinSizeInBytes().Known()) return false; - if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + } @@ -778,40 +797,68 @@ class GenericInView final { bool Ok() const { if (!IsComplete()) return false; - if (!has_in_in_1().Known()) return false; - if (has_in_in_1().ValueOrDefault() && !in_in_1().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !in_in_1().Ok()) return false; + } - if (!has_in_in_2().Known()) return false; - if (has_in_in_2().ValueOrDefault() && !in_in_2().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !in_in_2().Ok()) return false; + } - if (!has_in_in_in_1().Known()) return false; - if (has_in_in_in_1().ValueOrDefault() && !in_in_in_1().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !in_in_in_1().Ok()) return false; + } - if (!has_in_2().Known()) return false; - if (has_in_2().ValueOrDefault() && !in_2().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !in_2().Ok()) return false; + } - if (!has_name_collision().Known()) return false; - if (has_name_collision().ValueOrDefault() && !name_collision().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !name_collision().Ok()) return false; + } - if (!has_name_collision_check().Known()) return false; - if (has_name_collision_check().ValueOrDefault() && !name_collision_check().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !name_collision_check().Ok()) return false; + } - if (!has_IntrinsicSizeInBytes().Known()) return false; - if (has_IntrinsicSizeInBytes().ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + } - if (!has_MaxSizeInBytes().Known()) return false; - if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + } - if (!has_MinSizeInBytes().Known()) return false; - if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + } @@ -1627,20 +1674,33 @@ class GenericIn2View final { bool Ok() const { if (!IsComplete()) return false; - if (!has_field_byte().Known()) return false; - if (has_field_byte().ValueOrDefault() && !field_byte().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !field_byte().Ok()) return false; + } - if (!has_IntrinsicSizeInBytes().Known()) return false; - if (has_IntrinsicSizeInBytes().ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + } - if (!has_MaxSizeInBytes().Known()) return false; - if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + } - if (!has_MinSizeInBytes().Known()) return false; - if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + } @@ -2041,48 +2101,82 @@ class GenericOutView final { bool Ok() const { if (!IsComplete()) return false; - if (!has_in_1().Known()) return false; - if (has_in_1().ValueOrDefault() && !in_1().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !in_1().Ok()) return false; + } - if (!has_in_2().Known()) return false; - if (has_in_2().ValueOrDefault() && !in_2().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !in_2().Ok()) return false; + } - if (!has_in_in_1().Known()) return false; - if (has_in_in_1().ValueOrDefault() && !in_in_1().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !in_in_1().Ok()) return false; + } - if (!has_in_in_2().Known()) return false; - if (has_in_in_2().ValueOrDefault() && !in_in_2().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !in_in_2().Ok()) return false; + } - if (!has_in_in_in_1().Known()) return false; - if (has_in_in_in_1().ValueOrDefault() && !in_in_in_1().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !in_in_in_1().Ok()) return false; + } - if (!has_in_in_in_2().Known()) return false; - if (has_in_in_in_2().ValueOrDefault() && !in_in_in_2().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !in_in_in_2().Ok()) return false; + } - if (!has_name_collision().Known()) return false; - if (has_name_collision().ValueOrDefault() && !name_collision().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !name_collision().Ok()) return false; + } - if (!has_nested_constant_check().Known()) return false; - if (has_nested_constant_check().ValueOrDefault() && !nested_constant_check().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !nested_constant_check().Ok()) return false; + } - if (!has_IntrinsicSizeInBytes().Known()) return false; - if (has_IntrinsicSizeInBytes().ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + } - if (!has_MaxSizeInBytes().Known()) return false; - if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + } - if (!has_MinSizeInBytes().Known()) return false; - if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + } diff --git a/testdata/golden_cpp/text_format.emb.h b/testdata/golden_cpp/text_format.emb.h index 46f257d..5103a11 100644 --- a/testdata/golden_cpp/text_format.emb.h +++ b/testdata/golden_cpp/text_format.emb.h @@ -107,24 +107,40 @@ class GenericVanillaView final { bool Ok() const { if (!IsComplete()) return false; - if (!has_a().Known()) return false; - if (has_a().ValueOrDefault() && !a().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !a().Ok()) return false; + } - if (!has_b().Known()) return false; - if (has_b().ValueOrDefault() && !b().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !b().Ok()) return false; + } - if (!has_IntrinsicSizeInBytes().Known()) return false; - if (has_IntrinsicSizeInBytes().ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + } - if (!has_MaxSizeInBytes().Known()) return false; - if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + } - if (!has_MinSizeInBytes().Known()) return false; - if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + } @@ -608,28 +624,47 @@ class GenericStructWithSkippedFieldsView final { bool Ok() const { if (!IsComplete()) return false; - if (!has_a().Known()) return false; - if (has_a().ValueOrDefault() && !a().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !a().Ok()) return false; + } - if (!has_b().Known()) return false; - if (has_b().ValueOrDefault() && !b().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !b().Ok()) return false; + } - if (!has_c().Known()) return false; - if (has_c().ValueOrDefault() && !c().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !c().Ok()) return false; + } - if (!has_IntrinsicSizeInBytes().Known()) return false; - if (has_IntrinsicSizeInBytes().ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + } - if (!has_MaxSizeInBytes().Known()) return false; - if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + } - if (!has_MinSizeInBytes().Known()) return false; - if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + } @@ -1160,28 +1195,47 @@ class GenericStructWithSkippedStructureFieldsView final { bool Ok() const { if (!IsComplete()) return false; - if (!has_a().Known()) return false; - if (has_a().ValueOrDefault() && !a().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !a().Ok()) return false; + } - if (!has_b().Known()) return false; - if (has_b().ValueOrDefault() && !b().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !b().Ok()) return false; + } - if (!has_c().Known()) return false; - if (has_c().ValueOrDefault() && !c().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !c().Ok()) return false; + } - if (!has_IntrinsicSizeInBytes().Known()) return false; - if (has_IntrinsicSizeInBytes().ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + } - if (!has_MaxSizeInBytes().Known()) return false; - if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + } - if (!has_MinSizeInBytes().Known()) return false; - if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + } diff --git a/testdata/golden_cpp/uint_sizes.emb.h b/testdata/golden_cpp/uint_sizes.emb.h index df5eb3f..60c8780 100644 --- a/testdata/golden_cpp/uint_sizes.emb.h +++ b/testdata/golden_cpp/uint_sizes.emb.h @@ -149,48 +149,82 @@ class GenericSizesView final { bool Ok() const { if (!IsComplete()) return false; - if (!has_one_byte().Known()) return false; - if (has_one_byte().ValueOrDefault() && !one_byte().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !one_byte().Ok()) return false; + } - if (!has_two_byte().Known()) return false; - if (has_two_byte().ValueOrDefault() && !two_byte().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !two_byte().Ok()) return false; + } - if (!has_three_byte().Known()) return false; - if (has_three_byte().ValueOrDefault() && !three_byte().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !three_byte().Ok()) return false; + } - if (!has_four_byte().Known()) return false; - if (has_four_byte().ValueOrDefault() && !four_byte().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !four_byte().Ok()) return false; + } - if (!has_five_byte().Known()) return false; - if (has_five_byte().ValueOrDefault() && !five_byte().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !five_byte().Ok()) return false; + } - if (!has_six_byte().Known()) return false; - if (has_six_byte().ValueOrDefault() && !six_byte().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !six_byte().Ok()) return false; + } - if (!has_seven_byte().Known()) return false; - if (has_seven_byte().ValueOrDefault() && !seven_byte().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !seven_byte().Ok()) return false; + } - if (!has_eight_byte().Known()) return false; - if (has_eight_byte().ValueOrDefault() && !eight_byte().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !eight_byte().Ok()) return false; + } - if (!has_IntrinsicSizeInBytes().Known()) return false; - if (has_IntrinsicSizeInBytes().ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + } - if (!has_MaxSizeInBytes().Known()) return false; - if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + } - if (!has_MinSizeInBytes().Known()) return false; - if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + } @@ -1141,48 +1175,82 @@ class GenericBigEndianSizesView final { bool Ok() const { if (!IsComplete()) return false; - if (!has_one_byte().Known()) return false; - if (has_one_byte().ValueOrDefault() && !one_byte().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !one_byte().Ok()) return false; + } - if (!has_two_byte().Known()) return false; - if (has_two_byte().ValueOrDefault() && !two_byte().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !two_byte().Ok()) return false; + } - if (!has_three_byte().Known()) return false; - if (has_three_byte().ValueOrDefault() && !three_byte().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !three_byte().Ok()) return false; + } - if (!has_four_byte().Known()) return false; - if (has_four_byte().ValueOrDefault() && !four_byte().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !four_byte().Ok()) return false; + } - if (!has_five_byte().Known()) return false; - if (has_five_byte().ValueOrDefault() && !five_byte().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !five_byte().Ok()) return false; + } - if (!has_six_byte().Known()) return false; - if (has_six_byte().ValueOrDefault() && !six_byte().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !six_byte().Ok()) return false; + } - if (!has_seven_byte().Known()) return false; - if (has_seven_byte().ValueOrDefault() && !seven_byte().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !seven_byte().Ok()) return false; + } - if (!has_eight_byte().Known()) return false; - if (has_eight_byte().ValueOrDefault() && !eight_byte().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !eight_byte().Ok()) return false; + } - if (!has_IntrinsicSizeInBytes().Known()) return false; - if (has_IntrinsicSizeInBytes().ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + } - if (!has_MaxSizeInBytes().Known()) return false; - if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + } - if (!has_MinSizeInBytes().Known()) return false; - if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + } @@ -2133,48 +2201,82 @@ class GenericAlternatingEndianSizesView final { bool Ok() const { if (!IsComplete()) return false; - if (!has_one_byte().Known()) return false; - if (has_one_byte().ValueOrDefault() && !one_byte().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !one_byte().Ok()) return false; + } - if (!has_two_byte().Known()) return false; - if (has_two_byte().ValueOrDefault() && !two_byte().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !two_byte().Ok()) return false; + } - if (!has_three_byte().Known()) return false; - if (has_three_byte().ValueOrDefault() && !three_byte().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !three_byte().Ok()) return false; + } - if (!has_four_byte().Known()) return false; - if (has_four_byte().ValueOrDefault() && !four_byte().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !four_byte().Ok()) return false; + } - if (!has_five_byte().Known()) return false; - if (has_five_byte().ValueOrDefault() && !five_byte().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !five_byte().Ok()) return false; + } - if (!has_six_byte().Known()) return false; - if (has_six_byte().ValueOrDefault() && !six_byte().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !six_byte().Ok()) return false; + } - if (!has_seven_byte().Known()) return false; - if (has_seven_byte().ValueOrDefault() && !seven_byte().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !seven_byte().Ok()) return false; + } - if (!has_eight_byte().Known()) return false; - if (has_eight_byte().ValueOrDefault() && !eight_byte().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !eight_byte().Ok()) return false; + } - if (!has_IntrinsicSizeInBytes().Known()) return false; - if (has_IntrinsicSizeInBytes().ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + } - if (!has_MaxSizeInBytes().Known()) return false; - if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + } - if (!has_MinSizeInBytes().Known()) return false; - if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + } @@ -3125,48 +3227,82 @@ class GenericEnumSizesView final { bool Ok() const { if (!IsComplete()) return false; - if (!has_one_byte().Known()) return false; - if (has_one_byte().ValueOrDefault() && !one_byte().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !one_byte().Ok()) return false; + } - if (!has_two_byte().Known()) return false; - if (has_two_byte().ValueOrDefault() && !two_byte().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !two_byte().Ok()) return false; + } - if (!has_three_byte().Known()) return false; - if (has_three_byte().ValueOrDefault() && !three_byte().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !three_byte().Ok()) return false; + } - if (!has_four_byte().Known()) return false; - if (has_four_byte().ValueOrDefault() && !four_byte().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !four_byte().Ok()) return false; + } - if (!has_five_byte().Known()) return false; - if (has_five_byte().ValueOrDefault() && !five_byte().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !five_byte().Ok()) return false; + } - if (!has_six_byte().Known()) return false; - if (has_six_byte().ValueOrDefault() && !six_byte().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !six_byte().Ok()) return false; + } - if (!has_seven_byte().Known()) return false; - if (has_seven_byte().ValueOrDefault() && !seven_byte().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !seven_byte().Ok()) return false; + } - if (!has_eight_byte().Known()) return false; - if (has_eight_byte().ValueOrDefault() && !eight_byte().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !eight_byte().Ok()) return false; + } - if (!has_IntrinsicSizeInBytes().Known()) return false; - if (has_IntrinsicSizeInBytes().ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + } - if (!has_MaxSizeInBytes().Known()) return false; - if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + } - if (!has_MinSizeInBytes().Known()) return false; - if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + } @@ -4126,20 +4262,33 @@ class GenericEmbossReservedAnonymousField1View final { bool Ok() const { if (!IsComplete()) return false; - if (!has_three_and_a_half_byte().Known()) return false; - if (has_three_and_a_half_byte().ValueOrDefault() && !three_and_a_half_byte().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !three_and_a_half_byte().Ok()) return false; + } - if (!has_IntrinsicSizeInBits().Known()) return false; - if (has_IntrinsicSizeInBits().ValueOrDefault() && !IntrinsicSizeInBits().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBits().Ok()) return false; + } - if (!has_MaxSizeInBits().Known()) return false; - if (has_MaxSizeInBits().ValueOrDefault() && !MaxSizeInBits().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBits().Ok()) return false; + } - if (!has_MinSizeInBits().Known()) return false; - if (has_MinSizeInBits().ValueOrDefault() && !MinSizeInBits().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBits().Ok()) return false; + } @@ -4541,36 +4690,61 @@ class GenericExplicitlySizedEnumSizesView final { bool Ok() const { if (!IsComplete()) return false; - if (!has_one_byte().Known()) return false; - if (has_one_byte().ValueOrDefault() && !one_byte().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !one_byte().Ok()) return false; + } - if (!has_two_byte().Known()) return false; - if (has_two_byte().ValueOrDefault() && !two_byte().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !two_byte().Ok()) return false; + } - if (!has_three_byte().Known()) return false; - if (has_three_byte().ValueOrDefault() && !three_byte().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !three_byte().Ok()) return false; + } - if (!has_emboss_reserved_anonymous_field_1().Known()) return false; - if (has_emboss_reserved_anonymous_field_1().ValueOrDefault() && !emboss_reserved_anonymous_field_1().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !emboss_reserved_anonymous_field_1().Ok()) return false; + } - if (!has_three_and_a_half_byte().Known()) return false; - if (has_three_and_a_half_byte().ValueOrDefault() && !three_and_a_half_byte().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::And(::emboss::support::Maybe(true), ::emboss::support::Maybe(true)); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !three_and_a_half_byte().Ok()) return false; + } - if (!has_IntrinsicSizeInBytes().Known()) return false; - if (has_IntrinsicSizeInBytes().ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + } - if (!has_MaxSizeInBytes().Known()) return false; - if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + } - if (!has_MinSizeInBytes().Known()) return false; - if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + } @@ -5515,48 +5689,82 @@ class GenericArraySizesView final { bool Ok() const { if (!IsComplete()) return false; - if (!has_one_byte().Known()) return false; - if (has_one_byte().ValueOrDefault() && !one_byte().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !one_byte().Ok()) return false; + } - if (!has_two_byte().Known()) return false; - if (has_two_byte().ValueOrDefault() && !two_byte().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !two_byte().Ok()) return false; + } - if (!has_three_byte().Known()) return false; - if (has_three_byte().ValueOrDefault() && !three_byte().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !three_byte().Ok()) return false; + } - if (!has_four_byte().Known()) return false; - if (has_four_byte().ValueOrDefault() && !four_byte().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !four_byte().Ok()) return false; + } - if (!has_five_byte().Known()) return false; - if (has_five_byte().ValueOrDefault() && !five_byte().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !five_byte().Ok()) return false; + } - if (!has_six_byte().Known()) return false; - if (has_six_byte().ValueOrDefault() && !six_byte().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !six_byte().Ok()) return false; + } - if (!has_seven_byte().Known()) return false; - if (has_seven_byte().ValueOrDefault() && !seven_byte().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !seven_byte().Ok()) return false; + } - if (!has_eight_byte().Known()) return false; - if (has_eight_byte().ValueOrDefault() && !eight_byte().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !eight_byte().Ok()) return false; + } - if (!has_IntrinsicSizeInBytes().Known()) return false; - if (has_IntrinsicSizeInBytes().ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + } - if (!has_MaxSizeInBytes().Known()) return false; - if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + } - if (!has_MinSizeInBytes().Known()) return false; - if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + } diff --git a/testdata/golden_cpp/virtual_field.emb.h b/testdata/golden_cpp/virtual_field.emb.h index 140020a..d2544ed 100644 --- a/testdata/golden_cpp/virtual_field.emb.h +++ b/testdata/golden_cpp/virtual_field.emb.h @@ -253,56 +253,96 @@ class GenericStructureWithConstantsView final { bool Ok() const { if (!IsComplete()) return false; - if (!has_ten().Known()) return false; - if (has_ten().ValueOrDefault() && !ten().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !ten().Ok()) return false; + } - if (!has_twenty().Known()) return false; - if (has_twenty().ValueOrDefault() && !twenty().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !twenty().Ok()) return false; + } - if (!has_four_billion().Known()) return false; - if (has_four_billion().ValueOrDefault() && !four_billion().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !four_billion().Ok()) return false; + } - if (!has_ten_billion().Known()) return false; - if (has_ten_billion().ValueOrDefault() && !ten_billion().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !ten_billion().Ok()) return false; + } - if (!has_minus_ten_billion().Known()) return false; - if (has_minus_ten_billion().ValueOrDefault() && !minus_ten_billion().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !minus_ten_billion().Ok()) return false; + } - if (!has_value().Known()) return false; - if (has_value().ValueOrDefault() && !value().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !value().Ok()) return false; + } - if (!has_alias_of_value().Known()) return false; - if (has_alias_of_value().ValueOrDefault() && !alias_of_value().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !alias_of_value().Ok()) return false; + } - if (!has_alias_of_alias_of_value().Known()) return false; - if (has_alias_of_alias_of_value().ValueOrDefault() && !alias_of_alias_of_value().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !alias_of_alias_of_value().Ok()) return false; + } - if (!has_alias_of_ten().Known()) return false; - if (has_alias_of_ten().ValueOrDefault() && !alias_of_ten().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !alias_of_ten().Ok()) return false; + } - if (!has_alias_of_alias_of_ten().Known()) return false; - if (has_alias_of_alias_of_ten().ValueOrDefault() && !alias_of_alias_of_ten().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !alias_of_alias_of_ten().Ok()) return false; + } - if (!has_IntrinsicSizeInBytes().Known()) return false; - if (has_IntrinsicSizeInBytes().ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + } - if (!has_MaxSizeInBytes().Known()) return false; - if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + } - if (!has_MinSizeInBytes().Known()) return false; - if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + } @@ -1181,44 +1221,75 @@ class GenericStructureWithComputedValuesView final { bool Ok() const { if (!IsComplete()) return false; - if (!has_value().Known()) return false; - if (has_value().ValueOrDefault() && !value().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !value().Ok()) return false; + } - if (!has_doubled().Known()) return false; - if (has_doubled().ValueOrDefault() && !doubled().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !doubled().Ok()) return false; + } - if (!has_plus_ten().Known()) return false; - if (has_plus_ten().ValueOrDefault() && !plus_ten().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !plus_ten().Ok()) return false; + } - if (!has_value2().Known()) return false; - if (has_value2().ValueOrDefault() && !value2().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !value2().Ok()) return false; + } - if (!has_signed_doubled().Known()) return false; - if (has_signed_doubled().ValueOrDefault() && !signed_doubled().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !signed_doubled().Ok()) return false; + } - if (!has_signed_plus_ten().Known()) return false; - if (has_signed_plus_ten().ValueOrDefault() && !signed_plus_ten().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !signed_plus_ten().Ok()) return false; + } - if (!has_product().Known()) return false; - if (has_product().ValueOrDefault() && !product().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !product().Ok()) return false; + } - if (!has_IntrinsicSizeInBytes().Known()) return false; - if (has_IntrinsicSizeInBytes().ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + } - if (!has_MaxSizeInBytes().Known()) return false; - if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + } - if (!has_MinSizeInBytes().Known()) return false; - if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + } @@ -2211,28 +2282,47 @@ class GenericStructureWithConditionalValueView final { bool Ok() const { if (!IsComplete()) return false; - if (!has_x().Known()) return false; - if (has_x().ValueOrDefault() && !x().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !x().Ok()) return false; + } - if (!has_two_x().Known()) return false; - if (has_two_x().ValueOrDefault() && !two_x().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::LessThan((x().Ok() ? ::emboss::support::Maybe(static_cast(x().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(2147483648ULL))); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !two_x().Ok()) return false; + } - if (!has_x_plus_one().Known()) return false; - if (has_x_plus_one().ValueOrDefault() && !x_plus_one().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !x_plus_one().Ok()) return false; + } - if (!has_IntrinsicSizeInBytes().Known()) return false; - if (has_IntrinsicSizeInBytes().ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + } - if (!has_MaxSizeInBytes().Known()) return false; - if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + } - if (!has_MinSizeInBytes().Known()) return false; - if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + } @@ -2851,28 +2941,47 @@ class GenericStructureWithValueInConditionView final { bool Ok() const { if (!IsComplete()) return false; - if (!has_x().Known()) return false; - if (has_x().ValueOrDefault() && !x().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !x().Ok()) return false; + } - if (!has_two_x().Known()) return false; - if (has_two_x().ValueOrDefault() && !two_x().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !two_x().Ok()) return false; + } - if (!has_if_two_x_lt_100().Known()) return false; - if (has_if_two_x_lt_100().ValueOrDefault() && !if_two_x_lt_100().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::LessThan((two_x().Ok() ? ::emboss::support::Maybe(static_cast(two_x().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(100LL))); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !if_two_x_lt_100().Ok()) return false; + } - if (!has_IntrinsicSizeInBytes().Known()) return false; - if (has_IntrinsicSizeInBytes().ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + } - if (!has_MaxSizeInBytes().Known()) return false; - if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + } - if (!has_MinSizeInBytes().Known()) return false; - if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + } @@ -3470,32 +3579,54 @@ class GenericStructureWithValuesInLocationView final { bool Ok() const { if (!IsComplete()) return false; - if (!has_x().Known()) return false; - if (has_x().ValueOrDefault() && !x().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !x().Ok()) return false; + } - if (!has_two_x().Known()) return false; - if (has_two_x().ValueOrDefault() && !two_x().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !two_x().Ok()) return false; + } - if (!has_offset_two_x().Known()) return false; - if (has_offset_two_x().ValueOrDefault() && !offset_two_x().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !offset_two_x().Ok()) return false; + } - if (!has_size_two_x().Known()) return false; - if (has_size_two_x().ValueOrDefault() && !size_two_x().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !size_two_x().Ok()) return false; + } - if (!has_IntrinsicSizeInBytes().Known()) return false; - if (has_IntrinsicSizeInBytes().ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + } - if (!has_MaxSizeInBytes().Known()) return false; - if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + } - if (!has_MinSizeInBytes().Known()) return false; - if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + } @@ -4170,24 +4301,40 @@ class GenericStructureWithBoolValueView final { bool Ok() const { if (!IsComplete()) return false; - if (!has_x().Known()) return false; - if (has_x().ValueOrDefault() && !x().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !x().Ok()) return false; + } - if (!has_x_is_ten().Known()) return false; - if (has_x_is_ten().ValueOrDefault() && !x_is_ten().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !x_is_ten().Ok()) return false; + } - if (!has_IntrinsicSizeInBytes().Known()) return false; - if (has_IntrinsicSizeInBytes().ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + } - if (!has_MaxSizeInBytes().Known()) return false; - if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + } - if (!has_MinSizeInBytes().Known()) return false; - if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + } @@ -4763,24 +4910,40 @@ class GenericStructureWithEnumValueView final { bool Ok() const { if (!IsComplete()) return false; - if (!has_x().Known()) return false; - if (has_x().ValueOrDefault() && !x().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !x().Ok()) return false; + } - if (!has_x_size().Known()) return false; - if (has_x_size().ValueOrDefault() && !x_size().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !x_size().Ok()) return false; + } - if (!has_IntrinsicSizeInBytes().Known()) return false; - if (has_IntrinsicSizeInBytes().ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + } - if (!has_MaxSizeInBytes().Known()) return false; - if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + } - if (!has_MinSizeInBytes().Known()) return false; - if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + } @@ -5271,28 +5434,47 @@ class GenericStructureWithBitsWithValueView final { bool Ok() const { if (!IsComplete()) return false; - if (!has_b().Known()) return false; - if (has_b().ValueOrDefault() && !b().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !b().Ok()) return false; + } - if (!has_alias_of_b_sum().Known()) return false; - if (has_alias_of_b_sum().ValueOrDefault() && !alias_of_b_sum().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !alias_of_b_sum().Ok()) return false; + } - if (!has_alias_of_b_a().Known()) return false; - if (has_alias_of_b_a().ValueOrDefault() && !alias_of_b_a().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !alias_of_b_a().Ok()) return false; + } - if (!has_IntrinsicSizeInBytes().Known()) return false; - if (has_IntrinsicSizeInBytes().ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + } - if (!has_MaxSizeInBytes().Known()) return false; - if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + } - if (!has_MinSizeInBytes().Known()) return false; - if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + } @@ -5824,28 +6006,47 @@ class GenericBitsWithValueView final { bool Ok() const { if (!IsComplete()) return false; - if (!has_a().Known()) return false; - if (has_a().ValueOrDefault() && !a().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !a().Ok()) return false; + } - if (!has_b().Known()) return false; - if (has_b().ValueOrDefault() && !b().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !b().Ok()) return false; + } - if (!has_sum().Known()) return false; - if (has_sum().ValueOrDefault() && !sum().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !sum().Ok()) return false; + } - if (!has_IntrinsicSizeInBits().Known()) return false; - if (has_IntrinsicSizeInBits().ValueOrDefault() && !IntrinsicSizeInBits().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBits().Ok()) return false; + } - if (!has_MaxSizeInBits().Known()) return false; - if (has_MaxSizeInBits().ValueOrDefault() && !MaxSizeInBits().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBits().Ok()) return false; + } - if (!has_MinSizeInBits().Known()) return false; - if (has_MinSizeInBits().ValueOrDefault() && !MinSizeInBits().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBits().Ok()) return false; + } @@ -6413,24 +6614,40 @@ class GenericStructureUsingForeignConstantsView final { bool Ok() const { if (!IsComplete()) return false; - if (!has_x().Known()) return false; - if (has_x().ValueOrDefault() && !x().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !x().Ok()) return false; + } - if (!has_one_hundred().Known()) return false; - if (has_one_hundred().ValueOrDefault() && !one_hundred().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !one_hundred().Ok()) return false; + } - if (!has_IntrinsicSizeInBytes().Known()) return false; - if (has_IntrinsicSizeInBytes().ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + } - if (!has_MaxSizeInBytes().Known()) return false; - if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + } - if (!has_MinSizeInBytes().Known()) return false; - if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + } @@ -6896,24 +7113,40 @@ class GenericHeaderView final { bool Ok() const { if (!IsComplete()) return false; - if (!has_size().Known()) return false; - if (has_size().ValueOrDefault() && !size().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !size().Ok()) return false; + } - if (!has_message_id().Known()) return false; - if (has_message_id().ValueOrDefault() && !message_id().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !message_id().Ok()) return false; + } - if (!has_IntrinsicSizeInBytes().Known()) return false; - if (has_IntrinsicSizeInBytes().ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + } - if (!has_MaxSizeInBytes().Known()) return false; - if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + } - if (!has_MinSizeInBytes().Known()) return false; - if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + } @@ -7391,28 +7624,47 @@ class GenericSubfieldOfAliasView final { bool Ok() const { if (!IsComplete()) return false; - if (!has_header().Known()) return false; - if (has_header().ValueOrDefault() && !header().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !header().Ok()) return false; + } - if (!has_h().Known()) return false; - if (has_h().ValueOrDefault() && !h().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !h().Ok()) return false; + } - if (!has_size().Known()) return false; - if (has_size().ValueOrDefault() && !size().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !size().Ok()) return false; + } - if (!has_IntrinsicSizeInBytes().Known()) return false; - if (has_IntrinsicSizeInBytes().ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + } - if (!has_MaxSizeInBytes().Known()) return false; - if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + } - if (!has_MinSizeInBytes().Known()) return false; - if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + } @@ -7907,28 +8159,47 @@ class GenericRestrictedAliasView final { bool Ok() const { if (!IsComplete()) return false; - if (!has_a_b().Known()) return false; - if (has_a_b().ValueOrDefault() && !a_b().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !a_b().Ok()) return false; + } - if (!has_alias_switch().Known()) return false; - if (has_alias_switch().ValueOrDefault() && !alias_switch().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !alias_switch().Ok()) return false; + } - if (!has_a_b_alias().Known()) return false; - if (has_a_b_alias().ValueOrDefault() && !a_b_alias().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::GreaterThan((alias_switch().Ok() ? ::emboss::support::Maybe(static_cast(alias_switch().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(10LL))); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !a_b_alias().Ok()) return false; + } - if (!has_IntrinsicSizeInBytes().Known()) return false; - if (has_IntrinsicSizeInBytes().ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + } - if (!has_MaxSizeInBytes().Known()) return false; - if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + } - if (!has_MinSizeInBytes().Known()) return false; - if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + } @@ -8461,24 +8732,40 @@ class GenericXView final { bool Ok() const { if (!IsComplete()) return false; - if (!has_v().Known()) return false; - if (has_v().ValueOrDefault() && !v().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !v().Ok()) return false; + } - if (!has_y().Known()) return false; - if (has_y().ValueOrDefault() && !y().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::GreaterThan((v().Ok() ? ::emboss::support::Maybe(static_cast(v().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(10LL))); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !y().Ok()) return false; + } - if (!has_IntrinsicSizeInBytes().Known()) return false; - if (has_IntrinsicSizeInBytes().ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + } - if (!has_MaxSizeInBytes().Known()) return false; - if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + } - if (!has_MinSizeInBytes().Known()) return false; - if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + } @@ -8986,32 +9273,54 @@ class GenericHasFieldView final { bool Ok() const { if (!IsComplete()) return false; - if (!has_z().Known()) return false; - if (has_z().ValueOrDefault() && !z().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !z().Ok()) return false; + } - if (!has_x().Known()) return false; - if (has_x().ValueOrDefault() && !x().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::GreaterThan((z().Ok() ? ::emboss::support::Maybe(static_cast(z().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(10LL))); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !x().Ok()) return false; + } - if (!has_y().Known()) return false; - if (has_y().ValueOrDefault() && !y().Ok()) return false; + { + const auto emboss_reserved_local_field_present = x().has_y(); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !y().Ok()) return false; + } - if (!has_x_has_y().Known()) return false; - if (has_x_has_y().ValueOrDefault() && !x_has_y().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = has_x(); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !x_has_y().Ok()) return false; + } - if (!has_IntrinsicSizeInBytes().Known()) return false; - if (has_IntrinsicSizeInBytes().ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + } - if (!has_MaxSizeInBytes().Known()) return false; - if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + } - if (!has_MinSizeInBytes().Known()) return false; - if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + } @@ -9649,28 +9958,47 @@ class GenericVirtualUnconditionallyUsesConditionalView final { bool Ok() const { if (!IsComplete()) return false; - if (!has_x().Known()) return false; - if (has_x().ValueOrDefault() && !x().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !x().Ok()) return false; + } - if (!has_xc().Known()) return false; - if (has_xc().ValueOrDefault() && !xc().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Equal((x().Ok() ? ::emboss::support::Maybe(static_cast(x().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(0LL))); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !xc().Ok()) return false; + } - if (!has_x_nor_xc().Known()) return false; - if (has_x_nor_xc().ValueOrDefault() && !x_nor_xc().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !x_nor_xc().Ok()) return false; + } - if (!has_IntrinsicSizeInBytes().Known()) return false; - if (has_IntrinsicSizeInBytes().ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + } - if (!has_MaxSizeInBytes().Known()) return false; - if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + } - if (!has_MinSizeInBytes().Known()) return false; - if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + } @@ -10275,24 +10603,40 @@ class GenericRView final { bool Ok() const { if (!IsComplete()) return false; - if (!has_q().Known()) return false; - if (has_q().ValueOrDefault() && !q().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !q().Ok()) return false; + } - if (!has_IntrinsicSizeInBits().Known()) return false; - if (has_IntrinsicSizeInBits().ValueOrDefault() && !IntrinsicSizeInBits().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBits().Ok()) return false; + } - if (!has_q_plus_bit_size().Known()) return false; - if (has_q_plus_bit_size().ValueOrDefault() && !q_plus_bit_size().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !q_plus_bit_size().Ok()) return false; + } - if (!has_MaxSizeInBits().Known()) return false; - if (has_MaxSizeInBits().ValueOrDefault() && !MaxSizeInBits().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBits().Ok()) return false; + } - if (!has_MinSizeInBits().Known()) return false; - if (has_MinSizeInBits().ValueOrDefault() && !MinSizeInBits().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBits().Ok()) return false; + } @@ -10776,24 +11120,40 @@ class GenericUsesSizeView final { bool Ok() const { if (!IsComplete()) return false; - if (!has_r().Known()) return false; - if (has_r().ValueOrDefault() && !r().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !r().Ok()) return false; + } - if (!has_IntrinsicSizeInBytes().Known()) return false; - if (has_IntrinsicSizeInBytes().ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + } - if (!has_r_q_plus_byte_size().Known()) return false; - if (has_r_q_plus_byte_size().ValueOrDefault() && !r_q_plus_byte_size().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !r_q_plus_byte_size().Ok()) return false; + } - if (!has_MaxSizeInBytes().Known()) return false; - if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + } - if (!has_MinSizeInBytes().Known()) return false; - if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + } @@ -11280,24 +11640,40 @@ class GenericUsesExternalSizeView final { bool Ok() const { if (!IsComplete()) return false; - if (!has_x().Known()) return false; - if (has_x().ValueOrDefault() && !x().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !x().Ok()) return false; + } - if (!has_y().Known()) return false; - if (has_y().ValueOrDefault() && !y().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !y().Ok()) return false; + } - if (!has_IntrinsicSizeInBytes().Known()) return false; - if (has_IntrinsicSizeInBytes().ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + } - if (!has_MaxSizeInBytes().Known()) return false; - if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + } - if (!has_MinSizeInBytes().Known()) return false; - if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + } @@ -11780,40 +12156,68 @@ class GenericImplicitWriteBackView final { bool Ok() const { if (!IsComplete()) return false; - if (!has_x().Known()) return false; - if (has_x().ValueOrDefault() && !x().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !x().Ok()) return false; + } - if (!has_x_plus_ten().Known()) return false; - if (has_x_plus_ten().ValueOrDefault() && !x_plus_ten().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !x_plus_ten().Ok()) return false; + } - if (!has_ten_plus_x().Known()) return false; - if (has_ten_plus_x().ValueOrDefault() && !ten_plus_x().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !ten_plus_x().Ok()) return false; + } - if (!has_x_minus_ten().Known()) return false; - if (has_x_minus_ten().ValueOrDefault() && !x_minus_ten().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !x_minus_ten().Ok()) return false; + } - if (!has_ten_minus_x().Known()) return false; - if (has_ten_minus_x().ValueOrDefault() && !ten_minus_x().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !ten_minus_x().Ok()) return false; + } - if (!has_ten_minus_x_plus_ten().Known()) return false; - if (has_ten_minus_x_plus_ten().ValueOrDefault() && !ten_minus_x_plus_ten().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !ten_minus_x_plus_ten().Ok()) return false; + } - if (!has_IntrinsicSizeInBytes().Known()) return false; - if (has_IntrinsicSizeInBytes().ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + } - if (!has_MaxSizeInBytes().Known()) return false; - if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + } - if (!has_MinSizeInBytes().Known()) return false; - if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + + { + const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); + if (!emboss_reserved_local_field_present.Known()) return false; + if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + } diff --git a/testdata/many_conditionals.emb b/testdata/many_conditionals.emb new file mode 100644 index 0000000..6efa7c6 --- /dev/null +++ b/testdata/many_conditionals.emb @@ -0,0 +1,305 @@ +[(cpp) namespace: "emboss::test"] +[$default byte_order: "LittleEndian"] + + +struct LargeConditionals: + 0 [+4] UInt tag + if tag == 0: + 4 [+4] UInt f0 + + if tag == 1: + 4 [+4] UInt f1 + + if tag == 2: + 4 [+4] UInt f2 + + if tag == 3: + 4 [+4] UInt f3 + + if tag == 4: + 4 [+4] UInt f4 + + if tag == 5: + 4 [+4] UInt f5 + + if tag == 6: + 4 [+4] UInt f6 + + if tag == 7: + 4 [+4] UInt f7 + + if tag == 8: + 4 [+4] UInt f8 + + if tag == 9: + 4 [+4] UInt f9 + + if tag == 10: + 4 [+4] UInt f10 + + if tag == 11: + 4 [+4] UInt f11 + + if tag == 12: + 4 [+4] UInt f12 + + if tag == 13: + 4 [+4] UInt f13 + + if tag == 14: + 4 [+4] UInt f14 + + if tag == 15: + 4 [+4] UInt f15 + + if tag == 16: + 4 [+4] UInt f16 + + if tag == 17: + 4 [+4] UInt f17 + + if tag == 18: + 4 [+4] UInt f18 + + if tag == 19: + 4 [+4] UInt f19 + + if tag == 20: + 4 [+4] UInt f20 + + if tag == 21: + 4 [+4] UInt f21 + + if tag == 22: + 4 [+4] UInt f22 + + if tag == 23: + 4 [+4] UInt f23 + + if tag == 24: + 4 [+4] UInt f24 + + if tag == 25: + 4 [+4] UInt f25 + + if tag == 26: + 4 [+4] UInt f26 + + if tag == 27: + 4 [+4] UInt f27 + + if tag == 28: + 4 [+4] UInt f28 + + if tag == 29: + 4 [+4] UInt f29 + + if tag == 30: + 4 [+4] UInt f30 + + if tag == 31: + 4 [+4] UInt f31 + + if tag == 32: + 4 [+4] UInt f32 + + if tag == 33: + 4 [+4] UInt f33 + + if tag == 34: + 4 [+4] UInt f34 + + if tag == 35: + 4 [+4] UInt f35 + + if tag == 36: + 4 [+4] UInt f36 + + if tag == 37: + 4 [+4] UInt f37 + + if tag == 38: + 4 [+4] UInt f38 + + if tag == 39: + 4 [+4] UInt f39 + + if tag == 40: + 4 [+4] UInt f40 + + if tag == 41: + 4 [+4] UInt f41 + + if tag == 42: + 4 [+4] UInt f42 + + if tag == 43: + 4 [+4] UInt f43 + + if tag == 44: + 4 [+4] UInt f44 + + if tag == 45: + 4 [+4] UInt f45 + + if tag == 46: + 4 [+4] UInt f46 + + if tag == 47: + 4 [+4] UInt f47 + + if tag == 48: + 4 [+4] UInt f48 + + if tag == 49: + 4 [+4] UInt f49 + + if tag == 50: + 4 [+4] UInt f50 + + if tag == 51: + 4 [+4] UInt f51 + + if tag == 52: + 4 [+4] UInt f52 + + if tag == 53: + 4 [+4] UInt f53 + + if tag == 54: + 4 [+4] UInt f54 + + if tag == 55: + 4 [+4] UInt f55 + + if tag == 56: + 4 [+4] UInt f56 + + if tag == 57: + 4 [+4] UInt f57 + + if tag == 58: + 4 [+4] UInt f58 + + if tag == 59: + 4 [+4] UInt f59 + + if tag == 60: + 4 [+4] UInt f60 + + if tag == 61: + 4 [+4] UInt f61 + + if tag == 62: + 4 [+4] UInt f62 + + if tag == 63: + 4 [+4] UInt f63 + + if tag == 64: + 4 [+4] UInt f64 + + if tag == 65: + 4 [+4] UInt f65 + + if tag == 66: + 4 [+4] UInt f66 + + if tag == 67: + 4 [+4] UInt f67 + + if tag == 68: + 4 [+4] UInt f68 + + if tag == 69: + 4 [+4] UInt f69 + + if tag == 70: + 4 [+4] UInt f70 + + if tag == 71: + 4 [+4] UInt f71 + + if tag == 72: + 4 [+4] UInt f72 + + if tag == 73: + 4 [+4] UInt f73 + + if tag == 74: + 4 [+4] UInt f74 + + if tag == 75: + 4 [+4] UInt f75 + + if tag == 76: + 4 [+4] UInt f76 + + if tag == 77: + 4 [+4] UInt f77 + + if tag == 78: + 4 [+4] UInt f78 + + if tag == 79: + 4 [+4] UInt f79 + + if tag == 80: + 4 [+4] UInt f80 + + if tag == 81: + 4 [+4] UInt f81 + + if tag == 82: + 4 [+4] UInt f82 + + if tag == 83: + 4 [+4] UInt f83 + + if tag == 84: + 4 [+4] UInt f84 + + if tag == 85: + 4 [+4] UInt f85 + + if tag == 86: + 4 [+4] UInt f86 + + if tag == 87: + 4 [+4] UInt f87 + + if tag == 88: + 4 [+4] UInt f88 + + if tag == 89: + 4 [+4] UInt f89 + + if tag == 90: + 4 [+4] UInt f90 + + if tag == 91: + 4 [+4] UInt f91 + + if tag == 92: + 4 [+4] UInt f92 + + if tag == 93: + 4 [+4] UInt f93 + + if tag == 94: + 4 [+4] UInt f94 + + if tag == 95: + 4 [+4] UInt f95 + + if tag == 96: + 4 [+4] UInt f96 + + if tag == 97: + 4 [+4] UInt f97 + + if tag == 98: + 4 [+4] UInt f98 + + if tag == 99: + 4 [+4] UInt f99 From 8ea51fb31d3734ce0f12ed7c428e71679332b9db Mon Sep 17 00:00:00 2001 From: Aaron Webster Date: Wed, 3 Dec 2025 10:58:44 -0800 Subject: [PATCH 2/6] feat(cpp): Optimize generated C++ accessors and control flow --- .../back_end/cpp/generated_code_templates | 72 +- compiler/back_end/cpp/header_generator.py | 243 +- testdata/__init__.py | 13 - testdata/golden_cpp/alignments.emb.h | 426 +- testdata/golden_cpp/anonymous_bits.emb.h | 406 +- testdata/golden_cpp/auto_array_size.emb.h | 260 +- testdata/golden_cpp/bcd.emb.h | 478 +- testdata/golden_cpp/bits.emb.h | 874 ++-- testdata/golden_cpp/complex_offset.emb.h | 566 +-- testdata/golden_cpp/complex_structure.emb.h | 692 ++- testdata/golden_cpp/condition.emb.h | 4255 +++++++---------- testdata/golden_cpp/dynamic_size.emb.h | 1498 +++--- testdata/golden_cpp/enum.emb.h | 471 +- testdata/golden_cpp/enum_case.emb.h | 142 +- testdata/golden_cpp/explicit_sizes.emb.h | 464 +- testdata/golden_cpp/float.emb.h | 220 +- testdata/golden_cpp/imported.emb.h | 98 +- testdata/golden_cpp/imported_genfiles.emb.h | 98 +- testdata/golden_cpp/importer.emb.h | 110 +- testdata/golden_cpp/importer2.emb.h | 98 +- testdata/golden_cpp/inline_type.emb.h | 110 +- testdata/golden_cpp/int_sizes.emb.h | 182 +- testdata/golden_cpp/large_array.emb.h | 114 +- testdata/golden_cpp/nested_structure.emb.h | 342 +- testdata/golden_cpp/next_keyword.emb.h | 134 +- testdata/golden_cpp/no_enum_traits.emb.h | 98 +- testdata/golden_cpp/parameters.emb.h | 1810 +++---- testdata/golden_cpp/requires.emb.h | 1209 ++--- testdata/golden_cpp/start_size_range.emb.h | 138 +- testdata/golden_cpp/subtypes.emb.h | 572 +-- testdata/golden_cpp/text_format.emb.h | 354 +- testdata/golden_cpp/uint_sizes.emb.h | 1157 ++--- testdata/golden_cpp/virtual_field.emb.h | 2953 +++++------- 33 files changed, 8224 insertions(+), 12433 deletions(-) diff --git a/compiler/back_end/cpp/generated_code_templates b/compiler/back_end/cpp/generated_code_templates index 5ea3ca5..9a32f50 100644 --- a/compiler/back_end/cpp/generated_code_templates +++ b/compiler/back_end/cpp/generated_code_templates @@ -124,7 +124,7 @@ class Generic${name}View final { ${enum_usings} - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; ${parameter_ok_checks} ${ok_subexpressions} @@ -132,8 +132,8 @@ ${field_ok_checks} ${requires_check} return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeIn${units}().Ok() && backing_.SizeIn${units}() >= static_cast( @@ -142,12 +142,12 @@ ${requires_check} ${size_method} template - bool Equals( + [[nodiscard]] bool Equals( Generic${name}View emboss_reserved_local_other) const { ${equals_method_body} return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( Generic${name}View emboss_reserved_local_other) const { ${unchecked_equals_method_body} return true; } @@ -172,7 +172,7 @@ ${size_method} emboss_reserved_local_other.IntrinsicSizeIn${units}().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( Generic${name}View emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -181,7 +181,7 @@ ${size_method} ${text_stream_methods} - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } ${field_method_declarations} @@ -216,7 +216,7 @@ struct EmbossReservedInternalIsGeneric${name}View< }; template -inline Generic${name}View< +[[nodiscard]] inline Generic${name}View< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -231,7 +231,7 @@ Make${name}View(${constructor_parameters} T &&emboss_reserved_local_arg) { } template -inline Generic${name}View> +[[nodiscard]] inline Generic${name}View> Make${name}View(${constructor_parameters} T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return Generic${name}View>( @@ -240,7 +240,7 @@ Make${name}View(${constructor_parameters} T *emboss_reserved_local_data, } template -inline Generic${name}View< +[[nodiscard]] inline Generic${name}View< /**/ ::emboss::support::ContiguousBuffer> MakeAligned${name}View( ${constructor_parameters} T *emboss_reserved_local_data, @@ -375,18 +375,18 @@ ${write_fields} } // ** constant_structure_size_method ** //////////////////////////////////////// - static constexpr ::std::size_t SizeIn${units}() { + [[nodiscard]] static constexpr ::std::size_t SizeIn${units}() { return static_cast(IntrinsicSizeIn${units}().Read()); } - static constexpr bool SizeIsKnown() { + [[nodiscard]] static constexpr bool SizeIsKnown() { return IntrinsicSizeIn${units}().Ok(); } // ** runtime_structure_size_method ** ///////////////////////////////////////// - ::std::size_t SizeIn${units}() const { + [[nodiscard]] ::std::size_t SizeIn${units}() const { return static_cast(IntrinsicSizeIn${units}().Read()); } - bool SizeIsKnown() const { return IntrinsicSizeIn${units}().Ok(); } + [[nodiscard]] bool SizeIsKnown() const { return IntrinsicSizeIn${units}().Ok(); } // ** ok_method_test ** //////////////////////////////////////////////////////// @@ -491,8 +491,8 @@ struct ${name} { // ** structure_single_field_method_declarations ** //////////////////////////// ${visibility}: - typename ${type_reader} ${name}() const; - ::emboss::support::Maybe has_${name}() const; + [[nodiscard]] typename ${type_reader} ${name}() const; + [[nodiscard]] ::emboss::support::Maybe has_${name}() const; // ** structure_single_field_method_definitions ** ///////////////////////////// @@ -547,9 +547,9 @@ Generic${parent_type}View::has_${name}() const { default; ~${virtual_view_type_name}() = default; - static constexpr ${logical_type} Read(); - static constexpr ${logical_type} UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ${logical_type} Read(); + [[nodiscard]] static constexpr ${logical_type} UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -558,13 +558,13 @@ Generic${parent_type}View::has_${name}() const { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr ${virtual_view_type_name} ${name}() { + [[nodiscard]] static constexpr ${virtual_view_type_name} ${name}() { return ${virtual_view_type_name}(); } - static constexpr ::emboss::support::Maybe has_${name}() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_${name}() { return ::emboss::support::Maybe(true); } @@ -607,14 +607,14 @@ Generic${parent_type}View< default; ~${virtual_view_type_name}() = default; - ${logical_type} Read() const { + [[nodiscard]] ${logical_type} Read() const { EMBOSS_CHECK(view_.has_${name}().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - ${logical_type} UncheckedRead() const { + [[nodiscard]] ${logical_type} UncheckedRead() const { // UncheckedRead() on a virtual still calls Ok() on its dependencies; // i.e., it still does some bounds checking. This is because of a subtle // case, illustrated by the example below: @@ -648,7 +648,7 @@ Generic${parent_type}View< } // Ok() can be false if some dependency is unreadable, *or* if there is an // error somewhere in the arithmetic -- say, division by zero. - bool Ok() const { + [[nodiscard]] bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -661,17 +661,17 @@ Generic${parent_type}View< this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } ${write_methods} private: - ::emboss::support::Maybe MaybeRead() const { + [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { ${read_subexpressions} return ${read_value}; } - static constexpr bool ValueIsOk( + [[nodiscard]] static constexpr bool ValueIsOk( ${logical_type} emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ${value_is_ok}.ValueOr(false); @@ -679,12 +679,12 @@ ${read_subexpressions} const Generic${parent_type}View view_; }; - ${virtual_view_type_name} ${name}() const; - ::emboss::support::Maybe has_${name}() const; + [[nodiscard]] ${virtual_view_type_name} ${name}() const; + [[nodiscard]] ::emboss::support::Maybe has_${name}() const; // ** structure_single_virtual_field_write_methods ** ////////////////////////// - bool TryToWrite(${logical_type} emboss_reserved_local_value) { + [[nodiscard]] bool TryToWrite(${logical_type} emboss_reserved_local_value) { const auto emboss_reserved_local_maybe_new_value = ${transform}; if (!CouldWriteValue(emboss_reserved_local_value)) return false; return view_.${destination}.TryToWrite( @@ -698,7 +698,7 @@ ${read_subexpressions} void UncheckedWrite(${logical_type} emboss_reserved_local_value) { view_.${destination}.UncheckedWrite((${transform}).ValueOrDefault()); } - bool CouldWriteValue(${logical_type} emboss_reserved_local_value) { + [[nodiscard]] bool CouldWriteValue(${logical_type} emboss_reserved_local_value) { if (!ValueIsOk(emboss_reserved_local_value)) return false; const auto emboss_reserved_local_maybe_new_value = ${transform}; if (!emboss_reserved_local_maybe_new_value.Known()) return false; @@ -731,11 +731,11 @@ Generic${parent_type}View::has_${name}() const { // ** structure_single_field_indirect_method_declarations ** /////////////////// ${visibility}: // The "this->" is required for (some versions of?) GCC. - auto ${name}() const -> decltype(this->${aliased_field}) { + [[nodiscard]] auto ${name}() const -> decltype(this->${aliased_field}) { return has_${name}().ValueOrDefault() ? ${aliased_field} : decltype(this->${aliased_field})(); } - ::emboss::support::Maybe has_${name}() const; + [[nodiscard]] ::emboss::support::Maybe has_${name}() const; // ** struct_single_field_indirect_method_definitions ** /////////////////////// @@ -749,14 +749,14 @@ Generic${parent_type}View::has_${name}() const { // ** structure_single_parameter_field_method_declarations ** ////////////////// private: // TODO(bolms): Is there any harm if these are public methods? - constexpr ::emboss::support::MaybeConstantView + [[nodiscard]] constexpr ::emboss::support::MaybeConstantView ${name}() const { return parameters_initialized_ ? ::emboss::support::MaybeConstantView( ${name}_) : ::emboss::support::MaybeConstantView(); } - constexpr ::emboss::support::Maybe has_${name}() const { + [[nodiscard]] constexpr ::emboss::support::Maybe has_${name}() const { return ::emboss::support::Maybe(parameters_initialized_); } diff --git a/compiler/back_end/cpp/header_generator.py b/compiler/back_end/cpp/header_generator.py index 8e504ad..4489d21 100644 --- a/compiler/back_end/cpp/header_generator.py +++ b/compiler/back_end/cpp/header_generator.py @@ -768,15 +768,24 @@ def render_field(self, expression, ir, subexpressions): ) -class _SubexpressionStore(object): - """Holder for subexpressions to be assigned to local variables.""" +class ExpressionScope(object): + """Holder for subexpressions to be assigned to local variables, with scoping.""" - def __init__(self, prefix): + def __init__(self, prefix, parent=None): self._prefix = prefix + self._parent = parent self._subexpr_to_name = {} self._index_to_subexpr = [] def add(self, subexpr): + # Check if expression exists in current or parent scopes + scope = self + while scope: + if subexpr in scope._subexpr_to_name: + return scope._subexpr_to_name[subexpr] + scope = scope._parent + + # Not found, add to current scope if subexpr not in self._subexpr_to_name: self._index_to_subexpr.append(subexpr) self._subexpr_to_name[subexpr] = self._prefix + str( @@ -790,43 +799,13 @@ def subexprs(self): for subexpr in self._index_to_subexpr ] - -class _UsageCountingStore(object): - """A mock SubexpressionStore that counts subexpression usage.""" - - def __init__(self): - self.counts = collections.defaultdict(int) - - def add(self, subexpr): - self.counts[subexpr] += 1 - return subexpr - - -class _SmartSubexpressionStore(object): - """A SubexpressionStore that only caches subexpressions used multiple times.""" - - def __init__(self, prefix, counts): - self._prefix = prefix - self._counts = counts - self._subexpr_to_name = {} - self._index_to_subexpr = [] - - def add(self, subexpr): - if self._counts[subexpr] <= 1: - return subexpr - - if subexpr not in self._subexpr_to_name: - self._index_to_subexpr.append(subexpr) - self._subexpr_to_name[subexpr] = self._prefix + str( - len(self._index_to_subexpr) - ) - return self._subexpr_to_name[subexpr] - - def subexprs(self): - return [ - (self._subexpr_to_name[subexpr], subexpr) - for subexpr in self._index_to_subexpr - ] + def definition_code(self): + return "".join( + [ + " const auto {} = {};\n".format(name, subexpr) + for name, subexpr in self.subexprs() + ] + ) _ExpressionResult = collections.namedtuple( @@ -842,7 +821,7 @@ def _render_expression(expression, ir, field_reader=None, subexpressions=None): ir: The IR in which to look up references. field_reader: An object with render_existence and render_field methods appropriate for the C++ context of the expression. - subexpressions: A _SubexpressionStore in which to put subexpressions, or + subexpressions: A ExpressionScope in which to put subexpressions, or None if subexpressions should be inline. Returns: @@ -1023,7 +1002,7 @@ def _generate_structure_virtual_field_methods(enclosing_type_name, field_ir, ir) if field_ir.write_method.which_method == "alias": return _generate_field_indirection(field_ir, enclosing_type_name, ir) - read_subexpressions = _SubexpressionStore("emboss_reserved_local_subexpr_") + read_subexpressions = ExpressionScope("emboss_reserved_local_subexpr_") read_value = _render_expression( field_ir.read_transform, ir, @@ -1177,7 +1156,7 @@ def _generate_structure_physical_field_methods( field_name = field_ir.name.canonical_name.object_path[-1] - subexpressions = _SubexpressionStore("emboss_reserved_local_subexpr_") + subexpressions = ExpressionScope("emboss_reserved_local_subexpr_") parameter_values = [] parameters_known = [] for parameter in parameter_expressions: @@ -1370,6 +1349,143 @@ def _cpp_field_name(name): return name +def _is_equality_check(expression): + return ( + expression.which_expression == "function" + and expression.function.function == ir_data.FunctionMapping.EQUALITY + and len(expression.function.args) == 2 + ) + + +def _render_case_label(expression, ir): + if expression.type.which_type == "integer": + return _render_integer(int(expression.type.integer.modular_value)) + elif expression.type.which_type == "enumeration": + # Need fully qualified enum type name + enum_type = expression.type.enumeration + cpp_enum_type = _get_fully_qualified_name(enum_type.name.canonical_name, ir) + return "static_cast({})".format(cpp_enum_type, enum_type.value) + else: + assert False, "Unsupported switch case type" + + +def _get_switch_candidate(expression, ir): + """Returns (discriminant_expr, case_value_expr) or (None, None).""" + if not _is_equality_check(expression): + return None, None + + arg0 = expression.function.args[0] + arg1 = expression.function.args[1] + + # Check if args are integer or enumeration (ignore boolean for switch) + if arg0.type.which_type not in ("integer", "enumeration"): + return None, None + + res0 = _render_expression(arg0, ir, subexpressions=None) + res1 = _render_expression(arg1, ir, subexpressions=None) + + if res0.is_constant and not res1.is_constant: + return arg1, arg0 + if res1.is_constant and not res0.is_constant: + return arg0, arg1 + + return None, None + + +def _generate_optimized_ok_method_body(fields, ir, subexpressions): + groups = {} + ordered_keys = [] + + for field in fields: + discrim_expr, case_expr = _get_switch_candidate(field.existence_condition, ir) + if discrim_expr: + discrim_str = _render_expression( + discrim_expr, ir, subexpressions=None + ).rendered + key = "SWITCH:" + discrim_str + if key not in groups: + groups[key] = {"type": "switch", "expr": discrim_expr, "cases": []} + ordered_keys.append(key) + + case_str = _render_case_label(case_expr, ir) + groups[key]["cases"].append((case_str, field)) + else: + cond_res = _render_expression( + field.existence_condition, ir, subexpressions=None + ) + key = "IF:" + cond_res.rendered + if key not in groups: + groups[key] = { + "type": "if", + "expr": field.existence_condition, + "fields": [], + } + ordered_keys.append(key) + groups[key]["fields"].append(field) + + lines = [] + for key in ordered_keys: + group = groups[key] + if group["type"] == "switch": + discrim_rendered = _render_expression( + group["expr"], ir, subexpressions=subexpressions + ).rendered + lines.append(" {") + # Create a new scope for the switch block + inner_scope = ExpressionScope( + "emboss_reserved_switch_scope_", parent=subexpressions + ) + lines.append(inner_scope.definition_code().rstrip()) + + lines.append( + " const auto emboss_reserved_switch_discrim = {};".format( + discrim_rendered + ) + ) + lines.append( + " if (!emboss_reserved_switch_discrim.Known()) return false;" + ) + lines.append( + " switch (emboss_reserved_switch_discrim.ValueOrDefault()) {" + ) + for case_val, field in group["cases"]: + lines.append(" case {}:".format(case_val)) + lines.append( + " if (!{}().Ok()) return false;".format( + _cpp_field_name(field.name.name.text) + ) + ) + lines.append(" break;") + lines.append(" }") + lines.append(" }") + else: + cond_rendered = _render_expression( + group["expr"], ir, subexpressions=subexpressions + ).rendered + lines.append(" {") + # Create a new scope for the if block + inner_scope = ExpressionScope( + "emboss_reserved_if_scope_", parent=subexpressions + ) + lines.append(inner_scope.definition_code().rstrip()) + + lines.append( + " const auto emboss_reserved_cond = {};".format(cond_rendered) + ) + lines.append(" if (!emboss_reserved_cond.Known()) return false;") + lines.append(" if (emboss_reserved_cond.ValueOrDefault()) {") + for field in group["fields"]: + lines.append( + " if (!{}().Ok()) return false;".format( + _cpp_field_name(field.name.name.text) + ) + ) + lines.append(" }") + lines.append(" }") + + return "\n".join([line for line in lines if line.strip()]) + + def _generate_structure_definition(type_ir, ir, config: Config): """Generates C++ for an Emboss structure (struct or bits). @@ -1393,7 +1509,7 @@ def _generate_structure_definition(type_ir, ir, config: Config): virtual_field_type_definitions = [] decode_field_clauses = [] write_field_clauses = [] - ok_method_clauses = [] + equals_method_clauses = [] unchecked_equals_method_clauses = [] enum_using_statements = [] @@ -1461,16 +1577,8 @@ def _generate_structure_definition(type_ir, ir, config: Config): initialize_parameters_initialized_true = "" parameter_checks = [""] - # Pass 1: Count subexpression usage. - ok_usage_counter = _UsageCountingStore() - for field_index in type_ir.structure.fields_in_dependency_order: - field = type_ir.structure.field[field_index] - _render_existence_test(field, ir, ok_usage_counter) - - # Pass 2: Generate code using smart store. - ok_subexpressions = _SmartSubexpressionStore( - "emboss_reserved_local_ok_subexpr_", ok_usage_counter.counts - ) + # Generate code using subexpression store. + ok_subexpressions = ExpressionScope("emboss_reserved_local_ok_subexpr_") for field_index in type_ir.structure.fields_in_dependency_order: field = type_ir.structure.field[field_index] helper_types, declaration, definition = _generate_structure_field_methods( @@ -1478,15 +1586,6 @@ def _generate_structure_definition(type_ir, ir, config: Config): ) field_helper_type_definitions.append(helper_types) field_method_definitions.append(definition) - ok_method_clauses.append( - code_template.format_template( - _TEMPLATES.ok_method_test, - field=_cpp_field_name(field.name.name.text) + "()", - existence_condition=_render_existence_test( - field, ir, subexpressions=ok_subexpressions - ).rendered, - ) - ) if not ir_util.field_is_virtual(field): # Virtual fields do not participate in equality tests -- they are equal by # definition. @@ -1543,6 +1642,15 @@ def _generate_structure_definition(type_ir, ir, config: Config): else: text_stream_methods = "" + field_ok_checks_body = _generate_optimized_ok_method_body( + [ + type_ir.structure.field[i] + for i in type_ir.structure.fields_in_dependency_order + ], + ir, + ok_subexpressions, + ) + class_forward_declarations = code_template.format_template( _TEMPLATES.structure_view_declaration, name=type_name ) @@ -1551,13 +1659,8 @@ def _generate_structure_definition(type_ir, ir, config: Config): name=type_ir.name.canonical_name.object_path[-1], size_method=_render_size_method(type_ir.structure.field, ir), field_method_declarations="".join(field_method_declarations), - field_ok_checks="\n".join(ok_method_clauses), - ok_subexpressions="".join( - [ - " const auto {} = {};\n".format(name, subexpr) - for name, subexpr in ok_subexpressions.subexprs() - ] - ), + field_ok_checks=field_ok_checks_body, + ok_subexpressions=ok_subexpressions.definition_code(), parameter_ok_checks="\n".join(parameter_checks), requires_check=requires_check, equals_method_body="\n".join(equals_method_clauses), diff --git a/testdata/__init__.py b/testdata/__init__.py index 086a24e..e69de29 100644 --- a/testdata/__init__.py +++ b/testdata/__init__.py @@ -1,13 +0,0 @@ -# Copyright 2019 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. diff --git a/testdata/golden_cpp/alignments.emb.h b/testdata/golden_cpp/alignments.emb.h index f225198..28b0042 100644 --- a/testdata/golden_cpp/alignments.emb.h +++ b/testdata/golden_cpp/alignments.emb.h @@ -113,128 +113,50 @@ class GenericAlignmentsView final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !zero_offset().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !zero_offset_substructure().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !two_offset_substructure().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !three_offset().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !four_offset().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !eleven_offset().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !twelve_offset().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !zero_offset_four_stride_array().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !zero_offset_six_stride_array().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !three_offset_four_stride_array().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !four_offset_six_stride_array().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!zero_offset().Ok()) return false; + if (!zero_offset_substructure().Ok()) return false; + if (!two_offset_substructure().Ok()) return false; + if (!three_offset().Ok()) return false; + if (!four_offset().Ok()) return false; + if (!eleven_offset().Ok()) return false; + if (!twelve_offset().Ok()) return false; + if (!zero_offset_four_stride_array().Ok()) return false; + if (!zero_offset_six_stride_array().Ok()) return false; + if (!three_offset_four_stride_array().Ok()) return false; + if (!four_offset_six_stride_array().Ok()) return false; + if (!IntrinsicSizeInBytes().Ok()) return false; + if (!MaxSizeInBytes().Ok()) return false; + if (!MinSizeInBytes().Ok()) return false; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - static constexpr ::std::size_t SizeInBytes() { + [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - static constexpr bool SizeIsKnown() { + [[nodiscard]] static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericAlignmentsView emboss_reserved_local_other) const { if (!has_zero_offset().Known()) return false; @@ -425,7 +347,7 @@ class GenericAlignmentsView final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericAlignmentsView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_zero_offset().ValueOr(false) && @@ -598,7 +520,7 @@ class GenericAlignmentsView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericAlignmentsView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -1073,89 +995,89 @@ class GenericAlignmentsView final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: - typename ::emboss::test::GenericPlaceholder4View> + [[nodiscard]] typename ::emboss::test::GenericPlaceholder4View> zero_offset() const; - ::emboss::support::Maybe has_zero_offset() const; + [[nodiscard]] ::emboss::support::Maybe has_zero_offset() const; public: - typename ::emboss::test::GenericPlaceholder6View> + [[nodiscard]] typename ::emboss::test::GenericPlaceholder6View> zero_offset_substructure() const; - ::emboss::support::Maybe has_zero_offset_substructure() const; + [[nodiscard]] ::emboss::support::Maybe has_zero_offset_substructure() const; public: - typename ::emboss::test::GenericPlaceholder6View> + [[nodiscard]] typename ::emboss::test::GenericPlaceholder6View> two_offset_substructure() const; - ::emboss::support::Maybe has_two_offset_substructure() const; + [[nodiscard]] ::emboss::support::Maybe has_two_offset_substructure() const; public: - typename ::emboss::test::GenericPlaceholder4View> + [[nodiscard]] typename ::emboss::test::GenericPlaceholder4View> three_offset() const; - ::emboss::support::Maybe has_three_offset() const; + [[nodiscard]] ::emboss::support::Maybe has_three_offset() const; public: - typename ::emboss::test::GenericPlaceholder4View> + [[nodiscard]] typename ::emboss::test::GenericPlaceholder4View> four_offset() const; - ::emboss::support::Maybe has_four_offset() const; + [[nodiscard]] ::emboss::support::Maybe has_four_offset() const; public: - typename ::emboss::test::GenericPlaceholder4View> + [[nodiscard]] typename ::emboss::test::GenericPlaceholder4View> eleven_offset() const; - ::emboss::support::Maybe has_eleven_offset() const; + [[nodiscard]] ::emboss::support::Maybe has_eleven_offset() const; public: - typename ::emboss::test::GenericPlaceholder4View> + [[nodiscard]] typename ::emboss::test::GenericPlaceholder4View> twelve_offset() const; - ::emboss::support::Maybe has_twelve_offset() const; + [[nodiscard]] ::emboss::support::Maybe has_twelve_offset() const; public: - typename ::emboss::support::GenericArrayView< + [[nodiscard]] typename ::emboss::support::GenericArrayView< typename ::emboss::test::GenericPlaceholder4View::template OffsetStorageType> , typename Storage::template OffsetStorageType, 4, 8 > zero_offset_four_stride_array() const; - ::emboss::support::Maybe has_zero_offset_four_stride_array() const; + [[nodiscard]] ::emboss::support::Maybe has_zero_offset_four_stride_array() const; public: - typename ::emboss::support::GenericArrayView< + [[nodiscard]] typename ::emboss::support::GenericArrayView< typename ::emboss::test::GenericPlaceholder6View::template OffsetStorageType> , typename Storage::template OffsetStorageType, 6, 8 > zero_offset_six_stride_array() const; - ::emboss::support::Maybe has_zero_offset_six_stride_array() const; + [[nodiscard]] ::emboss::support::Maybe has_zero_offset_six_stride_array() const; public: - typename ::emboss::support::GenericArrayView< + [[nodiscard]] typename ::emboss::support::GenericArrayView< typename ::emboss::test::GenericPlaceholder4View::template OffsetStorageType> , typename Storage::template OffsetStorageType, 4, 8 > three_offset_four_stride_array() const; - ::emboss::support::Maybe has_three_offset_four_stride_array() const; + [[nodiscard]] ::emboss::support::Maybe has_three_offset_four_stride_array() const; public: - typename ::emboss::support::GenericArrayView< + [[nodiscard]] typename ::emboss::support::GenericArrayView< typename ::emboss::test::GenericPlaceholder6View::template OffsetStorageType> , typename Storage::template OffsetStorageType, 6, 8 > four_offset_six_stride_array() const; - ::emboss::support::Maybe has_four_offset_six_stride_array() const; + [[nodiscard]] ::emboss::support::Maybe has_four_offset_six_stride_array() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -1171,9 +1093,9 @@ class GenericAlignmentsView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -1182,13 +1104,13 @@ class GenericAlignmentsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -1206,9 +1128,9 @@ class GenericAlignmentsView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -1217,13 +1139,13 @@ class GenericAlignmentsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -1241,9 +1163,9 @@ class GenericAlignmentsView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -1252,13 +1174,13 @@ class GenericAlignmentsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -1289,7 +1211,7 @@ struct EmbossReservedInternalIsGenericAlignmentsView< }; template -inline GenericAlignmentsView< +[[nodiscard]] inline GenericAlignmentsView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -1304,7 +1226,7 @@ MakeAlignmentsView( T &&emboss_reserved_local_arg) { } template -inline GenericAlignmentsView> +[[nodiscard]] inline GenericAlignmentsView> MakeAlignmentsView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericAlignmentsView>( @@ -1313,7 +1235,7 @@ MakeAlignmentsView( T *emboss_reserved_local_data, } template -inline GenericAlignmentsView< +[[nodiscard]] inline GenericAlignmentsView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedAlignmentsView( T *emboss_reserved_local_data, @@ -1378,58 +1300,40 @@ class GenericPlaceholder4View final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !dummy().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!dummy().Ok()) return false; + if (!IntrinsicSizeInBytes().Ok()) return false; + if (!MaxSizeInBytes().Ok()) return false; + if (!MinSizeInBytes().Ok()) return false; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - static constexpr ::std::size_t SizeInBytes() { + [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - static constexpr bool SizeIsKnown() { + [[nodiscard]] static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericPlaceholder4View emboss_reserved_local_other) const { if (!has_dummy().Known()) return false; @@ -1450,7 +1354,7 @@ class GenericPlaceholder4View final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericPlaceholder4View emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_dummy().ValueOr(false) && @@ -1483,7 +1387,7 @@ class GenericPlaceholder4View final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericPlaceholder4View emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -1578,15 +1482,15 @@ class GenericPlaceholder4View final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 32>> dummy() const; - ::emboss::support::Maybe has_dummy() const; + [[nodiscard]] ::emboss::support::Maybe has_dummy() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -1602,9 +1506,9 @@ class GenericPlaceholder4View final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -1613,13 +1517,13 @@ class GenericPlaceholder4View final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -1637,9 +1541,9 @@ class GenericPlaceholder4View final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -1648,13 +1552,13 @@ class GenericPlaceholder4View final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -1672,9 +1576,9 @@ class GenericPlaceholder4View final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -1683,13 +1587,13 @@ class GenericPlaceholder4View final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -1720,7 +1624,7 @@ struct EmbossReservedInternalIsGenericPlaceholder4View< }; template -inline GenericPlaceholder4View< +[[nodiscard]] inline GenericPlaceholder4View< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -1735,7 +1639,7 @@ MakePlaceholder4View( T &&emboss_reserved_local_arg) { } template -inline GenericPlaceholder4View> +[[nodiscard]] inline GenericPlaceholder4View> MakePlaceholder4View( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericPlaceholder4View>( @@ -1744,7 +1648,7 @@ MakePlaceholder4View( T *emboss_reserved_local_data, } template -inline GenericPlaceholder4View< +[[nodiscard]] inline GenericPlaceholder4View< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedPlaceholder4View( T *emboss_reserved_local_data, @@ -1810,65 +1714,41 @@ class GenericPlaceholder6View final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !zero_offset().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !two_offset().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!zero_offset().Ok()) return false; + if (!two_offset().Ok()) return false; + if (!IntrinsicSizeInBytes().Ok()) return false; + if (!MaxSizeInBytes().Ok()) return false; + if (!MinSizeInBytes().Ok()) return false; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - static constexpr ::std::size_t SizeInBytes() { + [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - static constexpr bool SizeIsKnown() { + [[nodiscard]] static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericPlaceholder6View emboss_reserved_local_other) const { if (!has_zero_offset().Known()) return false; @@ -1906,7 +1786,7 @@ class GenericPlaceholder6View final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericPlaceholder6View emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_zero_offset().ValueOr(false) && @@ -1953,7 +1833,7 @@ class GenericPlaceholder6View final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericPlaceholder6View emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -2086,19 +1966,19 @@ class GenericPlaceholder6View final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: - typename ::emboss::test::GenericPlaceholder4View> + [[nodiscard]] typename ::emboss::test::GenericPlaceholder4View> zero_offset() const; - ::emboss::support::Maybe has_zero_offset() const; + [[nodiscard]] ::emboss::support::Maybe has_zero_offset() const; public: - typename ::emboss::test::GenericPlaceholder4View> + [[nodiscard]] typename ::emboss::test::GenericPlaceholder4View> two_offset() const; - ::emboss::support::Maybe has_two_offset() const; + [[nodiscard]] ::emboss::support::Maybe has_two_offset() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -2114,9 +1994,9 @@ class GenericPlaceholder6View final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -2125,13 +2005,13 @@ class GenericPlaceholder6View final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -2149,9 +2029,9 @@ class GenericPlaceholder6View final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -2160,13 +2040,13 @@ class GenericPlaceholder6View final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -2184,9 +2064,9 @@ class GenericPlaceholder6View final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -2195,13 +2075,13 @@ class GenericPlaceholder6View final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -2232,7 +2112,7 @@ struct EmbossReservedInternalIsGenericPlaceholder6View< }; template -inline GenericPlaceholder6View< +[[nodiscard]] inline GenericPlaceholder6View< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -2247,7 +2127,7 @@ MakePlaceholder6View( T &&emboss_reserved_local_arg) { } template -inline GenericPlaceholder6View> +[[nodiscard]] inline GenericPlaceholder6View> MakePlaceholder6View( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericPlaceholder6View>( @@ -2256,7 +2136,7 @@ MakePlaceholder6View( T *emboss_reserved_local_data, } template -inline GenericPlaceholder6View< +[[nodiscard]] inline GenericPlaceholder6View< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedPlaceholder6View( T *emboss_reserved_local_data, diff --git a/testdata/golden_cpp/anonymous_bits.emb.h b/testdata/golden_cpp/anonymous_bits.emb.h index 42b1aac..bc2c174 100644 --- a/testdata/golden_cpp/anonymous_bits.emb.h +++ b/testdata/golden_cpp/anonymous_bits.emb.h @@ -119,72 +119,42 @@ class GenericEmbossReservedAnonymousField2View final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !high_bit().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !bar().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !first_bit().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBits().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBits().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBits().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!high_bit().Ok()) return false; + if (!bar().Ok()) return false; + if (!first_bit().Ok()) return false; + if (!IntrinsicSizeInBits().Ok()) return false; + if (!MaxSizeInBits().Ok()) return false; + if (!MinSizeInBits().Ok()) return false; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBits().Ok() && backing_.SizeInBits() >= static_cast( IntrinsicSizeInBits().UncheckedRead()); } - static constexpr ::std::size_t SizeInBits() { + [[nodiscard]] static constexpr ::std::size_t SizeInBits() { return static_cast(IntrinsicSizeInBits().Read()); } - static constexpr bool SizeIsKnown() { + [[nodiscard]] static constexpr bool SizeIsKnown() { return IntrinsicSizeInBits().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericEmbossReservedAnonymousField2View emboss_reserved_local_other) const { if (!has_high_bit().Known()) return false; @@ -239,7 +209,7 @@ class GenericEmbossReservedAnonymousField2View final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericEmbossReservedAnonymousField2View emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_high_bit().ValueOr(false) && @@ -300,7 +270,7 @@ class GenericEmbossReservedAnonymousField2View final { emboss_reserved_local_other.IntrinsicSizeInBits().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericEmbossReservedAnonymousField2View emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -471,32 +441,32 @@ class GenericEmbossReservedAnonymousField2View final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: - typename ::emboss::prelude::FlagView< + [[nodiscard]] typename ::emboss::prelude::FlagView< /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, typename Storage::template OffsetStorageType> high_bit() const; - ::emboss::support::Maybe has_high_bit() const; + [[nodiscard]] ::emboss::support::Maybe has_high_bit() const; public: - typename ::emboss::support::EnumView< + [[nodiscard]] typename ::emboss::support::EnumView< /**/ ::emboss::test::Foo::Bar, ::emboss::support::FixedSizeViewParameters<4, ::emboss::support::AllValuesAreOk>, typename Storage::template OffsetStorageType> bar() const; - ::emboss::support::Maybe has_bar() const; + [[nodiscard]] ::emboss::support::Maybe has_bar() const; public: - typename ::emboss::prelude::FlagView< + [[nodiscard]] typename ::emboss::prelude::FlagView< /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, typename Storage::template OffsetStorageType> first_bit() const; - ::emboss::support::Maybe has_first_bit() const; + [[nodiscard]] ::emboss::support::Maybe has_first_bit() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBitsView final { @@ -512,9 +482,9 @@ class GenericEmbossReservedAnonymousField2View final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBitsView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -523,13 +493,13 @@ class GenericEmbossReservedAnonymousField2View final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBitsView IntrinsicSizeInBits() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBitsView IntrinsicSizeInBits() { return EmbossReservedDollarVirtualIntrinsicSizeInBitsView(); } - static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBits() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBits() { return ::emboss::support::Maybe(true); } @@ -547,9 +517,9 @@ class GenericEmbossReservedAnonymousField2View final { default; ~EmbossReservedDollarVirtualMaxSizeInBitsView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -558,13 +528,13 @@ class GenericEmbossReservedAnonymousField2View final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBitsView MaxSizeInBits() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBitsView MaxSizeInBits() { return EmbossReservedDollarVirtualMaxSizeInBitsView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBits() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBits() { return ::emboss::support::Maybe(true); } @@ -582,9 +552,9 @@ class GenericEmbossReservedAnonymousField2View final { default; ~EmbossReservedDollarVirtualMinSizeInBitsView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -593,13 +563,13 @@ class GenericEmbossReservedAnonymousField2View final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBitsView MinSizeInBits() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBitsView MinSizeInBits() { return EmbossReservedDollarVirtualMinSizeInBitsView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBits() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBits() { return ::emboss::support::Maybe(true); } @@ -630,7 +600,7 @@ struct EmbossReservedInternalIsGenericEmbossReservedAnonymousField2View< }; template -inline GenericEmbossReservedAnonymousField2View< +[[nodiscard]] inline GenericEmbossReservedAnonymousField2View< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -645,7 +615,7 @@ MakeEmbossReservedAnonymousField2View( T &&emboss_reserved_local_arg) { } template -inline GenericEmbossReservedAnonymousField2View> +[[nodiscard]] inline GenericEmbossReservedAnonymousField2View> MakeEmbossReservedAnonymousField2View( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericEmbossReservedAnonymousField2View>( @@ -654,7 +624,7 @@ MakeEmbossReservedAnonymousField2View( T *emboss_reserved_local_data, } template -inline GenericEmbossReservedAnonymousField2View< +[[nodiscard]] inline GenericEmbossReservedAnonymousField2View< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedEmbossReservedAnonymousField2View( T *emboss_reserved_local_data, @@ -809,65 +779,41 @@ class GenericEmbossReservedAnonymousField1View final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !bit_23().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !low_bit().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBits().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBits().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBits().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!bit_23().Ok()) return false; + if (!low_bit().Ok()) return false; + if (!IntrinsicSizeInBits().Ok()) return false; + if (!MaxSizeInBits().Ok()) return false; + if (!MinSizeInBits().Ok()) return false; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBits().Ok() && backing_.SizeInBits() >= static_cast( IntrinsicSizeInBits().UncheckedRead()); } - static constexpr ::std::size_t SizeInBits() { + [[nodiscard]] static constexpr ::std::size_t SizeInBits() { return static_cast(IntrinsicSizeInBits().Read()); } - static constexpr bool SizeIsKnown() { + [[nodiscard]] static constexpr bool SizeIsKnown() { return IntrinsicSizeInBits().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericEmbossReservedAnonymousField1View emboss_reserved_local_other) const { if (!has_bit_23().Known()) return false; @@ -905,7 +851,7 @@ class GenericEmbossReservedAnonymousField1View final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericEmbossReservedAnonymousField1View emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_bit_23().ValueOr(false) && @@ -952,7 +898,7 @@ class GenericEmbossReservedAnonymousField1View final { emboss_reserved_local_other.IntrinsicSizeInBits().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericEmbossReservedAnonymousField1View emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -1085,23 +1031,23 @@ class GenericEmbossReservedAnonymousField1View final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: - typename ::emboss::prelude::FlagView< + [[nodiscard]] typename ::emboss::prelude::FlagView< /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, typename Storage::template OffsetStorageType> bit_23() const; - ::emboss::support::Maybe has_bit_23() const; + [[nodiscard]] ::emboss::support::Maybe has_bit_23() const; public: - typename ::emboss::prelude::FlagView< + [[nodiscard]] typename ::emboss::prelude::FlagView< /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, typename Storage::template OffsetStorageType> low_bit() const; - ::emboss::support::Maybe has_low_bit() const; + [[nodiscard]] ::emboss::support::Maybe has_low_bit() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBitsView final { @@ -1117,9 +1063,9 @@ class GenericEmbossReservedAnonymousField1View final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBitsView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -1128,13 +1074,13 @@ class GenericEmbossReservedAnonymousField1View final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBitsView IntrinsicSizeInBits() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBitsView IntrinsicSizeInBits() { return EmbossReservedDollarVirtualIntrinsicSizeInBitsView(); } - static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBits() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBits() { return ::emboss::support::Maybe(true); } @@ -1152,9 +1098,9 @@ class GenericEmbossReservedAnonymousField1View final { default; ~EmbossReservedDollarVirtualMaxSizeInBitsView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -1163,13 +1109,13 @@ class GenericEmbossReservedAnonymousField1View final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBitsView MaxSizeInBits() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBitsView MaxSizeInBits() { return EmbossReservedDollarVirtualMaxSizeInBitsView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBits() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBits() { return ::emboss::support::Maybe(true); } @@ -1187,9 +1133,9 @@ class GenericEmbossReservedAnonymousField1View final { default; ~EmbossReservedDollarVirtualMinSizeInBitsView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -1198,13 +1144,13 @@ class GenericEmbossReservedAnonymousField1View final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBitsView MinSizeInBits() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBitsView MinSizeInBits() { return EmbossReservedDollarVirtualMinSizeInBitsView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBits() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBits() { return ::emboss::support::Maybe(true); } @@ -1235,7 +1181,7 @@ struct EmbossReservedInternalIsGenericEmbossReservedAnonymousField1View< }; template -inline GenericEmbossReservedAnonymousField1View< +[[nodiscard]] inline GenericEmbossReservedAnonymousField1View< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -1250,7 +1196,7 @@ MakeEmbossReservedAnonymousField1View( T &&emboss_reserved_local_arg) { } template -inline GenericEmbossReservedAnonymousField1View> +[[nodiscard]] inline GenericEmbossReservedAnonymousField1View> MakeEmbossReservedAnonymousField1View( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericEmbossReservedAnonymousField1View>( @@ -1259,7 +1205,7 @@ MakeEmbossReservedAnonymousField1View( T *emboss_reserved_local_data, } template -inline GenericEmbossReservedAnonymousField1View< +[[nodiscard]] inline GenericEmbossReservedAnonymousField1View< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedEmbossReservedAnonymousField1View( T *emboss_reserved_local_data, @@ -1320,101 +1266,53 @@ class GenericFooView final { using Bar = ::emboss::test::Foo::Bar; - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; - const auto emboss_reserved_local_ok_subexpr_1 = ::emboss::support::And(::emboss::support::Maybe(true), ::emboss::support::Maybe(true)); - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !emboss_reserved_anonymous_field_2().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = emboss_reserved_local_ok_subexpr_1; - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !high_bit().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = emboss_reserved_local_ok_subexpr_1; - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !bar().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = emboss_reserved_local_ok_subexpr_1; - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !first_bit().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !emboss_reserved_anonymous_field_1().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = emboss_reserved_local_ok_subexpr_1; - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !bit_23().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = emboss_reserved_local_ok_subexpr_1; - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !low_bit().Ok()) return false; - } - + const auto emboss_reserved_local_ok_subexpr_1 = ::emboss::support::And(::emboss::support::Maybe(true), ::emboss::support::Maybe(true)); { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!emboss_reserved_anonymous_field_2().Ok()) return false; + if (!emboss_reserved_anonymous_field_1().Ok()) return false; + if (!IntrinsicSizeInBytes().Ok()) return false; + if (!MaxSizeInBytes().Ok()) return false; + if (!MinSizeInBytes().Ok()) return false; + } } - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = emboss_reserved_local_ok_subexpr_1; + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!high_bit().Ok()) return false; + if (!bar().Ok()) return false; + if (!first_bit().Ok()) return false; + if (!bit_23().Ok()) return false; + if (!low_bit().Ok()) return false; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - static constexpr ::std::size_t SizeInBytes() { + [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - static constexpr bool SizeIsKnown() { + [[nodiscard]] static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericFooView emboss_reserved_local_other) const { if (!has_emboss_reserved_anonymous_field_2().Known()) return false; @@ -1452,7 +1350,7 @@ class GenericFooView final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericFooView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_emboss_reserved_anonymous_field_2().ValueOr(false) && @@ -1499,7 +1397,7 @@ class GenericFooView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericFooView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -1746,54 +1644,54 @@ class GenericFooView final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } private: - typename ::emboss::test::Foo::GenericEmbossReservedAnonymousField2View>, 32>> + [[nodiscard]] typename ::emboss::test::Foo::GenericEmbossReservedAnonymousField2View>, 32>> emboss_reserved_anonymous_field_2() const; - ::emboss::support::Maybe has_emboss_reserved_anonymous_field_2() const; + [[nodiscard]] ::emboss::support::Maybe has_emboss_reserved_anonymous_field_2() const; public: - auto high_bit() const -> decltype(this->emboss_reserved_anonymous_field_2().high_bit()) { + [[nodiscard]] auto high_bit() const -> decltype(this->emboss_reserved_anonymous_field_2().high_bit()) { return has_high_bit().ValueOrDefault() ? emboss_reserved_anonymous_field_2().high_bit() : decltype(this->emboss_reserved_anonymous_field_2().high_bit())(); } - ::emboss::support::Maybe has_high_bit() const; + [[nodiscard]] ::emboss::support::Maybe has_high_bit() const; public: - auto bar() const -> decltype(this->emboss_reserved_anonymous_field_2().bar()) { + [[nodiscard]] auto bar() const -> decltype(this->emboss_reserved_anonymous_field_2().bar()) { return has_bar().ValueOrDefault() ? emboss_reserved_anonymous_field_2().bar() : decltype(this->emboss_reserved_anonymous_field_2().bar())(); } - ::emboss::support::Maybe has_bar() const; + [[nodiscard]] ::emboss::support::Maybe has_bar() const; public: - auto first_bit() const -> decltype(this->emboss_reserved_anonymous_field_2().first_bit()) { + [[nodiscard]] auto first_bit() const -> decltype(this->emboss_reserved_anonymous_field_2().first_bit()) { return has_first_bit().ValueOrDefault() ? emboss_reserved_anonymous_field_2().first_bit() : decltype(this->emboss_reserved_anonymous_field_2().first_bit())(); } - ::emboss::support::Maybe has_first_bit() const; + [[nodiscard]] ::emboss::support::Maybe has_first_bit() const; private: - typename ::emboss::test::Foo::GenericEmbossReservedAnonymousField1View>, 32>> + [[nodiscard]] typename ::emboss::test::Foo::GenericEmbossReservedAnonymousField1View>, 32>> emboss_reserved_anonymous_field_1() const; - ::emboss::support::Maybe has_emboss_reserved_anonymous_field_1() const; + [[nodiscard]] ::emboss::support::Maybe has_emboss_reserved_anonymous_field_1() const; public: - auto bit_23() const -> decltype(this->emboss_reserved_anonymous_field_1().bit_23()) { + [[nodiscard]] auto bit_23() const -> decltype(this->emboss_reserved_anonymous_field_1().bit_23()) { return has_bit_23().ValueOrDefault() ? emboss_reserved_anonymous_field_1().bit_23() : decltype(this->emboss_reserved_anonymous_field_1().bit_23())(); } - ::emboss::support::Maybe has_bit_23() const; + [[nodiscard]] ::emboss::support::Maybe has_bit_23() const; public: - auto low_bit() const -> decltype(this->emboss_reserved_anonymous_field_1().low_bit()) { + [[nodiscard]] auto low_bit() const -> decltype(this->emboss_reserved_anonymous_field_1().low_bit()) { return has_low_bit().ValueOrDefault() ? emboss_reserved_anonymous_field_1().low_bit() : decltype(this->emboss_reserved_anonymous_field_1().low_bit())(); } - ::emboss::support::Maybe has_low_bit() const; + [[nodiscard]] ::emboss::support::Maybe has_low_bit() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -1809,9 +1707,9 @@ class GenericFooView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -1820,13 +1718,13 @@ class GenericFooView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -1844,9 +1742,9 @@ class GenericFooView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -1855,13 +1753,13 @@ class GenericFooView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -1879,9 +1777,9 @@ class GenericFooView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -1890,13 +1788,13 @@ class GenericFooView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -1927,7 +1825,7 @@ struct EmbossReservedInternalIsGenericFooView< }; template -inline GenericFooView< +[[nodiscard]] inline GenericFooView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -1942,7 +1840,7 @@ MakeFooView( T &&emboss_reserved_local_arg) { } template -inline GenericFooView> +[[nodiscard]] inline GenericFooView> MakeFooView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericFooView>( @@ -1951,7 +1849,7 @@ MakeFooView( T *emboss_reserved_local_data, } template -inline GenericFooView< +[[nodiscard]] inline GenericFooView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedFooView( T *emboss_reserved_local_data, diff --git a/testdata/golden_cpp/auto_array_size.emb.h b/testdata/golden_cpp/auto_array_size.emb.h index 66e01f0..e4b01f4 100644 --- a/testdata/golden_cpp/auto_array_size.emb.h +++ b/testdata/golden_cpp/auto_array_size.emb.h @@ -96,65 +96,41 @@ class GenericElementView final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !a().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !b().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!a().Ok()) return false; + if (!b().Ok()) return false; + if (!IntrinsicSizeInBytes().Ok()) return false; + if (!MaxSizeInBytes().Ok()) return false; + if (!MinSizeInBytes().Ok()) return false; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - static constexpr ::std::size_t SizeInBytes() { + [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - static constexpr bool SizeIsKnown() { + [[nodiscard]] static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericElementView emboss_reserved_local_other) const { if (!has_a().Known()) return false; @@ -192,7 +168,7 @@ class GenericElementView final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericElementView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_a().ValueOr(false) && @@ -239,7 +215,7 @@ class GenericElementView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericElementView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -372,23 +348,23 @@ class GenericElementView final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> a() const; - ::emboss::support::Maybe has_a() const; + [[nodiscard]] ::emboss::support::Maybe has_a() const; public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> b() const; - ::emboss::support::Maybe has_b() const; + [[nodiscard]] ::emboss::support::Maybe has_b() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -404,9 +380,9 @@ class GenericElementView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -415,13 +391,13 @@ class GenericElementView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -439,9 +415,9 @@ class GenericElementView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -450,13 +426,13 @@ class GenericElementView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -474,9 +450,9 @@ class GenericElementView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -485,13 +461,13 @@ class GenericElementView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -522,7 +498,7 @@ struct EmbossReservedInternalIsGenericElementView< }; template -inline GenericElementView< +[[nodiscard]] inline GenericElementView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -537,7 +513,7 @@ MakeElementView( T &&emboss_reserved_local_arg) { } template -inline GenericElementView> +[[nodiscard]] inline GenericElementView> MakeElementView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericElementView>( @@ -546,7 +522,7 @@ MakeElementView( T *emboss_reserved_local_data, } template -inline GenericElementView< +[[nodiscard]] inline GenericElementView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedElementView( T *emboss_reserved_local_data, @@ -615,85 +591,43 @@ class GenericAutoSizeView final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !array_size().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !four_byte_array().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !four_struct_array().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !dynamic_byte_array().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !dynamic_struct_array().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!array_size().Ok()) return false; + if (!four_byte_array().Ok()) return false; + if (!four_struct_array().Ok()) return false; + if (!dynamic_byte_array().Ok()) return false; + if (!dynamic_struct_array().Ok()) return false; + if (!IntrinsicSizeInBytes().Ok()) return false; + if (!MaxSizeInBytes().Ok()) return false; + if (!MinSizeInBytes().Ok()) return false; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - ::std::size_t SizeInBytes() const { + [[nodiscard]] ::std::size_t SizeInBytes() const { return static_cast(IntrinsicSizeInBytes().Read()); } - bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + [[nodiscard]] bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericAutoSizeView emboss_reserved_local_other) const { if (!has_array_size().Known()) return false; @@ -782,7 +716,7 @@ class GenericAutoSizeView final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericAutoSizeView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_array_size().ValueOr(false) && @@ -871,7 +805,7 @@ class GenericAutoSizeView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericAutoSizeView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -1118,18 +1052,18 @@ class GenericAutoSizeView final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> array_size() const; - ::emboss::support::Maybe has_array_size() const; + [[nodiscard]] ::emboss::support::Maybe has_array_size() const; public: - typename ::emboss::support::GenericArrayView< + [[nodiscard]] typename ::emboss::support::GenericArrayView< typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock::template OffsetStorageType>, 8>> @@ -1138,20 +1072,20 @@ class GenericAutoSizeView final { 8 > four_byte_array() const; - ::emboss::support::Maybe has_four_byte_array() const; + [[nodiscard]] ::emboss::support::Maybe has_four_byte_array() const; public: - typename ::emboss::support::GenericArrayView< + [[nodiscard]] typename ::emboss::support::GenericArrayView< typename ::emboss::test::GenericElementView::template OffsetStorageType> , typename Storage::template OffsetStorageType, 2, 8 > four_struct_array() const; - ::emboss::support::Maybe has_four_struct_array() const; + [[nodiscard]] ::emboss::support::Maybe has_four_struct_array() const; public: - typename ::emboss::support::GenericArrayView< + [[nodiscard]] typename ::emboss::support::GenericArrayView< typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock::template OffsetStorageType>, 8>> @@ -1160,17 +1094,17 @@ class GenericAutoSizeView final { 8 > dynamic_byte_array() const; - ::emboss::support::Maybe has_dynamic_byte_array() const; + [[nodiscard]] ::emboss::support::Maybe has_dynamic_byte_array() const; public: - typename ::emboss::support::GenericArrayView< + [[nodiscard]] typename ::emboss::support::GenericArrayView< typename ::emboss::test::GenericElementView::template OffsetStorageType> , typename Storage::template OffsetStorageType, 2, 8 > dynamic_struct_array() const; - ::emboss::support::Maybe has_dynamic_struct_array() const; + [[nodiscard]] ::emboss::support::Maybe has_dynamic_struct_array() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -1189,17 +1123,17 @@ class GenericAutoSizeView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - ::std::int32_t Read() const { + [[nodiscard]] ::std::int32_t Read() const { EMBOSS_CHECK(view_.has_IntrinsicSizeInBytes().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - ::std::int32_t UncheckedRead() const { + [[nodiscard]] ::std::int32_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - bool Ok() const { + [[nodiscard]] bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -1212,12 +1146,12 @@ class GenericAutoSizeView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } private: - ::emboss::support::Maybe MaybeRead() const { + [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.array_size(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Sum(::emboss::support::Maybe(static_cast(13LL)), emboss_reserved_local_subexpr_2); @@ -1230,7 +1164,7 @@ class GenericAutoSizeView final { return emboss_reserved_local_subexpr_8; } - static constexpr bool ValueIsOk( + [[nodiscard]] static constexpr bool ValueIsOk( ::std::int32_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -1238,8 +1172,8 @@ class GenericAutoSizeView final { const GenericAutoSizeView view_; }; - EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; - ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; + [[nodiscard]] EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + [[nodiscard]] ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; public: class EmbossReservedDollarVirtualMaxSizeInBytesView final { @@ -1255,9 +1189,9 @@ class GenericAutoSizeView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -1266,13 +1200,13 @@ class GenericAutoSizeView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -1290,9 +1224,9 @@ class GenericAutoSizeView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -1301,13 +1235,13 @@ class GenericAutoSizeView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -1338,7 +1272,7 @@ struct EmbossReservedInternalIsGenericAutoSizeView< }; template -inline GenericAutoSizeView< +[[nodiscard]] inline GenericAutoSizeView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -1353,7 +1287,7 @@ MakeAutoSizeView( T &&emboss_reserved_local_arg) { } template -inline GenericAutoSizeView> +[[nodiscard]] inline GenericAutoSizeView> MakeAutoSizeView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericAutoSizeView>( @@ -1362,7 +1296,7 @@ MakeAutoSizeView( T *emboss_reserved_local_data, } template -inline GenericAutoSizeView< +[[nodiscard]] inline GenericAutoSizeView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedAutoSizeView( T *emboss_reserved_local_data, diff --git a/testdata/golden_cpp/bcd.emb.h b/testdata/golden_cpp/bcd.emb.h index c10e884..a92c0b0 100644 --- a/testdata/golden_cpp/bcd.emb.h +++ b/testdata/golden_cpp/bcd.emb.h @@ -122,79 +122,43 @@ class GenericEmbossReservedAnonymousField1View final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !four_bit().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !six_bit().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !ten_bit().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !twelve_bit().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBits().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBits().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBits().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!four_bit().Ok()) return false; + if (!six_bit().Ok()) return false; + if (!ten_bit().Ok()) return false; + if (!twelve_bit().Ok()) return false; + if (!IntrinsicSizeInBits().Ok()) return false; + if (!MaxSizeInBits().Ok()) return false; + if (!MinSizeInBits().Ok()) return false; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBits().Ok() && backing_.SizeInBits() >= static_cast( IntrinsicSizeInBits().UncheckedRead()); } - static constexpr ::std::size_t SizeInBits() { + [[nodiscard]] static constexpr ::std::size_t SizeInBits() { return static_cast(IntrinsicSizeInBits().Read()); } - static constexpr bool SizeIsKnown() { + [[nodiscard]] static constexpr bool SizeIsKnown() { return IntrinsicSizeInBits().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericEmbossReservedAnonymousField1View emboss_reserved_local_other) const { if (!has_four_bit().Known()) return false; @@ -266,7 +230,7 @@ class GenericEmbossReservedAnonymousField1View final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericEmbossReservedAnonymousField1View emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_four_bit().ValueOr(false) && @@ -341,7 +305,7 @@ class GenericEmbossReservedAnonymousField1View final { emboss_reserved_local_other.IntrinsicSizeInBits().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericEmbossReservedAnonymousField1View emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -550,39 +514,39 @@ class GenericEmbossReservedAnonymousField1View final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: - typename ::emboss::prelude::BcdView< + [[nodiscard]] typename ::emboss::prelude::BcdView< /**/ ::emboss::support::FixedSizeViewParameters<4, ::emboss::support::AllValuesAreOk>, typename Storage::template OffsetStorageType> four_bit() const; - ::emboss::support::Maybe has_four_bit() const; + [[nodiscard]] ::emboss::support::Maybe has_four_bit() const; public: - typename ::emboss::prelude::BcdView< + [[nodiscard]] typename ::emboss::prelude::BcdView< /**/ ::emboss::support::FixedSizeViewParameters<6, ::emboss::support::AllValuesAreOk>, typename Storage::template OffsetStorageType> six_bit() const; - ::emboss::support::Maybe has_six_bit() const; + [[nodiscard]] ::emboss::support::Maybe has_six_bit() const; public: - typename ::emboss::prelude::BcdView< + [[nodiscard]] typename ::emboss::prelude::BcdView< /**/ ::emboss::support::FixedSizeViewParameters<10, ::emboss::support::AllValuesAreOk>, typename Storage::template OffsetStorageType> ten_bit() const; - ::emboss::support::Maybe has_ten_bit() const; + [[nodiscard]] ::emboss::support::Maybe has_ten_bit() const; public: - typename ::emboss::prelude::BcdView< + [[nodiscard]] typename ::emboss::prelude::BcdView< /**/ ::emboss::support::FixedSizeViewParameters<12, ::emboss::support::AllValuesAreOk>, typename Storage::template OffsetStorageType> twelve_bit() const; - ::emboss::support::Maybe has_twelve_bit() const; + [[nodiscard]] ::emboss::support::Maybe has_twelve_bit() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBitsView final { @@ -598,9 +562,9 @@ class GenericEmbossReservedAnonymousField1View final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBitsView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -609,13 +573,13 @@ class GenericEmbossReservedAnonymousField1View final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBitsView IntrinsicSizeInBits() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBitsView IntrinsicSizeInBits() { return EmbossReservedDollarVirtualIntrinsicSizeInBitsView(); } - static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBits() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBits() { return ::emboss::support::Maybe(true); } @@ -633,9 +597,9 @@ class GenericEmbossReservedAnonymousField1View final { default; ~EmbossReservedDollarVirtualMaxSizeInBitsView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -644,13 +608,13 @@ class GenericEmbossReservedAnonymousField1View final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBitsView MaxSizeInBits() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBitsView MaxSizeInBits() { return EmbossReservedDollarVirtualMaxSizeInBitsView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBits() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBits() { return ::emboss::support::Maybe(true); } @@ -668,9 +632,9 @@ class GenericEmbossReservedAnonymousField1View final { default; ~EmbossReservedDollarVirtualMinSizeInBitsView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -679,13 +643,13 @@ class GenericEmbossReservedAnonymousField1View final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBitsView MinSizeInBits() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBitsView MinSizeInBits() { return EmbossReservedDollarVirtualMinSizeInBitsView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBits() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBits() { return ::emboss::support::Maybe(true); } @@ -716,7 +680,7 @@ struct EmbossReservedInternalIsGenericEmbossReservedAnonymousField1View< }; template -inline GenericEmbossReservedAnonymousField1View< +[[nodiscard]] inline GenericEmbossReservedAnonymousField1View< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -731,7 +695,7 @@ MakeEmbossReservedAnonymousField1View( T &&emboss_reserved_local_arg) { } template -inline GenericEmbossReservedAnonymousField1View> +[[nodiscard]] inline GenericEmbossReservedAnonymousField1View> MakeEmbossReservedAnonymousField1View( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericEmbossReservedAnonymousField1View>( @@ -740,7 +704,7 @@ MakeEmbossReservedAnonymousField1View( T *emboss_reserved_local_data, } template -inline GenericEmbossReservedAnonymousField1View< +[[nodiscard]] inline GenericEmbossReservedAnonymousField1View< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedEmbossReservedAnonymousField1View( T *emboss_reserved_local_data, @@ -801,143 +765,59 @@ class GenericBcdSizesView final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; - const auto emboss_reserved_local_ok_subexpr_1 = ::emboss::support::And(::emboss::support::Maybe(true), ::emboss::support::Maybe(true)); - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !one_byte().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !two_byte().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !three_byte().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !four_byte().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !five_byte().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !six_byte().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !seven_byte().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !eight_byte().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !emboss_reserved_anonymous_field_1().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = emboss_reserved_local_ok_subexpr_1; - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !four_bit().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = emboss_reserved_local_ok_subexpr_1; - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !six_bit().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = emboss_reserved_local_ok_subexpr_1; - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !ten_bit().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = emboss_reserved_local_ok_subexpr_1; - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !twelve_bit().Ok()) return false; - } - + const auto emboss_reserved_local_ok_subexpr_1 = ::emboss::support::And(::emboss::support::Maybe(true), ::emboss::support::Maybe(true)); { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!one_byte().Ok()) return false; + if (!two_byte().Ok()) return false; + if (!three_byte().Ok()) return false; + if (!four_byte().Ok()) return false; + if (!five_byte().Ok()) return false; + if (!six_byte().Ok()) return false; + if (!seven_byte().Ok()) return false; + if (!eight_byte().Ok()) return false; + if (!emboss_reserved_anonymous_field_1().Ok()) return false; + if (!IntrinsicSizeInBytes().Ok()) return false; + if (!MaxSizeInBytes().Ok()) return false; + if (!MinSizeInBytes().Ok()) return false; + } } - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = emboss_reserved_local_ok_subexpr_1; + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!four_bit().Ok()) return false; + if (!six_bit().Ok()) return false; + if (!ten_bit().Ok()) return false; + if (!twelve_bit().Ok()) return false; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - static constexpr ::std::size_t SizeInBytes() { + [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - static constexpr bool SizeIsKnown() { + [[nodiscard]] static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericBcdSizesView emboss_reserved_local_other) const { if (!has_one_byte().Known()) return false; @@ -1094,7 +974,7 @@ class GenericBcdSizesView final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericBcdSizesView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_one_byte().ValueOr(false) && @@ -1239,7 +1119,7 @@ class GenericBcdSizesView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericBcdSizesView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -1752,105 +1632,105 @@ class GenericBcdSizesView final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: - typename ::emboss::prelude::BcdView< + [[nodiscard]] typename ::emboss::prelude::BcdView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> one_byte() const; - ::emboss::support::Maybe has_one_byte() const; + [[nodiscard]] ::emboss::support::Maybe has_one_byte() const; public: - typename ::emboss::prelude::BcdView< + [[nodiscard]] typename ::emboss::prelude::BcdView< /**/ ::emboss::support::FixedSizeViewParameters<16, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 16>> two_byte() const; - ::emboss::support::Maybe has_two_byte() const; + [[nodiscard]] ::emboss::support::Maybe has_two_byte() const; public: - typename ::emboss::prelude::BcdView< + [[nodiscard]] typename ::emboss::prelude::BcdView< /**/ ::emboss::support::FixedSizeViewParameters<24, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 24>> three_byte() const; - ::emboss::support::Maybe has_three_byte() const; + [[nodiscard]] ::emboss::support::Maybe has_three_byte() const; public: - typename ::emboss::prelude::BcdView< + [[nodiscard]] typename ::emboss::prelude::BcdView< /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 32>> four_byte() const; - ::emboss::support::Maybe has_four_byte() const; + [[nodiscard]] ::emboss::support::Maybe has_four_byte() const; public: - typename ::emboss::prelude::BcdView< + [[nodiscard]] typename ::emboss::prelude::BcdView< /**/ ::emboss::support::FixedSizeViewParameters<40, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 40>> five_byte() const; - ::emboss::support::Maybe has_five_byte() const; + [[nodiscard]] ::emboss::support::Maybe has_five_byte() const; public: - typename ::emboss::prelude::BcdView< + [[nodiscard]] typename ::emboss::prelude::BcdView< /**/ ::emboss::support::FixedSizeViewParameters<48, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 48>> six_byte() const; - ::emboss::support::Maybe has_six_byte() const; + [[nodiscard]] ::emboss::support::Maybe has_six_byte() const; public: - typename ::emboss::prelude::BcdView< + [[nodiscard]] typename ::emboss::prelude::BcdView< /**/ ::emboss::support::FixedSizeViewParameters<56, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 56>> seven_byte() const; - ::emboss::support::Maybe has_seven_byte() const; + [[nodiscard]] ::emboss::support::Maybe has_seven_byte() const; public: - typename ::emboss::prelude::BcdView< + [[nodiscard]] typename ::emboss::prelude::BcdView< /**/ ::emboss::support::FixedSizeViewParameters<64, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 64>> eight_byte() const; - ::emboss::support::Maybe has_eight_byte() const; + [[nodiscard]] ::emboss::support::Maybe has_eight_byte() const; private: - typename ::emboss::test::BcdSizes::GenericEmbossReservedAnonymousField1View>, 32>> + [[nodiscard]] typename ::emboss::test::BcdSizes::GenericEmbossReservedAnonymousField1View>, 32>> emboss_reserved_anonymous_field_1() const; - ::emboss::support::Maybe has_emboss_reserved_anonymous_field_1() const; + [[nodiscard]] ::emboss::support::Maybe has_emboss_reserved_anonymous_field_1() const; public: - auto four_bit() const -> decltype(this->emboss_reserved_anonymous_field_1().four_bit()) { + [[nodiscard]] auto four_bit() const -> decltype(this->emboss_reserved_anonymous_field_1().four_bit()) { return has_four_bit().ValueOrDefault() ? emboss_reserved_anonymous_field_1().four_bit() : decltype(this->emboss_reserved_anonymous_field_1().four_bit())(); } - ::emboss::support::Maybe has_four_bit() const; + [[nodiscard]] ::emboss::support::Maybe has_four_bit() const; public: - auto six_bit() const -> decltype(this->emboss_reserved_anonymous_field_1().six_bit()) { + [[nodiscard]] auto six_bit() const -> decltype(this->emboss_reserved_anonymous_field_1().six_bit()) { return has_six_bit().ValueOrDefault() ? emboss_reserved_anonymous_field_1().six_bit() : decltype(this->emboss_reserved_anonymous_field_1().six_bit())(); } - ::emboss::support::Maybe has_six_bit() const; + [[nodiscard]] ::emboss::support::Maybe has_six_bit() const; public: - auto ten_bit() const -> decltype(this->emboss_reserved_anonymous_field_1().ten_bit()) { + [[nodiscard]] auto ten_bit() const -> decltype(this->emboss_reserved_anonymous_field_1().ten_bit()) { return has_ten_bit().ValueOrDefault() ? emboss_reserved_anonymous_field_1().ten_bit() : decltype(this->emboss_reserved_anonymous_field_1().ten_bit())(); } - ::emboss::support::Maybe has_ten_bit() const; + [[nodiscard]] ::emboss::support::Maybe has_ten_bit() const; public: - auto twelve_bit() const -> decltype(this->emboss_reserved_anonymous_field_1().twelve_bit()) { + [[nodiscard]] auto twelve_bit() const -> decltype(this->emboss_reserved_anonymous_field_1().twelve_bit()) { return has_twelve_bit().ValueOrDefault() ? emboss_reserved_anonymous_field_1().twelve_bit() : decltype(this->emboss_reserved_anonymous_field_1().twelve_bit())(); } - ::emboss::support::Maybe has_twelve_bit() const; + [[nodiscard]] ::emboss::support::Maybe has_twelve_bit() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -1866,9 +1746,9 @@ class GenericBcdSizesView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -1877,13 +1757,13 @@ class GenericBcdSizesView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -1901,9 +1781,9 @@ class GenericBcdSizesView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -1912,13 +1792,13 @@ class GenericBcdSizesView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -1936,9 +1816,9 @@ class GenericBcdSizesView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -1947,13 +1827,13 @@ class GenericBcdSizesView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -1984,7 +1864,7 @@ struct EmbossReservedInternalIsGenericBcdSizesView< }; template -inline GenericBcdSizesView< +[[nodiscard]] inline GenericBcdSizesView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -1999,7 +1879,7 @@ MakeBcdSizesView( T &&emboss_reserved_local_arg) { } template -inline GenericBcdSizesView> +[[nodiscard]] inline GenericBcdSizesView> MakeBcdSizesView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericBcdSizesView>( @@ -2008,7 +1888,7 @@ MakeBcdSizesView( T *emboss_reserved_local_data, } template -inline GenericBcdSizesView< +[[nodiscard]] inline GenericBcdSizesView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedBcdSizesView( T *emboss_reserved_local_data, @@ -2073,58 +1953,40 @@ class GenericBcdBigEndianView final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !four_byte().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!four_byte().Ok()) return false; + if (!IntrinsicSizeInBytes().Ok()) return false; + if (!MaxSizeInBytes().Ok()) return false; + if (!MinSizeInBytes().Ok()) return false; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - static constexpr ::std::size_t SizeInBytes() { + [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - static constexpr bool SizeIsKnown() { + [[nodiscard]] static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericBcdBigEndianView emboss_reserved_local_other) const { if (!has_four_byte().Known()) return false; @@ -2145,7 +2007,7 @@ class GenericBcdBigEndianView final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericBcdBigEndianView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_four_byte().ValueOr(false) && @@ -2178,7 +2040,7 @@ class GenericBcdBigEndianView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericBcdBigEndianView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -2273,15 +2135,15 @@ class GenericBcdBigEndianView final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: - typename ::emboss::prelude::BcdView< + [[nodiscard]] typename ::emboss::prelude::BcdView< /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 32>> four_byte() const; - ::emboss::support::Maybe has_four_byte() const; + [[nodiscard]] ::emboss::support::Maybe has_four_byte() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -2297,9 +2159,9 @@ class GenericBcdBigEndianView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -2308,13 +2170,13 @@ class GenericBcdBigEndianView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -2332,9 +2194,9 @@ class GenericBcdBigEndianView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -2343,13 +2205,13 @@ class GenericBcdBigEndianView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -2367,9 +2229,9 @@ class GenericBcdBigEndianView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -2378,13 +2240,13 @@ class GenericBcdBigEndianView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -2415,7 +2277,7 @@ struct EmbossReservedInternalIsGenericBcdBigEndianView< }; template -inline GenericBcdBigEndianView< +[[nodiscard]] inline GenericBcdBigEndianView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -2430,7 +2292,7 @@ MakeBcdBigEndianView( T &&emboss_reserved_local_arg) { } template -inline GenericBcdBigEndianView> +[[nodiscard]] inline GenericBcdBigEndianView> MakeBcdBigEndianView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericBcdBigEndianView>( @@ -2439,7 +2301,7 @@ MakeBcdBigEndianView( T *emboss_reserved_local_data, } template -inline GenericBcdBigEndianView< +[[nodiscard]] inline GenericBcdBigEndianView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedBcdBigEndianView( T *emboss_reserved_local_data, diff --git a/testdata/golden_cpp/bits.emb.h b/testdata/golden_cpp/bits.emb.h index 1509726..1045e59 100644 --- a/testdata/golden_cpp/bits.emb.h +++ b/testdata/golden_cpp/bits.emb.h @@ -139,86 +139,44 @@ class GenericOneByteView final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !high_bit().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !less_high_bit().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !mid_nibble().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !less_low_bit().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !low_bit().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBits().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBits().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBits().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!high_bit().Ok()) return false; + if (!less_high_bit().Ok()) return false; + if (!mid_nibble().Ok()) return false; + if (!less_low_bit().Ok()) return false; + if (!low_bit().Ok()) return false; + if (!IntrinsicSizeInBits().Ok()) return false; + if (!MaxSizeInBits().Ok()) return false; + if (!MinSizeInBits().Ok()) return false; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBits().Ok() && backing_.SizeInBits() >= static_cast( IntrinsicSizeInBits().UncheckedRead()); } - static constexpr ::std::size_t SizeInBits() { + [[nodiscard]] static constexpr ::std::size_t SizeInBits() { return static_cast(IntrinsicSizeInBits().Read()); } - static constexpr bool SizeIsKnown() { + [[nodiscard]] static constexpr bool SizeIsKnown() { return IntrinsicSizeInBits().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericOneByteView emboss_reserved_local_other) const { if (!has_high_bit().Known()) return false; @@ -307,7 +265,7 @@ class GenericOneByteView final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericOneByteView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_high_bit().ValueOr(false) && @@ -396,7 +354,7 @@ class GenericOneByteView final { emboss_reserved_local_other.IntrinsicSizeInBits().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericOneByteView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -643,47 +601,47 @@ class GenericOneByteView final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: - typename ::emboss::prelude::FlagView< + [[nodiscard]] typename ::emboss::prelude::FlagView< /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, typename Storage::template OffsetStorageType> high_bit() const; - ::emboss::support::Maybe has_high_bit() const; + [[nodiscard]] ::emboss::support::Maybe has_high_bit() const; public: - typename ::emboss::prelude::FlagView< + [[nodiscard]] typename ::emboss::prelude::FlagView< /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, typename Storage::template OffsetStorageType> less_high_bit() const; - ::emboss::support::Maybe has_less_high_bit() const; + [[nodiscard]] ::emboss::support::Maybe has_less_high_bit() const; public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<4, ::emboss::support::AllValuesAreOk>, typename Storage::template OffsetStorageType> mid_nibble() const; - ::emboss::support::Maybe has_mid_nibble() const; + [[nodiscard]] ::emboss::support::Maybe has_mid_nibble() const; public: - typename ::emboss::prelude::FlagView< + [[nodiscard]] typename ::emboss::prelude::FlagView< /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, typename Storage::template OffsetStorageType> less_low_bit() const; - ::emboss::support::Maybe has_less_low_bit() const; + [[nodiscard]] ::emboss::support::Maybe has_less_low_bit() const; public: - typename ::emboss::prelude::FlagView< + [[nodiscard]] typename ::emboss::prelude::FlagView< /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, typename Storage::template OffsetStorageType> low_bit() const; - ::emboss::support::Maybe has_low_bit() const; + [[nodiscard]] ::emboss::support::Maybe has_low_bit() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBitsView final { @@ -699,9 +657,9 @@ class GenericOneByteView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBitsView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -710,13 +668,13 @@ class GenericOneByteView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBitsView IntrinsicSizeInBits() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBitsView IntrinsicSizeInBits() { return EmbossReservedDollarVirtualIntrinsicSizeInBitsView(); } - static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBits() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBits() { return ::emboss::support::Maybe(true); } @@ -734,9 +692,9 @@ class GenericOneByteView final { default; ~EmbossReservedDollarVirtualMaxSizeInBitsView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -745,13 +703,13 @@ class GenericOneByteView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBitsView MaxSizeInBits() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBitsView MaxSizeInBits() { return EmbossReservedDollarVirtualMaxSizeInBitsView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBits() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBits() { return ::emboss::support::Maybe(true); } @@ -769,9 +727,9 @@ class GenericOneByteView final { default; ~EmbossReservedDollarVirtualMinSizeInBitsView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -780,13 +738,13 @@ class GenericOneByteView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBitsView MinSizeInBits() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBitsView MinSizeInBits() { return EmbossReservedDollarVirtualMinSizeInBitsView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBits() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBits() { return ::emboss::support::Maybe(true); } @@ -817,7 +775,7 @@ struct EmbossReservedInternalIsGenericOneByteView< }; template -inline GenericOneByteView< +[[nodiscard]] inline GenericOneByteView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -832,7 +790,7 @@ MakeOneByteView( T &&emboss_reserved_local_arg) { } template -inline GenericOneByteView> +[[nodiscard]] inline GenericOneByteView> MakeOneByteView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericOneByteView>( @@ -841,7 +799,7 @@ MakeOneByteView( T *emboss_reserved_local_data, } template -inline GenericOneByteView< +[[nodiscard]] inline GenericOneByteView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedOneByteView( T *emboss_reserved_local_data, @@ -929,72 +887,42 @@ class GenericTwoByteWithGapsView final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !high_bit().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !mid_nibble().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !low_bit().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBits().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBits().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBits().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!high_bit().Ok()) return false; + if (!mid_nibble().Ok()) return false; + if (!low_bit().Ok()) return false; + if (!IntrinsicSizeInBits().Ok()) return false; + if (!MaxSizeInBits().Ok()) return false; + if (!MinSizeInBits().Ok()) return false; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBits().Ok() && backing_.SizeInBits() >= static_cast( IntrinsicSizeInBits().UncheckedRead()); } - static constexpr ::std::size_t SizeInBits() { + [[nodiscard]] static constexpr ::std::size_t SizeInBits() { return static_cast(IntrinsicSizeInBits().Read()); } - static constexpr bool SizeIsKnown() { + [[nodiscard]] static constexpr bool SizeIsKnown() { return IntrinsicSizeInBits().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericTwoByteWithGapsView emboss_reserved_local_other) const { if (!has_high_bit().Known()) return false; @@ -1049,7 +977,7 @@ class GenericTwoByteWithGapsView final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericTwoByteWithGapsView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_high_bit().ValueOr(false) && @@ -1110,7 +1038,7 @@ class GenericTwoByteWithGapsView final { emboss_reserved_local_other.IntrinsicSizeInBits().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericTwoByteWithGapsView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -1281,31 +1209,31 @@ class GenericTwoByteWithGapsView final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: - typename ::emboss::prelude::FlagView< + [[nodiscard]] typename ::emboss::prelude::FlagView< /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, typename Storage::template OffsetStorageType> high_bit() const; - ::emboss::support::Maybe has_high_bit() const; + [[nodiscard]] ::emboss::support::Maybe has_high_bit() const; public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<4, ::emboss::support::AllValuesAreOk>, typename Storage::template OffsetStorageType> mid_nibble() const; - ::emboss::support::Maybe has_mid_nibble() const; + [[nodiscard]] ::emboss::support::Maybe has_mid_nibble() const; public: - typename ::emboss::prelude::FlagView< + [[nodiscard]] typename ::emboss::prelude::FlagView< /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, typename Storage::template OffsetStorageType> low_bit() const; - ::emboss::support::Maybe has_low_bit() const; + [[nodiscard]] ::emboss::support::Maybe has_low_bit() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBitsView final { @@ -1321,9 +1249,9 @@ class GenericTwoByteWithGapsView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBitsView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -1332,13 +1260,13 @@ class GenericTwoByteWithGapsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBitsView IntrinsicSizeInBits() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBitsView IntrinsicSizeInBits() { return EmbossReservedDollarVirtualIntrinsicSizeInBitsView(); } - static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBits() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBits() { return ::emboss::support::Maybe(true); } @@ -1356,9 +1284,9 @@ class GenericTwoByteWithGapsView final { default; ~EmbossReservedDollarVirtualMaxSizeInBitsView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -1367,13 +1295,13 @@ class GenericTwoByteWithGapsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBitsView MaxSizeInBits() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBitsView MaxSizeInBits() { return EmbossReservedDollarVirtualMaxSizeInBitsView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBits() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBits() { return ::emboss::support::Maybe(true); } @@ -1391,9 +1319,9 @@ class GenericTwoByteWithGapsView final { default; ~EmbossReservedDollarVirtualMinSizeInBitsView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -1402,13 +1330,13 @@ class GenericTwoByteWithGapsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBitsView MinSizeInBits() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBitsView MinSizeInBits() { return EmbossReservedDollarVirtualMinSizeInBitsView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBits() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBits() { return ::emboss::support::Maybe(true); } @@ -1439,7 +1367,7 @@ struct EmbossReservedInternalIsGenericTwoByteWithGapsView< }; template -inline GenericTwoByteWithGapsView< +[[nodiscard]] inline GenericTwoByteWithGapsView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -1454,7 +1382,7 @@ MakeTwoByteWithGapsView( T &&emboss_reserved_local_arg) { } template -inline GenericTwoByteWithGapsView> +[[nodiscard]] inline GenericTwoByteWithGapsView> MakeTwoByteWithGapsView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericTwoByteWithGapsView>( @@ -1463,7 +1391,7 @@ MakeTwoByteWithGapsView( T *emboss_reserved_local_data, } template -inline GenericTwoByteWithGapsView< +[[nodiscard]] inline GenericTwoByteWithGapsView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedTwoByteWithGapsView( T *emboss_reserved_local_data, @@ -1524,86 +1452,44 @@ class GenericFourByteView final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !high_nibble().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !one_byte().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !two_byte().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !raw_low_nibble().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !low_nibble().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBits().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBits().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBits().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!high_nibble().Ok()) return false; + if (!one_byte().Ok()) return false; + if (!two_byte().Ok()) return false; + if (!raw_low_nibble().Ok()) return false; + if (!low_nibble().Ok()) return false; + if (!IntrinsicSizeInBits().Ok()) return false; + if (!MaxSizeInBits().Ok()) return false; + if (!MinSizeInBits().Ok()) return false; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBits().Ok() && backing_.SizeInBits() >= static_cast( IntrinsicSizeInBits().UncheckedRead()); } - static constexpr ::std::size_t SizeInBits() { + [[nodiscard]] static constexpr ::std::size_t SizeInBits() { return static_cast(IntrinsicSizeInBits().Read()); } - static constexpr bool SizeIsKnown() { + [[nodiscard]] static constexpr bool SizeIsKnown() { return IntrinsicSizeInBits().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericFourByteView emboss_reserved_local_other) const { if (!has_high_nibble().Known()) return false; @@ -1675,7 +1561,7 @@ class GenericFourByteView final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericFourByteView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_high_nibble().ValueOr(false) && @@ -1750,7 +1636,7 @@ class GenericFourByteView final { emboss_reserved_local_other.IntrinsicSizeInBits().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericFourByteView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -1997,35 +1883,35 @@ class GenericFourByteView final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<4, ::emboss::support::AllValuesAreOk>, typename Storage::template OffsetStorageType> high_nibble() const; - ::emboss::support::Maybe has_high_nibble() const; + [[nodiscard]] ::emboss::support::Maybe has_high_nibble() const; public: - typename ::emboss::test::GenericOneByteView> + [[nodiscard]] typename ::emboss::test::GenericOneByteView> one_byte() const; - ::emboss::support::Maybe has_one_byte() const; + [[nodiscard]] ::emboss::support::Maybe has_one_byte() const; public: - typename ::emboss::test::FourByte::GenericTwoByteWithGapsView> + [[nodiscard]] typename ::emboss::test::FourByte::GenericTwoByteWithGapsView> two_byte() const; - ::emboss::support::Maybe has_two_byte() const; + [[nodiscard]] ::emboss::support::Maybe has_two_byte() const; public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<4, FourByte::EmbossReservedValidatorForRawLowNibble>, typename Storage::template OffsetStorageType> raw_low_nibble() const; - ::emboss::support::Maybe has_raw_low_nibble() const; + [[nodiscard]] ::emboss::support::Maybe has_raw_low_nibble() const; public: class EmbossReservedVirtualLowNibbleView final { @@ -2044,17 +1930,17 @@ class GenericFourByteView final { default; ~EmbossReservedVirtualLowNibbleView() = default; - ::std::int32_t Read() const { + [[nodiscard]] ::std::int32_t Read() const { EMBOSS_CHECK(view_.has_low_nibble().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - ::std::int32_t UncheckedRead() const { + [[nodiscard]] ::std::int32_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - bool Ok() const { + [[nodiscard]] bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -2067,9 +1953,9 @@ class GenericFourByteView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } - bool TryToWrite(::std::int32_t emboss_reserved_local_value) { + [[nodiscard]] bool TryToWrite(::std::int32_t emboss_reserved_local_value) { const auto emboss_reserved_local_maybe_new_value = ::emboss::support::Difference(::emboss::support::Maybe(emboss_reserved_local_value), ::emboss::support::Maybe(static_cast(100LL))); if (!CouldWriteValue(emboss_reserved_local_value)) return false; return view_.raw_low_nibble().TryToWrite( @@ -2083,7 +1969,7 @@ class GenericFourByteView final { void UncheckedWrite(::std::int32_t emboss_reserved_local_value) { view_.raw_low_nibble().UncheckedWrite((::emboss::support::Difference(::emboss::support::Maybe(emboss_reserved_local_value), ::emboss::support::Maybe(static_cast(100LL)))).ValueOrDefault()); } - bool CouldWriteValue(::std::int32_t emboss_reserved_local_value) { + [[nodiscard]] bool CouldWriteValue(::std::int32_t emboss_reserved_local_value) { if (!ValueIsOk(emboss_reserved_local_value)) return false; const auto emboss_reserved_local_maybe_new_value = ::emboss::support::Difference(::emboss::support::Maybe(emboss_reserved_local_value), ::emboss::support::Maybe(static_cast(100LL))); if (!emboss_reserved_local_maybe_new_value.Known()) return false; @@ -2099,7 +1985,7 @@ class GenericFourByteView final { private: - ::emboss::support::Maybe MaybeRead() const { + [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.raw_low_nibble(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Sum(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(100LL))); @@ -2107,7 +1993,7 @@ class GenericFourByteView final { return emboss_reserved_local_subexpr_3; } - static constexpr bool ValueIsOk( + [[nodiscard]] static constexpr bool ValueIsOk( ::std::int32_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -2115,8 +2001,8 @@ class GenericFourByteView final { const GenericFourByteView view_; }; - EmbossReservedVirtualLowNibbleView low_nibble() const; - ::emboss::support::Maybe has_low_nibble() const; + [[nodiscard]] EmbossReservedVirtualLowNibbleView low_nibble() const; + [[nodiscard]] ::emboss::support::Maybe has_low_nibble() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBitsView final { @@ -2132,9 +2018,9 @@ class GenericFourByteView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBitsView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -2143,13 +2029,13 @@ class GenericFourByteView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBitsView IntrinsicSizeInBits() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBitsView IntrinsicSizeInBits() { return EmbossReservedDollarVirtualIntrinsicSizeInBitsView(); } - static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBits() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBits() { return ::emboss::support::Maybe(true); } @@ -2167,9 +2053,9 @@ class GenericFourByteView final { default; ~EmbossReservedDollarVirtualMaxSizeInBitsView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -2178,13 +2064,13 @@ class GenericFourByteView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBitsView MaxSizeInBits() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBitsView MaxSizeInBits() { return EmbossReservedDollarVirtualMaxSizeInBitsView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBits() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBits() { return ::emboss::support::Maybe(true); } @@ -2202,9 +2088,9 @@ class GenericFourByteView final { default; ~EmbossReservedDollarVirtualMinSizeInBitsView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -2213,13 +2099,13 @@ class GenericFourByteView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBitsView MinSizeInBits() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBitsView MinSizeInBits() { return EmbossReservedDollarVirtualMinSizeInBitsView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBits() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBits() { return ::emboss::support::Maybe(true); } @@ -2250,7 +2136,7 @@ struct EmbossReservedInternalIsGenericFourByteView< }; template -inline GenericFourByteView< +[[nodiscard]] inline GenericFourByteView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -2265,7 +2151,7 @@ MakeFourByteView( T &&emboss_reserved_local_arg) { } template -inline GenericFourByteView> +[[nodiscard]] inline GenericFourByteView> MakeFourByteView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericFourByteView>( @@ -2274,7 +2160,7 @@ MakeFourByteView( T *emboss_reserved_local_data, } template -inline GenericFourByteView< +[[nodiscard]] inline GenericFourByteView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedFourByteView( T *emboss_reserved_local_data, @@ -2340,65 +2226,41 @@ class GenericArrayInBitsView final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !lone_flag().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !flags().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBits().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBits().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBits().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!lone_flag().Ok()) return false; + if (!flags().Ok()) return false; + if (!IntrinsicSizeInBits().Ok()) return false; + if (!MaxSizeInBits().Ok()) return false; + if (!MinSizeInBits().Ok()) return false; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBits().Ok() && backing_.SizeInBits() >= static_cast( IntrinsicSizeInBits().UncheckedRead()); } - static constexpr ::std::size_t SizeInBits() { + [[nodiscard]] static constexpr ::std::size_t SizeInBits() { return static_cast(IntrinsicSizeInBits().Read()); } - static constexpr bool SizeIsKnown() { + [[nodiscard]] static constexpr bool SizeIsKnown() { return IntrinsicSizeInBits().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericArrayInBitsView emboss_reserved_local_other) const { if (!has_lone_flag().Known()) return false; @@ -2436,7 +2298,7 @@ class GenericArrayInBitsView final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericArrayInBitsView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_lone_flag().ValueOr(false) && @@ -2483,7 +2345,7 @@ class GenericArrayInBitsView final { emboss_reserved_local_other.IntrinsicSizeInBits().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericArrayInBitsView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -2616,18 +2478,18 @@ class GenericArrayInBitsView final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: - typename ::emboss::prelude::FlagView< + [[nodiscard]] typename ::emboss::prelude::FlagView< /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, typename Storage::template OffsetStorageType> lone_flag() const; - ::emboss::support::Maybe has_lone_flag() const; + [[nodiscard]] ::emboss::support::Maybe has_lone_flag() const; public: - typename ::emboss::support::GenericArrayView< + [[nodiscard]] typename ::emboss::support::GenericArrayView< typename ::emboss::prelude::FlagView< /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, typename Storage::template OffsetStorageType::template OffsetStorageType> @@ -2636,7 +2498,7 @@ class GenericArrayInBitsView final { 1 > flags() const; - ::emboss::support::Maybe has_flags() const; + [[nodiscard]] ::emboss::support::Maybe has_flags() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBitsView final { @@ -2652,9 +2514,9 @@ class GenericArrayInBitsView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBitsView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -2663,13 +2525,13 @@ class GenericArrayInBitsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBitsView IntrinsicSizeInBits() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBitsView IntrinsicSizeInBits() { return EmbossReservedDollarVirtualIntrinsicSizeInBitsView(); } - static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBits() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBits() { return ::emboss::support::Maybe(true); } @@ -2687,9 +2549,9 @@ class GenericArrayInBitsView final { default; ~EmbossReservedDollarVirtualMaxSizeInBitsView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -2698,13 +2560,13 @@ class GenericArrayInBitsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBitsView MaxSizeInBits() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBitsView MaxSizeInBits() { return EmbossReservedDollarVirtualMaxSizeInBitsView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBits() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBits() { return ::emboss::support::Maybe(true); } @@ -2722,9 +2584,9 @@ class GenericArrayInBitsView final { default; ~EmbossReservedDollarVirtualMinSizeInBitsView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -2733,13 +2595,13 @@ class GenericArrayInBitsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBitsView MinSizeInBits() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBitsView MinSizeInBits() { return EmbossReservedDollarVirtualMinSizeInBitsView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBits() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBits() { return ::emboss::support::Maybe(true); } @@ -2770,7 +2632,7 @@ struct EmbossReservedInternalIsGenericArrayInBitsView< }; template -inline GenericArrayInBitsView< +[[nodiscard]] inline GenericArrayInBitsView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -2785,7 +2647,7 @@ MakeArrayInBitsView( T &&emboss_reserved_local_arg) { } template -inline GenericArrayInBitsView> +[[nodiscard]] inline GenericArrayInBitsView> MakeArrayInBitsView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericArrayInBitsView>( @@ -2794,7 +2656,7 @@ MakeArrayInBitsView( T *emboss_reserved_local_data, } template -inline GenericArrayInBitsView< +[[nodiscard]] inline GenericArrayInBitsView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedArrayInBitsView( T *emboss_reserved_local_data, @@ -2859,58 +2721,40 @@ class GenericArrayInBitsInStructView final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !array_in_bits().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!array_in_bits().Ok()) return false; + if (!IntrinsicSizeInBytes().Ok()) return false; + if (!MaxSizeInBytes().Ok()) return false; + if (!MinSizeInBytes().Ok()) return false; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - static constexpr ::std::size_t SizeInBytes() { + [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - static constexpr bool SizeIsKnown() { + [[nodiscard]] static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericArrayInBitsInStructView emboss_reserved_local_other) const { if (!has_array_in_bits().Known()) return false; @@ -2931,7 +2775,7 @@ class GenericArrayInBitsInStructView final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericArrayInBitsInStructView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_array_in_bits().ValueOr(false) && @@ -2964,7 +2808,7 @@ class GenericArrayInBitsInStructView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericArrayInBitsInStructView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -3059,13 +2903,13 @@ class GenericArrayInBitsInStructView final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: - typename ::emboss::test::GenericArrayInBitsView>, 16>> + [[nodiscard]] typename ::emboss::test::GenericArrayInBitsView>, 16>> array_in_bits() const; - ::emboss::support::Maybe has_array_in_bits() const; + [[nodiscard]] ::emboss::support::Maybe has_array_in_bits() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -3081,9 +2925,9 @@ class GenericArrayInBitsInStructView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -3092,13 +2936,13 @@ class GenericArrayInBitsInStructView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -3116,9 +2960,9 @@ class GenericArrayInBitsInStructView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -3127,13 +2971,13 @@ class GenericArrayInBitsInStructView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -3151,9 +2995,9 @@ class GenericArrayInBitsInStructView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -3162,13 +3006,13 @@ class GenericArrayInBitsInStructView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -3199,7 +3043,7 @@ struct EmbossReservedInternalIsGenericArrayInBitsInStructView< }; template -inline GenericArrayInBitsInStructView< +[[nodiscard]] inline GenericArrayInBitsInStructView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -3214,7 +3058,7 @@ MakeArrayInBitsInStructView( T &&emboss_reserved_local_arg) { } template -inline GenericArrayInBitsInStructView> +[[nodiscard]] inline GenericArrayInBitsInStructView> MakeArrayInBitsInStructView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericArrayInBitsInStructView>( @@ -3223,7 +3067,7 @@ MakeArrayInBitsInStructView( T *emboss_reserved_local_data, } template -inline GenericArrayInBitsInStructView< +[[nodiscard]] inline GenericArrayInBitsInStructView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedArrayInBitsInStructView( T *emboss_reserved_local_data, @@ -3291,78 +3135,42 @@ class GenericStructOfBitsView final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !one_byte().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !two_byte().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !four_byte().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !located_byte().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!one_byte().Ok()) return false; + if (!two_byte().Ok()) return false; + if (!four_byte().Ok()) return false; + if (!located_byte().Ok()) return false; + if (!IntrinsicSizeInBytes().Ok()) return false; + if (!MaxSizeInBytes().Ok()) return false; + if (!MinSizeInBytes().Ok()) return false; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - ::std::size_t SizeInBytes() const { + [[nodiscard]] ::std::size_t SizeInBytes() const { return static_cast(IntrinsicSizeInBytes().Read()); } - bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + [[nodiscard]] bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericStructOfBitsView emboss_reserved_local_other) const { if (!has_one_byte().Known()) return false; @@ -3434,7 +3242,7 @@ class GenericStructOfBitsView final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericStructOfBitsView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_one_byte().ValueOr(false) && @@ -3509,7 +3317,7 @@ class GenericStructOfBitsView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericStructOfBitsView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -3718,33 +3526,33 @@ class GenericStructOfBitsView final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: - typename ::emboss::test::GenericOneByteView>, 8>> + [[nodiscard]] typename ::emboss::test::GenericOneByteView>, 8>> one_byte() const; - ::emboss::support::Maybe has_one_byte() const; + [[nodiscard]] ::emboss::support::Maybe has_one_byte() const; public: - typename ::emboss::test::FourByte::GenericTwoByteWithGapsView>, 16>> + [[nodiscard]] typename ::emboss::test::FourByte::GenericTwoByteWithGapsView>, 16>> two_byte() const; - ::emboss::support::Maybe has_two_byte() const; + [[nodiscard]] ::emboss::support::Maybe has_two_byte() const; public: - typename ::emboss::test::GenericFourByteView>, 32>> + [[nodiscard]] typename ::emboss::test::GenericFourByteView>, 32>> four_byte() const; - ::emboss::support::Maybe has_four_byte() const; + [[nodiscard]] ::emboss::support::Maybe has_four_byte() const; public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> located_byte() const; - ::emboss::support::Maybe has_located_byte() const; + [[nodiscard]] ::emboss::support::Maybe has_located_byte() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -3763,17 +3571,17 @@ class GenericStructOfBitsView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - ::std::int32_t Read() const { + [[nodiscard]] ::std::int32_t Read() const { EMBOSS_CHECK(view_.has_IntrinsicSizeInBytes().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - ::std::int32_t UncheckedRead() const { + [[nodiscard]] ::std::int32_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - bool Ok() const { + [[nodiscard]] bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -3786,12 +3594,12 @@ class GenericStructOfBitsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } private: - ::emboss::support::Maybe MaybeRead() const { + [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.one_byte().mid_nibble(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Sum(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(1LL))); @@ -3801,7 +3609,7 @@ class GenericStructOfBitsView final { return emboss_reserved_local_subexpr_5; } - static constexpr bool ValueIsOk( + [[nodiscard]] static constexpr bool ValueIsOk( ::std::int32_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -3809,8 +3617,8 @@ class GenericStructOfBitsView final { const GenericStructOfBitsView view_; }; - EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; - ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; + [[nodiscard]] EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + [[nodiscard]] ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; public: class EmbossReservedDollarVirtualMaxSizeInBytesView final { @@ -3826,9 +3634,9 @@ class GenericStructOfBitsView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -3837,13 +3645,13 @@ class GenericStructOfBitsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -3861,9 +3669,9 @@ class GenericStructOfBitsView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -3872,13 +3680,13 @@ class GenericStructOfBitsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -3909,7 +3717,7 @@ struct EmbossReservedInternalIsGenericStructOfBitsView< }; template -inline GenericStructOfBitsView< +[[nodiscard]] inline GenericStructOfBitsView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -3924,7 +3732,7 @@ MakeStructOfBitsView( T &&emboss_reserved_local_arg) { } template -inline GenericStructOfBitsView> +[[nodiscard]] inline GenericStructOfBitsView> MakeStructOfBitsView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericStructOfBitsView>( @@ -3933,7 +3741,7 @@ MakeStructOfBitsView( T *emboss_reserved_local_data, } template -inline GenericStructOfBitsView< +[[nodiscard]] inline GenericStructOfBitsView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedStructOfBitsView( T *emboss_reserved_local_data, @@ -3998,58 +3806,40 @@ class GenericBitArrayView final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !one_byte().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!one_byte().Ok()) return false; + if (!IntrinsicSizeInBytes().Ok()) return false; + if (!MaxSizeInBytes().Ok()) return false; + if (!MinSizeInBytes().Ok()) return false; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - static constexpr ::std::size_t SizeInBytes() { + [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - static constexpr bool SizeIsKnown() { + [[nodiscard]] static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericBitArrayView emboss_reserved_local_other) const { if (!has_one_byte().Known()) return false; @@ -4070,7 +3860,7 @@ class GenericBitArrayView final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericBitArrayView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_one_byte().ValueOr(false) && @@ -4103,7 +3893,7 @@ class GenericBitArrayView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericBitArrayView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -4198,17 +3988,17 @@ class GenericBitArrayView final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: - typename ::emboss::support::GenericArrayView< + [[nodiscard]] typename ::emboss::support::GenericArrayView< typename ::emboss::test::GenericOneByteView::template OffsetStorageType>, 8>> , typename Storage::template OffsetStorageType, 1, 8 > one_byte() const; - ::emboss::support::Maybe has_one_byte() const; + [[nodiscard]] ::emboss::support::Maybe has_one_byte() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -4224,9 +4014,9 @@ class GenericBitArrayView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -4235,13 +4025,13 @@ class GenericBitArrayView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -4259,9 +4049,9 @@ class GenericBitArrayView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -4270,13 +4060,13 @@ class GenericBitArrayView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -4294,9 +4084,9 @@ class GenericBitArrayView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -4305,13 +4095,13 @@ class GenericBitArrayView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -4342,7 +4132,7 @@ struct EmbossReservedInternalIsGenericBitArrayView< }; template -inline GenericBitArrayView< +[[nodiscard]] inline GenericBitArrayView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -4357,7 +4147,7 @@ MakeBitArrayView( T &&emboss_reserved_local_arg) { } template -inline GenericBitArrayView> +[[nodiscard]] inline GenericBitArrayView> MakeBitArrayView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericBitArrayView>( @@ -4366,7 +4156,7 @@ MakeBitArrayView( T *emboss_reserved_local_data, } template -inline GenericBitArrayView< +[[nodiscard]] inline GenericBitArrayView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedBitArrayView( T *emboss_reserved_local_data, diff --git a/testdata/golden_cpp/complex_offset.emb.h b/testdata/golden_cpp/complex_offset.emb.h index e478bf3..eff386c 100644 --- a/testdata/golden_cpp/complex_offset.emb.h +++ b/testdata/golden_cpp/complex_offset.emb.h @@ -103,58 +103,40 @@ class GenericLengthView final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !length().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!length().Ok()) return false; + if (!IntrinsicSizeInBytes().Ok()) return false; + if (!MaxSizeInBytes().Ok()) return false; + if (!MinSizeInBytes().Ok()) return false; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - static constexpr ::std::size_t SizeInBytes() { + [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - static constexpr bool SizeIsKnown() { + [[nodiscard]] static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericLengthView emboss_reserved_local_other) const { if (!has_length().Known()) return false; @@ -175,7 +157,7 @@ class GenericLengthView final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericLengthView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_length().ValueOr(false) && @@ -208,7 +190,7 @@ class GenericLengthView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericLengthView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -303,15 +285,15 @@ class GenericLengthView final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> length() const; - ::emboss::support::Maybe has_length() const; + [[nodiscard]] ::emboss::support::Maybe has_length() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -327,9 +309,9 @@ class GenericLengthView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -338,13 +320,13 @@ class GenericLengthView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -362,9 +344,9 @@ class GenericLengthView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -373,13 +355,13 @@ class GenericLengthView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -397,9 +379,9 @@ class GenericLengthView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -408,13 +390,13 @@ class GenericLengthView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -445,7 +427,7 @@ struct EmbossReservedInternalIsGenericLengthView< }; template -inline GenericLengthView< +[[nodiscard]] inline GenericLengthView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -460,7 +442,7 @@ MakeLengthView( T &&emboss_reserved_local_arg) { } template -inline GenericLengthView> +[[nodiscard]] inline GenericLengthView> MakeLengthView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericLengthView>( @@ -469,7 +451,7 @@ MakeLengthView( T *emboss_reserved_local_data, } template -inline GenericLengthView< +[[nodiscard]] inline GenericLengthView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedLengthView( T *emboss_reserved_local_data, @@ -535,64 +517,40 @@ class GenericDataView final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !length().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !data().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!length().Ok()) return false; + if (!data().Ok()) return false; + if (!IntrinsicSizeInBytes().Ok()) return false; + if (!MaxSizeInBytes().Ok()) return false; + if (!MinSizeInBytes().Ok()) return false; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - ::std::size_t SizeInBytes() const { + [[nodiscard]] ::std::size_t SizeInBytes() const { return static_cast(IntrinsicSizeInBytes().Read()); } - bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + [[nodiscard]] bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericDataView emboss_reserved_local_other) const { if (!has_length().Known()) return false; @@ -630,7 +588,7 @@ class GenericDataView final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericDataView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_length().ValueOr(false) && @@ -677,7 +635,7 @@ class GenericDataView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericDataView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -810,16 +768,16 @@ class GenericDataView final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: - typename ::emboss::test::GenericLengthView> + [[nodiscard]] typename ::emboss::test::GenericLengthView> length() const; - ::emboss::support::Maybe has_length() const; + [[nodiscard]] ::emboss::support::Maybe has_length() const; public: - typename ::emboss::support::GenericArrayView< + [[nodiscard]] typename ::emboss::support::GenericArrayView< typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock::template OffsetStorageType>, 8>> @@ -828,7 +786,7 @@ class GenericDataView final { 8 > data() const; - ::emboss::support::Maybe has_data() const; + [[nodiscard]] ::emboss::support::Maybe has_data() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -847,17 +805,17 @@ class GenericDataView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - ::std::int32_t Read() const { + [[nodiscard]] ::std::int32_t Read() const { EMBOSS_CHECK(view_.has_IntrinsicSizeInBytes().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - ::std::int32_t UncheckedRead() const { + [[nodiscard]] ::std::int32_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - bool Ok() const { + [[nodiscard]] bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -870,12 +828,12 @@ class GenericDataView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } private: - ::emboss::support::Maybe MaybeRead() const { + [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.length().length(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Sum(::emboss::support::Maybe(static_cast(1LL)), emboss_reserved_local_subexpr_2); @@ -885,7 +843,7 @@ class GenericDataView final { return emboss_reserved_local_subexpr_5; } - static constexpr bool ValueIsOk( + [[nodiscard]] static constexpr bool ValueIsOk( ::std::int32_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -893,8 +851,8 @@ class GenericDataView final { const GenericDataView view_; }; - EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; - ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; + [[nodiscard]] EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + [[nodiscard]] ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; public: class EmbossReservedDollarVirtualMaxSizeInBytesView final { @@ -910,9 +868,9 @@ class GenericDataView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -921,13 +879,13 @@ class GenericDataView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -945,9 +903,9 @@ class GenericDataView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -956,13 +914,13 @@ class GenericDataView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -993,7 +951,7 @@ struct EmbossReservedInternalIsGenericDataView< }; template -inline GenericDataView< +[[nodiscard]] inline GenericDataView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -1008,7 +966,7 @@ MakeDataView( T &&emboss_reserved_local_arg) { } template -inline GenericDataView> +[[nodiscard]] inline GenericDataView> MakeDataView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericDataView>( @@ -1017,7 +975,7 @@ MakeDataView( T *emboss_reserved_local_data, } template -inline GenericDataView< +[[nodiscard]] inline GenericDataView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedDataView( T *emboss_reserved_local_data, @@ -1098,169 +1056,55 @@ class GenericPackedFieldsView final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !length1().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !data1().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !o1().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !length2().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !data2().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !o2().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !length3().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !data3().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !o3().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !length4().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !data4().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !o4().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !length5().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !data5().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !o5().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !length6().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !data6().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!length1().Ok()) return false; + if (!data1().Ok()) return false; + if (!o1().Ok()) return false; + if (!length2().Ok()) return false; + if (!data2().Ok()) return false; + if (!o2().Ok()) return false; + if (!length3().Ok()) return false; + if (!data3().Ok()) return false; + if (!o3().Ok()) return false; + if (!length4().Ok()) return false; + if (!data4().Ok()) return false; + if (!o4().Ok()) return false; + if (!length5().Ok()) return false; + if (!data5().Ok()) return false; + if (!o5().Ok()) return false; + if (!length6().Ok()) return false; + if (!data6().Ok()) return false; + if (!IntrinsicSizeInBytes().Ok()) return false; + if (!MaxSizeInBytes().Ok()) return false; + if (!MinSizeInBytes().Ok()) return false; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - ::std::size_t SizeInBytes() const { + [[nodiscard]] ::std::size_t SizeInBytes() const { return static_cast(IntrinsicSizeInBytes().Read()); } - bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + [[nodiscard]] bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericPackedFieldsView emboss_reserved_local_other) const { if (!has_length1().Known()) return false; @@ -1468,7 +1312,7 @@ class GenericPackedFieldsView final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericPackedFieldsView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_length1().ValueOr(false) && @@ -1655,7 +1499,7 @@ class GenericPackedFieldsView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericPackedFieldsView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -2263,19 +2107,19 @@ class GenericPackedFieldsView final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: - typename ::emboss::test::GenericLengthView> + [[nodiscard]] typename ::emboss::test::GenericLengthView> length1() const; - ::emboss::support::Maybe has_length1() const; + [[nodiscard]] ::emboss::support::Maybe has_length1() const; public: - typename ::emboss::test::GenericDataView> + [[nodiscard]] typename ::emboss::test::GenericDataView> data1() const; - ::emboss::support::Maybe has_data1() const; + [[nodiscard]] ::emboss::support::Maybe has_data1() const; public: class EmbossReservedVirtualO1View final { @@ -2294,17 +2138,17 @@ class GenericPackedFieldsView final { default; ~EmbossReservedVirtualO1View() = default; - ::std::int32_t Read() const { + [[nodiscard]] ::std::int32_t Read() const { EMBOSS_CHECK(view_.has_o1().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - ::std::int32_t UncheckedRead() const { + [[nodiscard]] ::std::int32_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - bool Ok() const { + [[nodiscard]] bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -2317,19 +2161,19 @@ class GenericPackedFieldsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } private: - ::emboss::support::Maybe MaybeRead() const { + [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.data1().IntrinsicSizeInBytes(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); return emboss_reserved_local_subexpr_2; } - static constexpr bool ValueIsOk( + [[nodiscard]] static constexpr bool ValueIsOk( ::std::int32_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -2337,20 +2181,20 @@ class GenericPackedFieldsView final { const GenericPackedFieldsView view_; }; - EmbossReservedVirtualO1View o1() const; - ::emboss::support::Maybe has_o1() const; + [[nodiscard]] EmbossReservedVirtualO1View o1() const; + [[nodiscard]] ::emboss::support::Maybe has_o1() const; public: - typename ::emboss::test::GenericLengthView> + [[nodiscard]] typename ::emboss::test::GenericLengthView> length2() const; - ::emboss::support::Maybe has_length2() const; + [[nodiscard]] ::emboss::support::Maybe has_length2() const; public: - typename ::emboss::test::GenericDataView> + [[nodiscard]] typename ::emboss::test::GenericDataView> data2() const; - ::emboss::support::Maybe has_data2() const; + [[nodiscard]] ::emboss::support::Maybe has_data2() const; public: class EmbossReservedVirtualO2View final { @@ -2369,17 +2213,17 @@ class GenericPackedFieldsView final { default; ~EmbossReservedVirtualO2View() = default; - ::std::int32_t Read() const { + [[nodiscard]] ::std::int32_t Read() const { EMBOSS_CHECK(view_.has_o2().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - ::std::int32_t UncheckedRead() const { + [[nodiscard]] ::std::int32_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - bool Ok() const { + [[nodiscard]] bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -2392,12 +2236,12 @@ class GenericPackedFieldsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } private: - ::emboss::support::Maybe MaybeRead() const { + [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.o1(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = view_.data2().IntrinsicSizeInBytes(); @@ -2407,7 +2251,7 @@ class GenericPackedFieldsView final { return emboss_reserved_local_subexpr_5; } - static constexpr bool ValueIsOk( + [[nodiscard]] static constexpr bool ValueIsOk( ::std::int32_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -2415,20 +2259,20 @@ class GenericPackedFieldsView final { const GenericPackedFieldsView view_; }; - EmbossReservedVirtualO2View o2() const; - ::emboss::support::Maybe has_o2() const; + [[nodiscard]] EmbossReservedVirtualO2View o2() const; + [[nodiscard]] ::emboss::support::Maybe has_o2() const; public: - typename ::emboss::test::GenericLengthView> + [[nodiscard]] typename ::emboss::test::GenericLengthView> length3() const; - ::emboss::support::Maybe has_length3() const; + [[nodiscard]] ::emboss::support::Maybe has_length3() const; public: - typename ::emboss::test::GenericDataView> + [[nodiscard]] typename ::emboss::test::GenericDataView> data3() const; - ::emboss::support::Maybe has_data3() const; + [[nodiscard]] ::emboss::support::Maybe has_data3() const; public: class EmbossReservedVirtualO3View final { @@ -2447,17 +2291,17 @@ class GenericPackedFieldsView final { default; ~EmbossReservedVirtualO3View() = default; - ::std::int32_t Read() const { + [[nodiscard]] ::std::int32_t Read() const { EMBOSS_CHECK(view_.has_o3().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - ::std::int32_t UncheckedRead() const { + [[nodiscard]] ::std::int32_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - bool Ok() const { + [[nodiscard]] bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -2470,12 +2314,12 @@ class GenericPackedFieldsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } private: - ::emboss::support::Maybe MaybeRead() const { + [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.o2(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = view_.data3().IntrinsicSizeInBytes(); @@ -2485,7 +2329,7 @@ class GenericPackedFieldsView final { return emboss_reserved_local_subexpr_5; } - static constexpr bool ValueIsOk( + [[nodiscard]] static constexpr bool ValueIsOk( ::std::int32_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -2493,20 +2337,20 @@ class GenericPackedFieldsView final { const GenericPackedFieldsView view_; }; - EmbossReservedVirtualO3View o3() const; - ::emboss::support::Maybe has_o3() const; + [[nodiscard]] EmbossReservedVirtualO3View o3() const; + [[nodiscard]] ::emboss::support::Maybe has_o3() const; public: - typename ::emboss::test::GenericLengthView> + [[nodiscard]] typename ::emboss::test::GenericLengthView> length4() const; - ::emboss::support::Maybe has_length4() const; + [[nodiscard]] ::emboss::support::Maybe has_length4() const; public: - typename ::emboss::test::GenericDataView> + [[nodiscard]] typename ::emboss::test::GenericDataView> data4() const; - ::emboss::support::Maybe has_data4() const; + [[nodiscard]] ::emboss::support::Maybe has_data4() const; public: class EmbossReservedVirtualO4View final { @@ -2525,17 +2369,17 @@ class GenericPackedFieldsView final { default; ~EmbossReservedVirtualO4View() = default; - ::std::int32_t Read() const { + [[nodiscard]] ::std::int32_t Read() const { EMBOSS_CHECK(view_.has_o4().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - ::std::int32_t UncheckedRead() const { + [[nodiscard]] ::std::int32_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - bool Ok() const { + [[nodiscard]] bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -2548,12 +2392,12 @@ class GenericPackedFieldsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } private: - ::emboss::support::Maybe MaybeRead() const { + [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.o3(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = view_.data4().IntrinsicSizeInBytes(); @@ -2563,7 +2407,7 @@ class GenericPackedFieldsView final { return emboss_reserved_local_subexpr_5; } - static constexpr bool ValueIsOk( + [[nodiscard]] static constexpr bool ValueIsOk( ::std::int32_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -2571,20 +2415,20 @@ class GenericPackedFieldsView final { const GenericPackedFieldsView view_; }; - EmbossReservedVirtualO4View o4() const; - ::emboss::support::Maybe has_o4() const; + [[nodiscard]] EmbossReservedVirtualO4View o4() const; + [[nodiscard]] ::emboss::support::Maybe has_o4() const; public: - typename ::emboss::test::GenericLengthView> + [[nodiscard]] typename ::emboss::test::GenericLengthView> length5() const; - ::emboss::support::Maybe has_length5() const; + [[nodiscard]] ::emboss::support::Maybe has_length5() const; public: - typename ::emboss::test::GenericDataView> + [[nodiscard]] typename ::emboss::test::GenericDataView> data5() const; - ::emboss::support::Maybe has_data5() const; + [[nodiscard]] ::emboss::support::Maybe has_data5() const; public: class EmbossReservedVirtualO5View final { @@ -2603,17 +2447,17 @@ class GenericPackedFieldsView final { default; ~EmbossReservedVirtualO5View() = default; - ::std::int32_t Read() const { + [[nodiscard]] ::std::int32_t Read() const { EMBOSS_CHECK(view_.has_o5().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - ::std::int32_t UncheckedRead() const { + [[nodiscard]] ::std::int32_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - bool Ok() const { + [[nodiscard]] bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -2626,12 +2470,12 @@ class GenericPackedFieldsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } private: - ::emboss::support::Maybe MaybeRead() const { + [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.o4(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = view_.data5().IntrinsicSizeInBytes(); @@ -2641,7 +2485,7 @@ class GenericPackedFieldsView final { return emboss_reserved_local_subexpr_5; } - static constexpr bool ValueIsOk( + [[nodiscard]] static constexpr bool ValueIsOk( ::std::int32_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -2649,20 +2493,20 @@ class GenericPackedFieldsView final { const GenericPackedFieldsView view_; }; - EmbossReservedVirtualO5View o5() const; - ::emboss::support::Maybe has_o5() const; + [[nodiscard]] EmbossReservedVirtualO5View o5() const; + [[nodiscard]] ::emboss::support::Maybe has_o5() const; public: - typename ::emboss::test::GenericLengthView> + [[nodiscard]] typename ::emboss::test::GenericLengthView> length6() const; - ::emboss::support::Maybe has_length6() const; + [[nodiscard]] ::emboss::support::Maybe has_length6() const; public: - typename ::emboss::test::GenericDataView> + [[nodiscard]] typename ::emboss::test::GenericDataView> data6() const; - ::emboss::support::Maybe has_data6() const; + [[nodiscard]] ::emboss::support::Maybe has_data6() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -2681,17 +2525,17 @@ class GenericPackedFieldsView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - ::std::int32_t Read() const { + [[nodiscard]] ::std::int32_t Read() const { EMBOSS_CHECK(view_.has_IntrinsicSizeInBytes().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - ::std::int32_t UncheckedRead() const { + [[nodiscard]] ::std::int32_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - bool Ok() const { + [[nodiscard]] bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -2704,12 +2548,12 @@ class GenericPackedFieldsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } private: - ::emboss::support::Maybe MaybeRead() const { + [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.length1().length(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Sum(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(1LL))); @@ -2765,7 +2609,7 @@ class GenericPackedFieldsView final { return emboss_reserved_local_subexpr_51; } - static constexpr bool ValueIsOk( + [[nodiscard]] static constexpr bool ValueIsOk( ::std::int32_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -2773,8 +2617,8 @@ class GenericPackedFieldsView final { const GenericPackedFieldsView view_; }; - EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; - ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; + [[nodiscard]] EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + [[nodiscard]] ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; public: class EmbossReservedDollarVirtualMaxSizeInBytesView final { @@ -2790,9 +2634,9 @@ class GenericPackedFieldsView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -2801,13 +2645,13 @@ class GenericPackedFieldsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -2825,9 +2669,9 @@ class GenericPackedFieldsView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -2836,13 +2680,13 @@ class GenericPackedFieldsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -2873,7 +2717,7 @@ struct EmbossReservedInternalIsGenericPackedFieldsView< }; template -inline GenericPackedFieldsView< +[[nodiscard]] inline GenericPackedFieldsView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -2888,7 +2732,7 @@ MakePackedFieldsView( T &&emboss_reserved_local_arg) { } template -inline GenericPackedFieldsView> +[[nodiscard]] inline GenericPackedFieldsView> MakePackedFieldsView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericPackedFieldsView>( @@ -2897,7 +2741,7 @@ MakePackedFieldsView( T *emboss_reserved_local_data, } template -inline GenericPackedFieldsView< +[[nodiscard]] inline GenericPackedFieldsView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedPackedFieldsView( T *emboss_reserved_local_data, diff --git a/testdata/golden_cpp/complex_structure.emb.h b/testdata/golden_cpp/complex_structure.emb.h index 2ea9495..39af2e7 100644 --- a/testdata/golden_cpp/complex_structure.emb.h +++ b/testdata/golden_cpp/complex_structure.emb.h @@ -112,72 +112,42 @@ class GenericRegisterLayoutView final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !x().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !l().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !h().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBits().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBits().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBits().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!x().Ok()) return false; + if (!l().Ok()) return false; + if (!h().Ok()) return false; + if (!IntrinsicSizeInBits().Ok()) return false; + if (!MaxSizeInBits().Ok()) return false; + if (!MinSizeInBits().Ok()) return false; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBits().Ok() && backing_.SizeInBits() >= static_cast( IntrinsicSizeInBits().UncheckedRead()); } - static constexpr ::std::size_t SizeInBits() { + [[nodiscard]] static constexpr ::std::size_t SizeInBits() { return static_cast(IntrinsicSizeInBits().Read()); } - static constexpr bool SizeIsKnown() { + [[nodiscard]] static constexpr bool SizeIsKnown() { return IntrinsicSizeInBits().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericRegisterLayoutView emboss_reserved_local_other) const { if (!has_x().Known()) return false; @@ -232,7 +202,7 @@ class GenericRegisterLayoutView final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericRegisterLayoutView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_x().ValueOr(false) && @@ -293,7 +263,7 @@ class GenericRegisterLayoutView final { emboss_reserved_local_other.IntrinsicSizeInBits().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericRegisterLayoutView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -464,31 +434,31 @@ class GenericRegisterLayoutView final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: - typename ::emboss::prelude::IntView< + [[nodiscard]] typename ::emboss::prelude::IntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename Storage::template OffsetStorageType> x() const; - ::emboss::support::Maybe has_x() const; + [[nodiscard]] ::emboss::support::Maybe has_x() const; public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<4, ::emboss::support::AllValuesAreOk>, typename Storage::template OffsetStorageType> l() const; - ::emboss::support::Maybe has_l() const; + [[nodiscard]] ::emboss::support::Maybe has_l() const; public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<4, ::emboss::support::AllValuesAreOk>, typename Storage::template OffsetStorageType> h() const; - ::emboss::support::Maybe has_h() const; + [[nodiscard]] ::emboss::support::Maybe has_h() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBitsView final { @@ -504,9 +474,9 @@ class GenericRegisterLayoutView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBitsView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -515,13 +485,13 @@ class GenericRegisterLayoutView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBitsView IntrinsicSizeInBits() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBitsView IntrinsicSizeInBits() { return EmbossReservedDollarVirtualIntrinsicSizeInBitsView(); } - static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBits() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBits() { return ::emboss::support::Maybe(true); } @@ -539,9 +509,9 @@ class GenericRegisterLayoutView final { default; ~EmbossReservedDollarVirtualMaxSizeInBitsView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -550,13 +520,13 @@ class GenericRegisterLayoutView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBitsView MaxSizeInBits() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBitsView MaxSizeInBits() { return EmbossReservedDollarVirtualMaxSizeInBitsView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBits() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBits() { return ::emboss::support::Maybe(true); } @@ -574,9 +544,9 @@ class GenericRegisterLayoutView final { default; ~EmbossReservedDollarVirtualMinSizeInBitsView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -585,13 +555,13 @@ class GenericRegisterLayoutView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBitsView MinSizeInBits() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBitsView MinSizeInBits() { return EmbossReservedDollarVirtualMinSizeInBitsView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBits() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBits() { return ::emboss::support::Maybe(true); } @@ -622,7 +592,7 @@ struct EmbossReservedInternalIsGenericRegisterLayoutView< }; template -inline GenericRegisterLayoutView< +[[nodiscard]] inline GenericRegisterLayoutView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -637,7 +607,7 @@ MakeRegisterLayoutView( T &&emboss_reserved_local_arg) { } template -inline GenericRegisterLayoutView> +[[nodiscard]] inline GenericRegisterLayoutView> MakeRegisterLayoutView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericRegisterLayoutView>( @@ -646,7 +616,7 @@ MakeRegisterLayoutView( T *emboss_reserved_local_data, } template -inline GenericRegisterLayoutView< +[[nodiscard]] inline GenericRegisterLayoutView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedRegisterLayoutView( T *emboss_reserved_local_data, @@ -711,58 +681,40 @@ class GenericArrayElementView final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !a().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!a().Ok()) return false; + if (!IntrinsicSizeInBytes().Ok()) return false; + if (!MaxSizeInBytes().Ok()) return false; + if (!MinSizeInBytes().Ok()) return false; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - static constexpr ::std::size_t SizeInBytes() { + [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - static constexpr bool SizeIsKnown() { + [[nodiscard]] static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericArrayElementView emboss_reserved_local_other) const { if (!has_a().Known()) return false; @@ -783,7 +735,7 @@ class GenericArrayElementView final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericArrayElementView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_a().ValueOr(false) && @@ -816,7 +768,7 @@ class GenericArrayElementView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericArrayElementView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -911,13 +863,13 @@ class GenericArrayElementView final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: - typename ::emboss_test::GenericRegisterLayoutView>, 8>> + [[nodiscard]] typename ::emboss_test::GenericRegisterLayoutView>, 8>> a() const; - ::emboss::support::Maybe has_a() const; + [[nodiscard]] ::emboss::support::Maybe has_a() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -933,9 +885,9 @@ class GenericArrayElementView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -944,13 +896,13 @@ class GenericArrayElementView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -968,9 +920,9 @@ class GenericArrayElementView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -979,13 +931,13 @@ class GenericArrayElementView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -1003,9 +955,9 @@ class GenericArrayElementView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -1014,13 +966,13 @@ class GenericArrayElementView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -1051,7 +1003,7 @@ struct EmbossReservedInternalIsGenericArrayElementView< }; template -inline GenericArrayElementView< +[[nodiscard]] inline GenericArrayElementView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -1066,7 +1018,7 @@ MakeArrayElementView( T &&emboss_reserved_local_arg) { } template -inline GenericArrayElementView> +[[nodiscard]] inline GenericArrayElementView> MakeArrayElementView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericArrayElementView>( @@ -1075,7 +1027,7 @@ MakeArrayElementView( T *emboss_reserved_local_data, } template -inline GenericArrayElementView< +[[nodiscard]] inline GenericArrayElementView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedArrayElementView( T *emboss_reserved_local_data, @@ -1163,79 +1115,43 @@ class GenericEmbossReservedAnonymousField1View final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !a0().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !s0().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !l0().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !h0().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBits().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBits().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBits().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!a0().Ok()) return false; + if (!s0().Ok()) return false; + if (!l0().Ok()) return false; + if (!h0().Ok()) return false; + if (!IntrinsicSizeInBits().Ok()) return false; + if (!MaxSizeInBits().Ok()) return false; + if (!MinSizeInBits().Ok()) return false; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBits().Ok() && backing_.SizeInBits() >= static_cast( IntrinsicSizeInBits().UncheckedRead()); } - static constexpr ::std::size_t SizeInBits() { + [[nodiscard]] static constexpr ::std::size_t SizeInBits() { return static_cast(IntrinsicSizeInBits().Read()); } - static constexpr bool SizeIsKnown() { + [[nodiscard]] static constexpr bool SizeIsKnown() { return IntrinsicSizeInBits().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericEmbossReservedAnonymousField1View emboss_reserved_local_other) const { if (!has_a0().Known()) return false; @@ -1307,7 +1223,7 @@ class GenericEmbossReservedAnonymousField1View final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericEmbossReservedAnonymousField1View emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_a0().ValueOr(false) && @@ -1382,7 +1298,7 @@ class GenericEmbossReservedAnonymousField1View final { emboss_reserved_local_other.IntrinsicSizeInBits().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericEmbossReservedAnonymousField1View emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -1591,39 +1507,39 @@ class GenericEmbossReservedAnonymousField1View final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename Storage::template OffsetStorageType> a0() const; - ::emboss::support::Maybe has_a0() const; + [[nodiscard]] ::emboss::support::Maybe has_a0() const; public: - typename ::emboss::prelude::FlagView< + [[nodiscard]] typename ::emboss::prelude::FlagView< /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, typename Storage::template OffsetStorageType> s0() const; - ::emboss::support::Maybe has_s0() const; + [[nodiscard]] ::emboss::support::Maybe has_s0() const; public: - typename ::emboss::prelude::IntView< + [[nodiscard]] typename ::emboss::prelude::IntView< /**/ ::emboss::support::FixedSizeViewParameters<4, ::emboss::support::AllValuesAreOk>, typename Storage::template OffsetStorageType> l0() const; - ::emboss::support::Maybe has_l0() const; + [[nodiscard]] ::emboss::support::Maybe has_l0() const; public: - typename ::emboss::prelude::IntView< + [[nodiscard]] typename ::emboss::prelude::IntView< /**/ ::emboss::support::FixedSizeViewParameters<4, ::emboss::support::AllValuesAreOk>, typename Storage::template OffsetStorageType> h0() const; - ::emboss::support::Maybe has_h0() const; + [[nodiscard]] ::emboss::support::Maybe has_h0() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBitsView final { @@ -1639,9 +1555,9 @@ class GenericEmbossReservedAnonymousField1View final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBitsView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -1650,13 +1566,13 @@ class GenericEmbossReservedAnonymousField1View final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBitsView IntrinsicSizeInBits() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBitsView IntrinsicSizeInBits() { return EmbossReservedDollarVirtualIntrinsicSizeInBitsView(); } - static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBits() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBits() { return ::emboss::support::Maybe(true); } @@ -1674,9 +1590,9 @@ class GenericEmbossReservedAnonymousField1View final { default; ~EmbossReservedDollarVirtualMaxSizeInBitsView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -1685,13 +1601,13 @@ class GenericEmbossReservedAnonymousField1View final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBitsView MaxSizeInBits() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBitsView MaxSizeInBits() { return EmbossReservedDollarVirtualMaxSizeInBitsView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBits() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBits() { return ::emboss::support::Maybe(true); } @@ -1709,9 +1625,9 @@ class GenericEmbossReservedAnonymousField1View final { default; ~EmbossReservedDollarVirtualMinSizeInBitsView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -1720,13 +1636,13 @@ class GenericEmbossReservedAnonymousField1View final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBitsView MinSizeInBits() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBitsView MinSizeInBits() { return EmbossReservedDollarVirtualMinSizeInBitsView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBits() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBits() { return ::emboss::support::Maybe(true); } @@ -1757,7 +1673,7 @@ struct EmbossReservedInternalIsGenericEmbossReservedAnonymousField1View< }; template -inline GenericEmbossReservedAnonymousField1View< +[[nodiscard]] inline GenericEmbossReservedAnonymousField1View< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -1772,7 +1688,7 @@ MakeEmbossReservedAnonymousField1View( T &&emboss_reserved_local_arg) { } template -inline GenericEmbossReservedAnonymousField1View> +[[nodiscard]] inline GenericEmbossReservedAnonymousField1View> MakeEmbossReservedAnonymousField1View( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericEmbossReservedAnonymousField1View>( @@ -1781,7 +1697,7 @@ MakeEmbossReservedAnonymousField1View( T *emboss_reserved_local_data, } template -inline GenericEmbossReservedAnonymousField1View< +[[nodiscard]] inline GenericEmbossReservedAnonymousField1View< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedEmbossReservedAnonymousField1View( T *emboss_reserved_local_data, @@ -1842,173 +1758,123 @@ class GenericComplexView final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; - const auto emboss_reserved_local_ok_subexpr_1 = ::emboss::support::And(::emboss::support::Maybe(true), ::emboss::support::Maybe(true)); - const auto emboss_reserved_local_ok_subexpr_2 = a0(); - const auto emboss_reserved_local_ok_subexpr_3 = b2(); - const auto emboss_reserved_local_ok_subexpr_4 = s(); - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !s().Ok()) return false; - } - + const auto emboss_reserved_local_ok_subexpr_1 = ::emboss::support::And(::emboss::support::Maybe(true), ::emboss::support::Maybe(true)); + const auto emboss_reserved_local_ok_subexpr_2 = a0(); + const auto emboss_reserved_local_ok_subexpr_3 = (emboss_reserved_local_ok_subexpr_2.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_2.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_ok_subexpr_4 = ::emboss::support::GreaterThanOrEqual(emboss_reserved_local_ok_subexpr_3, ::emboss::support::Maybe(static_cast(128LL))); + const auto emboss_reserved_local_ok_subexpr_5 = ::emboss::support::LessThan(emboss_reserved_local_ok_subexpr_3, ::emboss::support::Maybe(static_cast(128LL))); + const auto emboss_reserved_local_ok_subexpr_6 = b2(); + const auto emboss_reserved_local_ok_subexpr_7 = (emboss_reserved_local_ok_subexpr_6.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_6.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_ok_subexpr_8 = ::emboss::support::GreaterThan(emboss_reserved_local_ok_subexpr_7, ::emboss::support::Maybe(static_cast(25LL))); + const auto emboss_reserved_local_ok_subexpr_9 = s(); + const auto emboss_reserved_local_ok_subexpr_10 = (emboss_reserved_local_ok_subexpr_9.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_9.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_ok_subexpr_11 = ::emboss::support::GreaterThanOrEqual(emboss_reserved_local_ok_subexpr_10, ::emboss::support::Maybe(static_cast(4LL))); + const auto emboss_reserved_local_ok_subexpr_12 = ::emboss::support::GreaterThanOrEqual(emboss_reserved_local_ok_subexpr_3, ::emboss::support::Maybe(static_cast(80LL))); + const auto emboss_reserved_local_ok_subexpr_13 = e3(); + const auto emboss_reserved_local_ok_subexpr_14 = (emboss_reserved_local_ok_subexpr_13.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_13.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_ok_subexpr_15 = ::emboss::support::GreaterThanOrEqual(emboss_reserved_local_ok_subexpr_14, ::emboss::support::Maybe(static_cast(128LL))); + const auto emboss_reserved_local_ok_subexpr_16 = ::emboss::support::LessThan(emboss_reserved_local_ok_subexpr_7, ::emboss::support::Maybe(static_cast(50LL))); + const auto emboss_reserved_local_ok_subexpr_17 = ::emboss::support::Choice(emboss_reserved_local_ok_subexpr_12, emboss_reserved_local_ok_subexpr_15, emboss_reserved_local_ok_subexpr_16); + const auto emboss_reserved_local_ok_subexpr_18 = ::emboss::support::And(emboss_reserved_local_ok_subexpr_11, emboss_reserved_local_ok_subexpr_17); + const auto emboss_reserved_local_ok_subexpr_19 = ::emboss::support::GreaterThanOrEqual(emboss_reserved_local_ok_subexpr_10, ::emboss::support::Maybe(static_cast(5LL))); + const auto emboss_reserved_local_ok_subexpr_20 = e4(); + const auto emboss_reserved_local_ok_subexpr_21 = (emboss_reserved_local_ok_subexpr_20.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_20.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_ok_subexpr_22 = ::emboss::support::GreaterThan(emboss_reserved_local_ok_subexpr_21, ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_ok_subexpr_23 = ::emboss::support::And(emboss_reserved_local_ok_subexpr_19, emboss_reserved_local_ok_subexpr_22); + const auto emboss_reserved_local_ok_subexpr_24 = ::emboss::support::LessThan(emboss_reserved_local_ok_subexpr_10, ::emboss::support::Maybe(static_cast(2LL))); + const auto emboss_reserved_local_ok_subexpr_25 = ::emboss::support::LessThan(emboss_reserved_local_ok_subexpr_3, ::emboss::support::Maybe(static_cast(4LL))); + const auto emboss_reserved_local_ok_subexpr_26 = ::emboss::support::Or(emboss_reserved_local_ok_subexpr_24, emboss_reserved_local_ok_subexpr_25); { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !u().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !i().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !b().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !a().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !emboss_reserved_anonymous_field_1().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = emboss_reserved_local_ok_subexpr_1; - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !a0().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = emboss_reserved_local_ok_subexpr_1; - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !s0().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = emboss_reserved_local_ok_subexpr_1; - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !l0().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = emboss_reserved_local_ok_subexpr_1; - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !h0().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !e1().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::GreaterThanOrEqual((emboss_reserved_local_ok_subexpr_2.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_2.UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(128LL))); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !e2().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::LessThan((emboss_reserved_local_ok_subexpr_2.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_2.UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(128LL))); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !b2().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!s().Ok()) return false; + if (!u().Ok()) return false; + if (!i().Ok()) return false; + if (!b().Ok()) return false; + if (!a().Ok()) return false; + if (!emboss_reserved_anonymous_field_1().Ok()) return false; + if (!e1().Ok()) return false; + if (!IntrinsicSizeInBytes().Ok()) return false; + if (!MaxSizeInBytes().Ok()) return false; + if (!MinSizeInBytes().Ok()) return false; + } } - - { - const auto emboss_reserved_local_field_present = ::emboss::support::GreaterThan((emboss_reserved_local_ok_subexpr_3.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_3.UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(25LL))); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !e3().Ok()) return false; + const auto emboss_reserved_cond = emboss_reserved_local_ok_subexpr_1; + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!a0().Ok()) return false; + if (!s0().Ok()) return false; + if (!l0().Ok()) return false; + if (!h0().Ok()) return false; + } } - - { - const auto emboss_reserved_local_field_present = ::emboss::support::And(::emboss::support::GreaterThanOrEqual((emboss_reserved_local_ok_subexpr_4.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_4.UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(4LL))), ::emboss::support::Choice(::emboss::support::GreaterThanOrEqual((emboss_reserved_local_ok_subexpr_2.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_2.UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(80LL))), ::emboss::support::GreaterThanOrEqual((e3().Ok() ? ::emboss::support::Maybe(static_cast(e3().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(128LL))), ::emboss::support::LessThan((emboss_reserved_local_ok_subexpr_3.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_3.UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(50LL))))); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !e4().Ok()) return false; + const auto emboss_reserved_cond = emboss_reserved_local_ok_subexpr_4; + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!e2().Ok()) return false; + } } - - { - const auto emboss_reserved_local_field_present = ::emboss::support::And(::emboss::support::GreaterThanOrEqual((emboss_reserved_local_ok_subexpr_4.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_4.UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(5LL))), ::emboss::support::GreaterThan((e4().Ok() ? ::emboss::support::Maybe(static_cast(e4().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(0LL)))); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !e5().Ok()) return false; + const auto emboss_reserved_cond = emboss_reserved_local_ok_subexpr_5; + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!b2().Ok()) return false; + } } - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Or(::emboss::support::LessThan((emboss_reserved_local_ok_subexpr_4.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_4.UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(2LL))), ::emboss::support::LessThan((emboss_reserved_local_ok_subexpr_2.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_2.UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(4LL)))); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !e0().Ok()) return false; + const auto emboss_reserved_cond = emboss_reserved_local_ok_subexpr_8; + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!e3().Ok()) return false; + } } - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = emboss_reserved_local_ok_subexpr_18; + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!e4().Ok()) return false; + } } - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = emboss_reserved_local_ok_subexpr_23; + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!e5().Ok()) return false; + } } - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = emboss_reserved_local_ok_subexpr_26; + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!e0().Ok()) return false; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - ::std::size_t SizeInBytes() const { + [[nodiscard]] ::std::size_t SizeInBytes() const { return static_cast(IntrinsicSizeInBytes().Read()); } - bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + [[nodiscard]] bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericComplexView emboss_reserved_local_other) const { if (!has_s().Known()) return false; @@ -2233,7 +2099,7 @@ class GenericComplexView final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericComplexView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_s().ValueOr(false) && @@ -2434,7 +2300,7 @@ class GenericComplexView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericComplexView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -3099,42 +2965,42 @@ class GenericComplexView final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> s() const; - ::emboss::support::Maybe has_s() const; + [[nodiscard]] ::emboss::support::Maybe has_s() const; public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<64, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 64>> u() const; - ::emboss::support::Maybe has_u() const; + [[nodiscard]] ::emboss::support::Maybe has_u() const; public: - typename ::emboss::prelude::IntView< + [[nodiscard]] typename ::emboss::prelude::IntView< /**/ ::emboss::support::FixedSizeViewParameters<64, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 64>> i() const; - ::emboss::support::Maybe has_i() const; + [[nodiscard]] ::emboss::support::Maybe has_i() const; public: - typename ::emboss::prelude::BcdView< + [[nodiscard]] typename ::emboss::prelude::BcdView< /**/ ::emboss::support::FixedSizeViewParameters<64, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 64>> b() const; - ::emboss::support::Maybe has_b() const; + [[nodiscard]] ::emboss::support::Maybe has_b() const; public: - typename ::emboss::support::GenericArrayView< + [[nodiscard]] typename ::emboss::support::GenericArrayView< typename ::emboss::support::GenericArrayView< typename ::emboss_test::GenericArrayElementView::template OffsetStorageType::template OffsetStorageType> @@ -3145,93 +3011,93 @@ class GenericComplexView final { 8 > a() const; - ::emboss::support::Maybe has_a() const; + [[nodiscard]] ::emboss::support::Maybe has_a() const; private: - typename ::emboss_test::Complex::GenericEmbossReservedAnonymousField1View>, 8>> + [[nodiscard]] typename ::emboss_test::Complex::GenericEmbossReservedAnonymousField1View>, 8>> emboss_reserved_anonymous_field_1() const; - ::emboss::support::Maybe has_emboss_reserved_anonymous_field_1() const; + [[nodiscard]] ::emboss::support::Maybe has_emboss_reserved_anonymous_field_1() const; public: - auto a0() const -> decltype(this->emboss_reserved_anonymous_field_1().a0()) { + [[nodiscard]] auto a0() const -> decltype(this->emboss_reserved_anonymous_field_1().a0()) { return has_a0().ValueOrDefault() ? emboss_reserved_anonymous_field_1().a0() : decltype(this->emboss_reserved_anonymous_field_1().a0())(); } - ::emboss::support::Maybe has_a0() const; + [[nodiscard]] ::emboss::support::Maybe has_a0() const; public: - auto s0() const -> decltype(this->emboss_reserved_anonymous_field_1().s0()) { + [[nodiscard]] auto s0() const -> decltype(this->emboss_reserved_anonymous_field_1().s0()) { return has_s0().ValueOrDefault() ? emboss_reserved_anonymous_field_1().s0() : decltype(this->emboss_reserved_anonymous_field_1().s0())(); } - ::emboss::support::Maybe has_s0() const; + [[nodiscard]] ::emboss::support::Maybe has_s0() const; public: - auto l0() const -> decltype(this->emboss_reserved_anonymous_field_1().l0()) { + [[nodiscard]] auto l0() const -> decltype(this->emboss_reserved_anonymous_field_1().l0()) { return has_l0().ValueOrDefault() ? emboss_reserved_anonymous_field_1().l0() : decltype(this->emboss_reserved_anonymous_field_1().l0())(); } - ::emboss::support::Maybe has_l0() const; + [[nodiscard]] ::emboss::support::Maybe has_l0() const; public: - auto h0() const -> decltype(this->emboss_reserved_anonymous_field_1().h0()) { + [[nodiscard]] auto h0() const -> decltype(this->emboss_reserved_anonymous_field_1().h0()) { return has_h0().ValueOrDefault() ? emboss_reserved_anonymous_field_1().h0() : decltype(this->emboss_reserved_anonymous_field_1().h0())(); } - ::emboss::support::Maybe has_h0() const; + [[nodiscard]] ::emboss::support::Maybe has_h0() const; public: - typename ::emboss_test::GenericArrayElementView> + [[nodiscard]] typename ::emboss_test::GenericArrayElementView> e1() const; - ::emboss::support::Maybe has_e1() const; + [[nodiscard]] ::emboss::support::Maybe has_e1() const; public: - typename ::emboss_test::GenericArrayElementView> + [[nodiscard]] typename ::emboss_test::GenericArrayElementView> e2() const; - ::emboss::support::Maybe has_e2() const; + [[nodiscard]] ::emboss::support::Maybe has_e2() const; public: - typename ::emboss::prelude::BcdView< + [[nodiscard]] typename ::emboss::prelude::BcdView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> b2() const; - ::emboss::support::Maybe has_b2() const; + [[nodiscard]] ::emboss::support::Maybe has_b2() const; public: - typename ::emboss::prelude::IntView< + [[nodiscard]] typename ::emboss::prelude::IntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> e3() const; - ::emboss::support::Maybe has_e3() const; + [[nodiscard]] ::emboss::support::Maybe has_e3() const; public: - typename ::emboss::prelude::IntView< + [[nodiscard]] typename ::emboss::prelude::IntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> e4() const; - ::emboss::support::Maybe has_e4() const; + [[nodiscard]] ::emboss::support::Maybe has_e4() const; public: - typename ::emboss::prelude::IntView< + [[nodiscard]] typename ::emboss::prelude::IntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> e5() const; - ::emboss::support::Maybe has_e5() const; + [[nodiscard]] ::emboss::support::Maybe has_e5() const; public: - typename ::emboss::prelude::IntView< + [[nodiscard]] typename ::emboss::prelude::IntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> e0() const; - ::emboss::support::Maybe has_e0() const; + [[nodiscard]] ::emboss::support::Maybe has_e0() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -3250,17 +3116,17 @@ class GenericComplexView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - ::std::int32_t Read() const { + [[nodiscard]] ::std::int32_t Read() const { EMBOSS_CHECK(view_.has_IntrinsicSizeInBytes().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - ::std::int32_t UncheckedRead() const { + [[nodiscard]] ::std::int32_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - bool Ok() const { + [[nodiscard]] bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -3273,12 +3139,12 @@ class GenericComplexView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } private: - ::emboss::support::Maybe MaybeRead() const { + [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.s(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Product(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(4LL))); @@ -3318,7 +3184,7 @@ class GenericComplexView final { return emboss_reserved_local_subexpr_35; } - static constexpr bool ValueIsOk( + [[nodiscard]] static constexpr bool ValueIsOk( ::std::int32_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -3326,8 +3192,8 @@ class GenericComplexView final { const GenericComplexView view_; }; - EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; - ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; + [[nodiscard]] EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + [[nodiscard]] ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; public: class EmbossReservedDollarVirtualMaxSizeInBytesView final { @@ -3343,9 +3209,9 @@ class GenericComplexView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -3354,13 +3220,13 @@ class GenericComplexView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -3378,9 +3244,9 @@ class GenericComplexView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -3389,13 +3255,13 @@ class GenericComplexView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -3426,7 +3292,7 @@ struct EmbossReservedInternalIsGenericComplexView< }; template -inline GenericComplexView< +[[nodiscard]] inline GenericComplexView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -3441,7 +3307,7 @@ MakeComplexView( T &&emboss_reserved_local_arg) { } template -inline GenericComplexView> +[[nodiscard]] inline GenericComplexView> MakeComplexView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericComplexView>( @@ -3450,7 +3316,7 @@ MakeComplexView( T *emboss_reserved_local_data, } template -inline GenericComplexView< +[[nodiscard]] inline GenericComplexView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedComplexView( T *emboss_reserved_local_data, diff --git a/testdata/golden_cpp/condition.emb.h b/testdata/golden_cpp/condition.emb.h index 1ba3f50..0fb69e8 100644 --- a/testdata/golden_cpp/condition.emb.h +++ b/testdata/golden_cpp/condition.emb.h @@ -357,64 +357,50 @@ class GenericBasicConditionalView final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; + const auto emboss_reserved_local_ok_subexpr_1 = x(); + const auto emboss_reserved_local_ok_subexpr_2 = (emboss_reserved_local_ok_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !x().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Equal((x().Ok() ? ::emboss::support::Maybe(static_cast(x().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(0LL))); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !xc().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!x().Ok()) return false; + if (!IntrinsicSizeInBytes().Ok()) return false; + if (!MaxSizeInBytes().Ok()) return false; + if (!MinSizeInBytes().Ok()) return false; + } } - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + const auto emboss_reserved_switch_discrim = emboss_reserved_local_ok_subexpr_2; + if (!emboss_reserved_switch_discrim.Known()) return false; + switch (emboss_reserved_switch_discrim.ValueOrDefault()) { + case static_cast(0LL): + if (!xc().Ok()) return false; + break; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - ::std::size_t SizeInBytes() const { + [[nodiscard]] ::std::size_t SizeInBytes() const { return static_cast(IntrinsicSizeInBytes().Read()); } - bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + [[nodiscard]] bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericBasicConditionalView emboss_reserved_local_other) const { if (!has_x().Known()) return false; @@ -452,7 +438,7 @@ class GenericBasicConditionalView final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericBasicConditionalView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_x().ValueOr(false) && @@ -499,7 +485,7 @@ class GenericBasicConditionalView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericBasicConditionalView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -632,23 +618,23 @@ class GenericBasicConditionalView final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> x() const; - ::emboss::support::Maybe has_x() const; + [[nodiscard]] ::emboss::support::Maybe has_x() const; public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> xc() const; - ::emboss::support::Maybe has_xc() const; + [[nodiscard]] ::emboss::support::Maybe has_xc() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -667,17 +653,17 @@ class GenericBasicConditionalView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - ::std::int32_t Read() const { + [[nodiscard]] ::std::int32_t Read() const { EMBOSS_CHECK(view_.has_IntrinsicSizeInBytes().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - ::std::int32_t UncheckedRead() const { + [[nodiscard]] ::std::int32_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - bool Ok() const { + [[nodiscard]] bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -690,12 +676,12 @@ class GenericBasicConditionalView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } private: - ::emboss::support::Maybe MaybeRead() const { + [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.x(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(0LL))); @@ -705,7 +691,7 @@ class GenericBasicConditionalView final { return emboss_reserved_local_subexpr_5; } - static constexpr bool ValueIsOk( + [[nodiscard]] static constexpr bool ValueIsOk( ::std::int32_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -713,8 +699,8 @@ class GenericBasicConditionalView final { const GenericBasicConditionalView view_; }; - EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; - ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; + [[nodiscard]] EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + [[nodiscard]] ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; public: class EmbossReservedDollarVirtualMaxSizeInBytesView final { @@ -730,9 +716,9 @@ class GenericBasicConditionalView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -741,13 +727,13 @@ class GenericBasicConditionalView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -765,9 +751,9 @@ class GenericBasicConditionalView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -776,13 +762,13 @@ class GenericBasicConditionalView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -813,7 +799,7 @@ struct EmbossReservedInternalIsGenericBasicConditionalView< }; template -inline GenericBasicConditionalView< +[[nodiscard]] inline GenericBasicConditionalView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -828,7 +814,7 @@ MakeBasicConditionalView( T &&emboss_reserved_local_arg) { } template -inline GenericBasicConditionalView> +[[nodiscard]] inline GenericBasicConditionalView> MakeBasicConditionalView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericBasicConditionalView>( @@ -837,7 +823,7 @@ MakeBasicConditionalView( T *emboss_reserved_local_data, } template -inline GenericBasicConditionalView< +[[nodiscard]] inline GenericBasicConditionalView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedBasicConditionalView( T *emboss_reserved_local_data, @@ -903,64 +889,49 @@ class GenericNegativeConditionalView final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; + const auto emboss_reserved_local_ok_subexpr_1 = x(); + const auto emboss_reserved_local_ok_subexpr_2 = (emboss_reserved_local_ok_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_ok_subexpr_3 = ::emboss::support::NotEqual(emboss_reserved_local_ok_subexpr_2, ::emboss::support::Maybe(static_cast(0LL))); { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !x().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::NotEqual((x().Ok() ? ::emboss::support::Maybe(static_cast(x().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(0LL))); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !xc().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!x().Ok()) return false; + if (!IntrinsicSizeInBytes().Ok()) return false; + if (!MaxSizeInBytes().Ok()) return false; + if (!MinSizeInBytes().Ok()) return false; + } } - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = emboss_reserved_local_ok_subexpr_3; + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!xc().Ok()) return false; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - ::std::size_t SizeInBytes() const { + [[nodiscard]] ::std::size_t SizeInBytes() const { return static_cast(IntrinsicSizeInBytes().Read()); } - bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + [[nodiscard]] bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericNegativeConditionalView emboss_reserved_local_other) const { if (!has_x().Known()) return false; @@ -998,7 +969,7 @@ class GenericNegativeConditionalView final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericNegativeConditionalView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_x().ValueOr(false) && @@ -1045,7 +1016,7 @@ class GenericNegativeConditionalView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericNegativeConditionalView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -1178,23 +1149,23 @@ class GenericNegativeConditionalView final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> x() const; - ::emboss::support::Maybe has_x() const; + [[nodiscard]] ::emboss::support::Maybe has_x() const; public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> xc() const; - ::emboss::support::Maybe has_xc() const; + [[nodiscard]] ::emboss::support::Maybe has_xc() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -1213,17 +1184,17 @@ class GenericNegativeConditionalView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - ::std::int32_t Read() const { + [[nodiscard]] ::std::int32_t Read() const { EMBOSS_CHECK(view_.has_IntrinsicSizeInBytes().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - ::std::int32_t UncheckedRead() const { + [[nodiscard]] ::std::int32_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - bool Ok() const { + [[nodiscard]] bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -1236,12 +1207,12 @@ class GenericNegativeConditionalView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } private: - ::emboss::support::Maybe MaybeRead() const { + [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.x(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::NotEqual(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(0LL))); @@ -1251,7 +1222,7 @@ class GenericNegativeConditionalView final { return emboss_reserved_local_subexpr_5; } - static constexpr bool ValueIsOk( + [[nodiscard]] static constexpr bool ValueIsOk( ::std::int32_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -1259,8 +1230,8 @@ class GenericNegativeConditionalView final { const GenericNegativeConditionalView view_; }; - EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; - ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; + [[nodiscard]] EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + [[nodiscard]] ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; public: class EmbossReservedDollarVirtualMaxSizeInBytesView final { @@ -1276,9 +1247,9 @@ class GenericNegativeConditionalView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -1287,13 +1258,13 @@ class GenericNegativeConditionalView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -1311,9 +1282,9 @@ class GenericNegativeConditionalView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -1322,13 +1293,13 @@ class GenericNegativeConditionalView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -1359,7 +1330,7 @@ struct EmbossReservedInternalIsGenericNegativeConditionalView< }; template -inline GenericNegativeConditionalView< +[[nodiscard]] inline GenericNegativeConditionalView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -1374,7 +1345,7 @@ MakeNegativeConditionalView( T &&emboss_reserved_local_arg) { } template -inline GenericNegativeConditionalView> +[[nodiscard]] inline GenericNegativeConditionalView> MakeNegativeConditionalView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericNegativeConditionalView>( @@ -1383,7 +1354,7 @@ MakeNegativeConditionalView( T *emboss_reserved_local_data, } template -inline GenericNegativeConditionalView< +[[nodiscard]] inline GenericNegativeConditionalView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedNegativeConditionalView( T *emboss_reserved_local_data, @@ -1450,72 +1421,52 @@ class GenericConditionalAndUnconditionalOverlappingFinalFieldView final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; + const auto emboss_reserved_local_ok_subexpr_1 = x(); + const auto emboss_reserved_local_ok_subexpr_2 = (emboss_reserved_local_ok_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !x().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Equal((x().Ok() ? ::emboss::support::Maybe(static_cast(x().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(0LL))); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !xc().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !z().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!x().Ok()) return false; + if (!z().Ok()) return false; + if (!IntrinsicSizeInBytes().Ok()) return false; + if (!MaxSizeInBytes().Ok()) return false; + if (!MinSizeInBytes().Ok()) return false; + } } - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + const auto emboss_reserved_switch_discrim = emboss_reserved_local_ok_subexpr_2; + if (!emboss_reserved_switch_discrim.Known()) return false; + switch (emboss_reserved_switch_discrim.ValueOrDefault()) { + case static_cast(0LL): + if (!xc().Ok()) return false; + break; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - static constexpr ::std::size_t SizeInBytes() { + [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - static constexpr bool SizeIsKnown() { + [[nodiscard]] static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericConditionalAndUnconditionalOverlappingFinalFieldView emboss_reserved_local_other) const { if (!has_x().Known()) return false; @@ -1570,7 +1521,7 @@ class GenericConditionalAndUnconditionalOverlappingFinalFieldView final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericConditionalAndUnconditionalOverlappingFinalFieldView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_x().ValueOr(false) && @@ -1631,7 +1582,7 @@ class GenericConditionalAndUnconditionalOverlappingFinalFieldView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericConditionalAndUnconditionalOverlappingFinalFieldView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -1802,31 +1753,31 @@ class GenericConditionalAndUnconditionalOverlappingFinalFieldView final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> x() const; - ::emboss::support::Maybe has_x() const; + [[nodiscard]] ::emboss::support::Maybe has_x() const; public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> xc() const; - ::emboss::support::Maybe has_xc() const; + [[nodiscard]] ::emboss::support::Maybe has_xc() const; public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> z() const; - ::emboss::support::Maybe has_z() const; + [[nodiscard]] ::emboss::support::Maybe has_z() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -1842,9 +1793,9 @@ class GenericConditionalAndUnconditionalOverlappingFinalFieldView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -1853,13 +1804,13 @@ class GenericConditionalAndUnconditionalOverlappingFinalFieldView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -1877,9 +1828,9 @@ class GenericConditionalAndUnconditionalOverlappingFinalFieldView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -1888,13 +1839,13 @@ class GenericConditionalAndUnconditionalOverlappingFinalFieldView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -1912,9 +1863,9 @@ class GenericConditionalAndUnconditionalOverlappingFinalFieldView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -1923,13 +1874,13 @@ class GenericConditionalAndUnconditionalOverlappingFinalFieldView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -1960,7 +1911,7 @@ struct EmbossReservedInternalIsGenericConditionalAndUnconditionalOverlappingFina }; template -inline GenericConditionalAndUnconditionalOverlappingFinalFieldView< +[[nodiscard]] inline GenericConditionalAndUnconditionalOverlappingFinalFieldView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -1975,7 +1926,7 @@ MakeConditionalAndUnconditionalOverlappingFinalFieldView( T &&emboss_reserved_lo } template -inline GenericConditionalAndUnconditionalOverlappingFinalFieldView> +[[nodiscard]] inline GenericConditionalAndUnconditionalOverlappingFinalFieldView> MakeConditionalAndUnconditionalOverlappingFinalFieldView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericConditionalAndUnconditionalOverlappingFinalFieldView>( @@ -1984,7 +1935,7 @@ MakeConditionalAndUnconditionalOverlappingFinalFieldView( T *emboss_reserved_loc } template -inline GenericConditionalAndUnconditionalOverlappingFinalFieldView< +[[nodiscard]] inline GenericConditionalAndUnconditionalOverlappingFinalFieldView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedConditionalAndUnconditionalOverlappingFinalFieldView( T *emboss_reserved_local_data, @@ -2050,65 +2001,51 @@ class GenericConditionalBasicConditionalFieldFirstView final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; + const auto emboss_reserved_local_ok_subexpr_1 = x(); + const auto emboss_reserved_local_ok_subexpr_2 = (emboss_reserved_local_ok_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !x().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Equal((x().Ok() ? ::emboss::support::Maybe(static_cast(x().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(0LL))); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !xc().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!x().Ok()) return false; + if (!IntrinsicSizeInBytes().Ok()) return false; + if (!MaxSizeInBytes().Ok()) return false; + if (!MinSizeInBytes().Ok()) return false; + } } - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + const auto emboss_reserved_switch_discrim = emboss_reserved_local_ok_subexpr_2; + if (!emboss_reserved_switch_discrim.Known()) return false; + switch (emboss_reserved_switch_discrim.ValueOrDefault()) { + case static_cast(0LL): + if (!xc().Ok()) return false; + break; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - static constexpr ::std::size_t SizeInBytes() { + [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - static constexpr bool SizeIsKnown() { + [[nodiscard]] static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericConditionalBasicConditionalFieldFirstView emboss_reserved_local_other) const { if (!has_x().Known()) return false; @@ -2146,7 +2083,7 @@ class GenericConditionalBasicConditionalFieldFirstView final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericConditionalBasicConditionalFieldFirstView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_x().ValueOr(false) && @@ -2193,7 +2130,7 @@ class GenericConditionalBasicConditionalFieldFirstView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericConditionalBasicConditionalFieldFirstView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -2326,23 +2263,23 @@ class GenericConditionalBasicConditionalFieldFirstView final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> x() const; - ::emboss::support::Maybe has_x() const; + [[nodiscard]] ::emboss::support::Maybe has_x() const; public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> xc() const; - ::emboss::support::Maybe has_xc() const; + [[nodiscard]] ::emboss::support::Maybe has_xc() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -2358,9 +2295,9 @@ class GenericConditionalBasicConditionalFieldFirstView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -2369,13 +2306,13 @@ class GenericConditionalBasicConditionalFieldFirstView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -2393,9 +2330,9 @@ class GenericConditionalBasicConditionalFieldFirstView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -2404,13 +2341,13 @@ class GenericConditionalBasicConditionalFieldFirstView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -2428,9 +2365,9 @@ class GenericConditionalBasicConditionalFieldFirstView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -2439,13 +2376,13 @@ class GenericConditionalBasicConditionalFieldFirstView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -2476,7 +2413,7 @@ struct EmbossReservedInternalIsGenericConditionalBasicConditionalFieldFirstView< }; template -inline GenericConditionalBasicConditionalFieldFirstView< +[[nodiscard]] inline GenericConditionalBasicConditionalFieldFirstView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -2491,7 +2428,7 @@ MakeConditionalBasicConditionalFieldFirstView( T &&emboss_reserved_local_arg) { } template -inline GenericConditionalBasicConditionalFieldFirstView> +[[nodiscard]] inline GenericConditionalBasicConditionalFieldFirstView> MakeConditionalBasicConditionalFieldFirstView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericConditionalBasicConditionalFieldFirstView>( @@ -2500,7 +2437,7 @@ MakeConditionalBasicConditionalFieldFirstView( T *emboss_reserved_local_data, } template -inline GenericConditionalBasicConditionalFieldFirstView< +[[nodiscard]] inline GenericConditionalBasicConditionalFieldFirstView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedConditionalBasicConditionalFieldFirstView( T *emboss_reserved_local_data, @@ -2567,71 +2504,51 @@ class GenericConditionalAndDynamicLocationView final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; + const auto emboss_reserved_local_ok_subexpr_1 = x(); + const auto emboss_reserved_local_ok_subexpr_2 = (emboss_reserved_local_ok_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !x().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !y().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Equal((x().Ok() ? ::emboss::support::Maybe(static_cast(x().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(0LL))); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !xc().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!x().Ok()) return false; + if (!y().Ok()) return false; + if (!IntrinsicSizeInBytes().Ok()) return false; + if (!MaxSizeInBytes().Ok()) return false; + if (!MinSizeInBytes().Ok()) return false; + } } - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + const auto emboss_reserved_switch_discrim = emboss_reserved_local_ok_subexpr_2; + if (!emboss_reserved_switch_discrim.Known()) return false; + switch (emboss_reserved_switch_discrim.ValueOrDefault()) { + case static_cast(0LL): + if (!xc().Ok()) return false; + break; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - ::std::size_t SizeInBytes() const { + [[nodiscard]] ::std::size_t SizeInBytes() const { return static_cast(IntrinsicSizeInBytes().Read()); } - bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + [[nodiscard]] bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericConditionalAndDynamicLocationView emboss_reserved_local_other) const { if (!has_x().Known()) return false; @@ -2686,7 +2603,7 @@ class GenericConditionalAndDynamicLocationView final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericConditionalAndDynamicLocationView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_x().ValueOr(false) && @@ -2747,7 +2664,7 @@ class GenericConditionalAndDynamicLocationView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericConditionalAndDynamicLocationView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -2918,31 +2835,31 @@ class GenericConditionalAndDynamicLocationView final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> x() const; - ::emboss::support::Maybe has_x() const; + [[nodiscard]] ::emboss::support::Maybe has_x() const; public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> y() const; - ::emboss::support::Maybe has_y() const; + [[nodiscard]] ::emboss::support::Maybe has_y() const; public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> xc() const; - ::emboss::support::Maybe has_xc() const; + [[nodiscard]] ::emboss::support::Maybe has_xc() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -2961,17 +2878,17 @@ class GenericConditionalAndDynamicLocationView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - ::std::int32_t Read() const { + [[nodiscard]] ::std::int32_t Read() const { EMBOSS_CHECK(view_.has_IntrinsicSizeInBytes().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - ::std::int32_t UncheckedRead() const { + [[nodiscard]] ::std::int32_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - bool Ok() const { + [[nodiscard]] bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -2984,12 +2901,12 @@ class GenericConditionalAndDynamicLocationView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } private: - ::emboss::support::Maybe MaybeRead() const { + [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.x(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(0LL))); @@ -3002,7 +2919,7 @@ class GenericConditionalAndDynamicLocationView final { return emboss_reserved_local_subexpr_8; } - static constexpr bool ValueIsOk( + [[nodiscard]] static constexpr bool ValueIsOk( ::std::int32_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -3010,8 +2927,8 @@ class GenericConditionalAndDynamicLocationView final { const GenericConditionalAndDynamicLocationView view_; }; - EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; - ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; + [[nodiscard]] EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + [[nodiscard]] ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; public: class EmbossReservedDollarVirtualMaxSizeInBytesView final { @@ -3027,9 +2944,9 @@ class GenericConditionalAndDynamicLocationView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -3038,13 +2955,13 @@ class GenericConditionalAndDynamicLocationView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -3062,9 +2979,9 @@ class GenericConditionalAndDynamicLocationView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -3073,13 +2990,13 @@ class GenericConditionalAndDynamicLocationView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -3110,7 +3027,7 @@ struct EmbossReservedInternalIsGenericConditionalAndDynamicLocationView< }; template -inline GenericConditionalAndDynamicLocationView< +[[nodiscard]] inline GenericConditionalAndDynamicLocationView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -3125,7 +3042,7 @@ MakeConditionalAndDynamicLocationView( T &&emboss_reserved_local_arg) { } template -inline GenericConditionalAndDynamicLocationView> +[[nodiscard]] inline GenericConditionalAndDynamicLocationView> MakeConditionalAndDynamicLocationView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericConditionalAndDynamicLocationView>( @@ -3134,7 +3051,7 @@ MakeConditionalAndDynamicLocationView( T *emboss_reserved_local_data, } template -inline GenericConditionalAndDynamicLocationView< +[[nodiscard]] inline GenericConditionalAndDynamicLocationView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedConditionalAndDynamicLocationView( T *emboss_reserved_local_data, @@ -3200,64 +3117,51 @@ class GenericConditionUsesMinIntView final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; + const auto emboss_reserved_local_ok_subexpr_1 = x(); + const auto emboss_reserved_local_ok_subexpr_2 = (emboss_reserved_local_ok_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_ok_subexpr_3 = ::emboss::support::Difference(emboss_reserved_local_ok_subexpr_2, ::emboss::support::Maybe(static_cast(9223372036854775680LL))); { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !x().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Equal(::emboss::support::Difference((x().Ok() ? ::emboss::support::Maybe(static_cast(x().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(9223372036854775680LL))), ::emboss::support::Maybe(static_cast(-9223372036854775807LL - 1))); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !xc().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!x().Ok()) return false; + if (!IntrinsicSizeInBytes().Ok()) return false; + if (!MaxSizeInBytes().Ok()) return false; + if (!MinSizeInBytes().Ok()) return false; + } } - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + const auto emboss_reserved_switch_discrim = emboss_reserved_local_ok_subexpr_3; + if (!emboss_reserved_switch_discrim.Known()) return false; + switch (emboss_reserved_switch_discrim.ValueOrDefault()) { + case static_cast(-9223372036854775807LL - 1): + if (!xc().Ok()) return false; + break; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - ::std::size_t SizeInBytes() const { + [[nodiscard]] ::std::size_t SizeInBytes() const { return static_cast(IntrinsicSizeInBytes().Read()); } - bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + [[nodiscard]] bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericConditionUsesMinIntView emboss_reserved_local_other) const { if (!has_x().Known()) return false; @@ -3295,7 +3199,7 @@ class GenericConditionUsesMinIntView final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericConditionUsesMinIntView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_x().ValueOr(false) && @@ -3342,7 +3246,7 @@ class GenericConditionUsesMinIntView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericConditionUsesMinIntView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -3475,23 +3379,23 @@ class GenericConditionUsesMinIntView final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: - typename ::emboss::prelude::IntView< + [[nodiscard]] typename ::emboss::prelude::IntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> x() const; - ::emboss::support::Maybe has_x() const; + [[nodiscard]] ::emboss::support::Maybe has_x() const; public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> xc() const; - ::emboss::support::Maybe has_xc() const; + [[nodiscard]] ::emboss::support::Maybe has_xc() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -3510,17 +3414,17 @@ class GenericConditionUsesMinIntView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - ::std::int32_t Read() const { + [[nodiscard]] ::std::int32_t Read() const { EMBOSS_CHECK(view_.has_IntrinsicSizeInBytes().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - ::std::int32_t UncheckedRead() const { + [[nodiscard]] ::std::int32_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - bool Ok() const { + [[nodiscard]] bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -3533,12 +3437,12 @@ class GenericConditionUsesMinIntView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } private: - ::emboss::support::Maybe MaybeRead() const { + [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.x(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Difference(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(9223372036854775680LL))); @@ -3549,7 +3453,7 @@ class GenericConditionUsesMinIntView final { return emboss_reserved_local_subexpr_6; } - static constexpr bool ValueIsOk( + [[nodiscard]] static constexpr bool ValueIsOk( ::std::int32_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -3557,8 +3461,8 @@ class GenericConditionUsesMinIntView final { const GenericConditionUsesMinIntView view_; }; - EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; - ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; + [[nodiscard]] EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + [[nodiscard]] ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; public: class EmbossReservedDollarVirtualMaxSizeInBytesView final { @@ -3574,9 +3478,9 @@ class GenericConditionUsesMinIntView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -3585,13 +3489,13 @@ class GenericConditionUsesMinIntView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -3609,9 +3513,9 @@ class GenericConditionUsesMinIntView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -3620,13 +3524,13 @@ class GenericConditionUsesMinIntView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -3657,7 +3561,7 @@ struct EmbossReservedInternalIsGenericConditionUsesMinIntView< }; template -inline GenericConditionUsesMinIntView< +[[nodiscard]] inline GenericConditionUsesMinIntView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -3672,7 +3576,7 @@ MakeConditionUsesMinIntView( T &&emboss_reserved_local_arg) { } template -inline GenericConditionUsesMinIntView> +[[nodiscard]] inline GenericConditionUsesMinIntView> MakeConditionUsesMinIntView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericConditionUsesMinIntView>( @@ -3681,7 +3585,7 @@ MakeConditionUsesMinIntView( T *emboss_reserved_local_data, } template -inline GenericConditionUsesMinIntView< +[[nodiscard]] inline GenericConditionUsesMinIntView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedConditionUsesMinIntView( T *emboss_reserved_local_data, @@ -3748,71 +3652,61 @@ class GenericNestedConditionalView final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; + const auto emboss_reserved_local_ok_subexpr_1 = x(); + const auto emboss_reserved_local_ok_subexpr_2 = (emboss_reserved_local_ok_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_ok_subexpr_3 = xc(); + const auto emboss_reserved_local_ok_subexpr_4 = (emboss_reserved_local_ok_subexpr_3.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_3.UncheckedRead())) : ::emboss::support::Maybe()); { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !x().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Equal((x().Ok() ? ::emboss::support::Maybe(static_cast(x().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(0LL))); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !xc().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Equal((xc().Ok() ? ::emboss::support::Maybe(static_cast(xc().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(0LL))); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !xcc().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!x().Ok()) return false; + if (!IntrinsicSizeInBytes().Ok()) return false; + if (!MaxSizeInBytes().Ok()) return false; + if (!MinSizeInBytes().Ok()) return false; + } } - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + const auto emboss_reserved_switch_discrim = emboss_reserved_local_ok_subexpr_2; + if (!emboss_reserved_switch_discrim.Known()) return false; + switch (emboss_reserved_switch_discrim.ValueOrDefault()) { + case static_cast(0LL): + if (!xc().Ok()) return false; + break; + } } - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + const auto emboss_reserved_switch_discrim = emboss_reserved_local_ok_subexpr_4; + if (!emboss_reserved_switch_discrim.Known()) return false; + switch (emboss_reserved_switch_discrim.ValueOrDefault()) { + case static_cast(0LL): + if (!xcc().Ok()) return false; + break; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - ::std::size_t SizeInBytes() const { + [[nodiscard]] ::std::size_t SizeInBytes() const { return static_cast(IntrinsicSizeInBytes().Read()); } - bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + [[nodiscard]] bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericNestedConditionalView emboss_reserved_local_other) const { if (!has_x().Known()) return false; @@ -3867,7 +3761,7 @@ class GenericNestedConditionalView final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericNestedConditionalView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_x().ValueOr(false) && @@ -3928,7 +3822,7 @@ class GenericNestedConditionalView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericNestedConditionalView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -4099,31 +3993,31 @@ class GenericNestedConditionalView final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> x() const; - ::emboss::support::Maybe has_x() const; + [[nodiscard]] ::emboss::support::Maybe has_x() const; public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> xc() const; - ::emboss::support::Maybe has_xc() const; + [[nodiscard]] ::emboss::support::Maybe has_xc() const; public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> xcc() const; - ::emboss::support::Maybe has_xcc() const; + [[nodiscard]] ::emboss::support::Maybe has_xcc() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -4142,17 +4036,17 @@ class GenericNestedConditionalView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - ::std::int32_t Read() const { + [[nodiscard]] ::std::int32_t Read() const { EMBOSS_CHECK(view_.has_IntrinsicSizeInBytes().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - ::std::int32_t UncheckedRead() const { + [[nodiscard]] ::std::int32_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - bool Ok() const { + [[nodiscard]] bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -4165,12 +4059,12 @@ class GenericNestedConditionalView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } private: - ::emboss::support::Maybe MaybeRead() const { + [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.x(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(0LL))); @@ -4184,7 +4078,7 @@ class GenericNestedConditionalView final { return emboss_reserved_local_subexpr_9; } - static constexpr bool ValueIsOk( + [[nodiscard]] static constexpr bool ValueIsOk( ::std::int32_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -4192,8 +4086,8 @@ class GenericNestedConditionalView final { const GenericNestedConditionalView view_; }; - EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; - ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; + [[nodiscard]] EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + [[nodiscard]] ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; public: class EmbossReservedDollarVirtualMaxSizeInBytesView final { @@ -4209,9 +4103,9 @@ class GenericNestedConditionalView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -4220,13 +4114,13 @@ class GenericNestedConditionalView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -4244,9 +4138,9 @@ class GenericNestedConditionalView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -4255,13 +4149,13 @@ class GenericNestedConditionalView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -4292,7 +4186,7 @@ struct EmbossReservedInternalIsGenericNestedConditionalView< }; template -inline GenericNestedConditionalView< +[[nodiscard]] inline GenericNestedConditionalView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -4307,7 +4201,7 @@ MakeNestedConditionalView( T &&emboss_reserved_local_arg) { } template -inline GenericNestedConditionalView> +[[nodiscard]] inline GenericNestedConditionalView> MakeNestedConditionalView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericNestedConditionalView>( @@ -4316,7 +4210,7 @@ MakeNestedConditionalView( T *emboss_reserved_local_data, } template -inline GenericNestedConditionalView< +[[nodiscard]] inline GenericNestedConditionalView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedNestedConditionalView( T *emboss_reserved_local_data, @@ -4383,72 +4277,62 @@ class GenericCorrectNestedConditionalView final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; - const auto emboss_reserved_local_ok_subexpr_1 = x(); - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !x().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Equal((emboss_reserved_local_ok_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(0LL))); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !xc().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::And(::emboss::support::Equal((emboss_reserved_local_ok_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(0LL))), ::emboss::support::Equal((xc().Ok() ? ::emboss::support::Maybe(static_cast(xc().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(0LL)))); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !xcc().Ok()) return false; - } - + const auto emboss_reserved_local_ok_subexpr_1 = x(); + const auto emboss_reserved_local_ok_subexpr_2 = (emboss_reserved_local_ok_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_ok_subexpr_3 = ::emboss::support::Equal(emboss_reserved_local_ok_subexpr_2, ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_ok_subexpr_4 = xc(); + const auto emboss_reserved_local_ok_subexpr_5 = (emboss_reserved_local_ok_subexpr_4.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_4.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_ok_subexpr_6 = ::emboss::support::Equal(emboss_reserved_local_ok_subexpr_5, ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_ok_subexpr_7 = ::emboss::support::And(emboss_reserved_local_ok_subexpr_3, emboss_reserved_local_ok_subexpr_6); { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!x().Ok()) return false; + if (!IntrinsicSizeInBytes().Ok()) return false; + if (!MaxSizeInBytes().Ok()) return false; + if (!MinSizeInBytes().Ok()) return false; + } } - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + const auto emboss_reserved_switch_discrim = emboss_reserved_local_ok_subexpr_2; + if (!emboss_reserved_switch_discrim.Known()) return false; + switch (emboss_reserved_switch_discrim.ValueOrDefault()) { + case static_cast(0LL): + if (!xc().Ok()) return false; + break; + } } - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = emboss_reserved_local_ok_subexpr_7; + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!xcc().Ok()) return false; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - ::std::size_t SizeInBytes() const { + [[nodiscard]] ::std::size_t SizeInBytes() const { return static_cast(IntrinsicSizeInBytes().Read()); } - bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + [[nodiscard]] bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericCorrectNestedConditionalView emboss_reserved_local_other) const { if (!has_x().Known()) return false; @@ -4503,7 +4387,7 @@ class GenericCorrectNestedConditionalView final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericCorrectNestedConditionalView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_x().ValueOr(false) && @@ -4564,7 +4448,7 @@ class GenericCorrectNestedConditionalView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericCorrectNestedConditionalView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -4735,31 +4619,31 @@ class GenericCorrectNestedConditionalView final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> x() const; - ::emboss::support::Maybe has_x() const; + [[nodiscard]] ::emboss::support::Maybe has_x() const; public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> xc() const; - ::emboss::support::Maybe has_xc() const; + [[nodiscard]] ::emboss::support::Maybe has_xc() const; public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> xcc() const; - ::emboss::support::Maybe has_xcc() const; + [[nodiscard]] ::emboss::support::Maybe has_xcc() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -4778,17 +4662,17 @@ class GenericCorrectNestedConditionalView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - ::std::int32_t Read() const { + [[nodiscard]] ::std::int32_t Read() const { EMBOSS_CHECK(view_.has_IntrinsicSizeInBytes().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - ::std::int32_t UncheckedRead() const { + [[nodiscard]] ::std::int32_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - bool Ok() const { + [[nodiscard]] bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -4801,12 +4685,12 @@ class GenericCorrectNestedConditionalView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } private: - ::emboss::support::Maybe MaybeRead() const { + [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.x(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(0LL))); @@ -4821,7 +4705,7 @@ class GenericCorrectNestedConditionalView final { return emboss_reserved_local_subexpr_10; } - static constexpr bool ValueIsOk( + [[nodiscard]] static constexpr bool ValueIsOk( ::std::int32_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -4829,8 +4713,8 @@ class GenericCorrectNestedConditionalView final { const GenericCorrectNestedConditionalView view_; }; - EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; - ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; + [[nodiscard]] EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + [[nodiscard]] ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; public: class EmbossReservedDollarVirtualMaxSizeInBytesView final { @@ -4846,9 +4730,9 @@ class GenericCorrectNestedConditionalView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -4857,13 +4741,13 @@ class GenericCorrectNestedConditionalView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -4881,9 +4765,9 @@ class GenericCorrectNestedConditionalView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -4892,13 +4776,13 @@ class GenericCorrectNestedConditionalView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -4929,7 +4813,7 @@ struct EmbossReservedInternalIsGenericCorrectNestedConditionalView< }; template -inline GenericCorrectNestedConditionalView< +[[nodiscard]] inline GenericCorrectNestedConditionalView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -4944,7 +4828,7 @@ MakeCorrectNestedConditionalView( T &&emboss_reserved_local_arg) { } template -inline GenericCorrectNestedConditionalView> +[[nodiscard]] inline GenericCorrectNestedConditionalView> MakeCorrectNestedConditionalView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericCorrectNestedConditionalView>( @@ -4953,7 +4837,7 @@ MakeCorrectNestedConditionalView( T *emboss_reserved_local_data, } template -inline GenericCorrectNestedConditionalView< +[[nodiscard]] inline GenericCorrectNestedConditionalView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedCorrectNestedConditionalView( T *emboss_reserved_local_data, @@ -5019,65 +4903,47 @@ class GenericAlwaysFalseConditionView final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !x().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(false); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !xc().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!x().Ok()) return false; + if (!IntrinsicSizeInBytes().Ok()) return false; + if (!MaxSizeInBytes().Ok()) return false; + if (!MinSizeInBytes().Ok()) return false; + } } - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(false); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!xc().Ok()) return false; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - static constexpr ::std::size_t SizeInBytes() { + [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - static constexpr bool SizeIsKnown() { + [[nodiscard]] static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericAlwaysFalseConditionView emboss_reserved_local_other) const { if (!has_x().Known()) return false; @@ -5115,7 +4981,7 @@ class GenericAlwaysFalseConditionView final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericAlwaysFalseConditionView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_x().ValueOr(false) && @@ -5162,7 +5028,7 @@ class GenericAlwaysFalseConditionView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericAlwaysFalseConditionView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -5295,23 +5161,23 @@ class GenericAlwaysFalseConditionView final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> x() const; - ::emboss::support::Maybe has_x() const; + [[nodiscard]] ::emboss::support::Maybe has_x() const; public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> xc() const; - ::emboss::support::Maybe has_xc() const; + [[nodiscard]] ::emboss::support::Maybe has_xc() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -5327,9 +5193,9 @@ class GenericAlwaysFalseConditionView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -5338,13 +5204,13 @@ class GenericAlwaysFalseConditionView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -5362,9 +5228,9 @@ class GenericAlwaysFalseConditionView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -5373,13 +5239,13 @@ class GenericAlwaysFalseConditionView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -5397,9 +5263,9 @@ class GenericAlwaysFalseConditionView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -5408,13 +5274,13 @@ class GenericAlwaysFalseConditionView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -5445,7 +5311,7 @@ struct EmbossReservedInternalIsGenericAlwaysFalseConditionView< }; template -inline GenericAlwaysFalseConditionView< +[[nodiscard]] inline GenericAlwaysFalseConditionView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -5460,7 +5326,7 @@ MakeAlwaysFalseConditionView( T &&emboss_reserved_local_arg) { } template -inline GenericAlwaysFalseConditionView> +[[nodiscard]] inline GenericAlwaysFalseConditionView> MakeAlwaysFalseConditionView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericAlwaysFalseConditionView>( @@ -5469,7 +5335,7 @@ MakeAlwaysFalseConditionView( T *emboss_reserved_local_data, } template -inline GenericAlwaysFalseConditionView< +[[nodiscard]] inline GenericAlwaysFalseConditionView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedAlwaysFalseConditionView( T *emboss_reserved_local_data, @@ -5534,58 +5400,46 @@ class GenericOnlyAlwaysFalseConditionView final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(false); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !xc().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(false); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!xc().Ok()) return false; + } } - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!IntrinsicSizeInBytes().Ok()) return false; + if (!MaxSizeInBytes().Ok()) return false; + if (!MinSizeInBytes().Ok()) return false; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - static constexpr ::std::size_t SizeInBytes() { + [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - static constexpr bool SizeIsKnown() { + [[nodiscard]] static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericOnlyAlwaysFalseConditionView emboss_reserved_local_other) const { if (!has_xc().Known()) return false; @@ -5606,7 +5460,7 @@ class GenericOnlyAlwaysFalseConditionView final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericOnlyAlwaysFalseConditionView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_xc().ValueOr(false) && @@ -5639,7 +5493,7 @@ class GenericOnlyAlwaysFalseConditionView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericOnlyAlwaysFalseConditionView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -5734,15 +5588,15 @@ class GenericOnlyAlwaysFalseConditionView final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> xc() const; - ::emboss::support::Maybe has_xc() const; + [[nodiscard]] ::emboss::support::Maybe has_xc() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -5758,9 +5612,9 @@ class GenericOnlyAlwaysFalseConditionView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -5769,13 +5623,13 @@ class GenericOnlyAlwaysFalseConditionView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -5793,9 +5647,9 @@ class GenericOnlyAlwaysFalseConditionView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -5804,13 +5658,13 @@ class GenericOnlyAlwaysFalseConditionView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -5828,9 +5682,9 @@ class GenericOnlyAlwaysFalseConditionView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -5839,13 +5693,13 @@ class GenericOnlyAlwaysFalseConditionView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -5876,7 +5730,7 @@ struct EmbossReservedInternalIsGenericOnlyAlwaysFalseConditionView< }; template -inline GenericOnlyAlwaysFalseConditionView< +[[nodiscard]] inline GenericOnlyAlwaysFalseConditionView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -5891,7 +5745,7 @@ MakeOnlyAlwaysFalseConditionView( T &&emboss_reserved_local_arg) { } template -inline GenericOnlyAlwaysFalseConditionView> +[[nodiscard]] inline GenericOnlyAlwaysFalseConditionView> MakeOnlyAlwaysFalseConditionView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericOnlyAlwaysFalseConditionView>( @@ -5900,7 +5754,7 @@ MakeOnlyAlwaysFalseConditionView( T *emboss_reserved_local_data, } template -inline GenericOnlyAlwaysFalseConditionView< +[[nodiscard]] inline GenericOnlyAlwaysFalseConditionView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedOnlyAlwaysFalseConditionView( T *emboss_reserved_local_data, @@ -5964,56 +5818,44 @@ class GenericEmptyStructView final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!IntrinsicSizeInBytes().Ok()) return false; + if (!MaxSizeInBytes().Ok()) return false; + if (!MinSizeInBytes().Ok()) return false; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - static constexpr ::std::size_t SizeInBytes() { + [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - static constexpr bool SizeIsKnown() { + [[nodiscard]] static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericEmptyStructView emboss_reserved_local_other) const { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericEmptyStructView emboss_reserved_local_other) const { return true; } @@ -6033,7 +5875,7 @@ class GenericEmptyStructView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericEmptyStructView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -6092,7 +5934,7 @@ class GenericEmptyStructView final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -6108,9 +5950,9 @@ class GenericEmptyStructView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -6119,13 +5961,13 @@ class GenericEmptyStructView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -6143,9 +5985,9 @@ class GenericEmptyStructView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -6154,13 +5996,13 @@ class GenericEmptyStructView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -6178,9 +6020,9 @@ class GenericEmptyStructView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -6189,13 +6031,13 @@ class GenericEmptyStructView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -6226,7 +6068,7 @@ struct EmbossReservedInternalIsGenericEmptyStructView< }; template -inline GenericEmptyStructView< +[[nodiscard]] inline GenericEmptyStructView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -6241,7 +6083,7 @@ MakeEmptyStructView( T &&emboss_reserved_local_arg) { } template -inline GenericEmptyStructView> +[[nodiscard]] inline GenericEmptyStructView> MakeEmptyStructView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericEmptyStructView>( @@ -6250,7 +6092,7 @@ MakeEmptyStructView( T *emboss_reserved_local_data, } template -inline GenericEmptyStructView< +[[nodiscard]] inline GenericEmptyStructView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedEmptyStructView( T *emboss_reserved_local_data, @@ -6317,71 +6159,47 @@ class GenericAlwaysFalseConditionDynamicSizeView final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !x().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !y().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(false); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !xc().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!x().Ok()) return false; + if (!y().Ok()) return false; + if (!IntrinsicSizeInBytes().Ok()) return false; + if (!MaxSizeInBytes().Ok()) return false; + if (!MinSizeInBytes().Ok()) return false; + } } - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(false); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!xc().Ok()) return false; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - ::std::size_t SizeInBytes() const { + [[nodiscard]] ::std::size_t SizeInBytes() const { return static_cast(IntrinsicSizeInBytes().Read()); } - bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + [[nodiscard]] bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericAlwaysFalseConditionDynamicSizeView emboss_reserved_local_other) const { if (!has_x().Known()) return false; @@ -6436,7 +6254,7 @@ class GenericAlwaysFalseConditionDynamicSizeView final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericAlwaysFalseConditionDynamicSizeView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_x().ValueOr(false) && @@ -6497,7 +6315,7 @@ class GenericAlwaysFalseConditionDynamicSizeView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericAlwaysFalseConditionDynamicSizeView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -6668,31 +6486,31 @@ class GenericAlwaysFalseConditionDynamicSizeView final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> x() const; - ::emboss::support::Maybe has_x() const; + [[nodiscard]] ::emboss::support::Maybe has_x() const; public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> y() const; - ::emboss::support::Maybe has_y() const; + [[nodiscard]] ::emboss::support::Maybe has_y() const; public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> xc() const; - ::emboss::support::Maybe has_xc() const; + [[nodiscard]] ::emboss::support::Maybe has_xc() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -6711,17 +6529,17 @@ class GenericAlwaysFalseConditionDynamicSizeView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - ::std::int32_t Read() const { + [[nodiscard]] ::std::int32_t Read() const { EMBOSS_CHECK(view_.has_IntrinsicSizeInBytes().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - ::std::int32_t UncheckedRead() const { + [[nodiscard]] ::std::int32_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - bool Ok() const { + [[nodiscard]] bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -6734,12 +6552,12 @@ class GenericAlwaysFalseConditionDynamicSizeView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } private: - ::emboss::support::Maybe MaybeRead() const { + [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.x(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Sum(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(1LL))); @@ -6749,7 +6567,7 @@ class GenericAlwaysFalseConditionDynamicSizeView final { return emboss_reserved_local_subexpr_5; } - static constexpr bool ValueIsOk( + [[nodiscard]] static constexpr bool ValueIsOk( ::std::int32_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -6757,8 +6575,8 @@ class GenericAlwaysFalseConditionDynamicSizeView final { const GenericAlwaysFalseConditionDynamicSizeView view_; }; - EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; - ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; + [[nodiscard]] EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + [[nodiscard]] ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; public: class EmbossReservedDollarVirtualMaxSizeInBytesView final { @@ -6774,9 +6592,9 @@ class GenericAlwaysFalseConditionDynamicSizeView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -6785,13 +6603,13 @@ class GenericAlwaysFalseConditionDynamicSizeView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -6809,9 +6627,9 @@ class GenericAlwaysFalseConditionDynamicSizeView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -6820,13 +6638,13 @@ class GenericAlwaysFalseConditionDynamicSizeView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -6857,7 +6675,7 @@ struct EmbossReservedInternalIsGenericAlwaysFalseConditionDynamicSizeView< }; template -inline GenericAlwaysFalseConditionDynamicSizeView< +[[nodiscard]] inline GenericAlwaysFalseConditionDynamicSizeView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -6872,7 +6690,7 @@ MakeAlwaysFalseConditionDynamicSizeView( T &&emboss_reserved_local_arg) { } template -inline GenericAlwaysFalseConditionDynamicSizeView> +[[nodiscard]] inline GenericAlwaysFalseConditionDynamicSizeView> MakeAlwaysFalseConditionDynamicSizeView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericAlwaysFalseConditionDynamicSizeView>( @@ -6881,7 +6699,7 @@ MakeAlwaysFalseConditionDynamicSizeView( T *emboss_reserved_local_data, } template -inline GenericAlwaysFalseConditionDynamicSizeView< +[[nodiscard]] inline GenericAlwaysFalseConditionDynamicSizeView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedAlwaysFalseConditionDynamicSizeView( T *emboss_reserved_local_data, @@ -6948,72 +6766,52 @@ class GenericConditionDoesNotContributeToSizeView final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; + const auto emboss_reserved_local_ok_subexpr_1 = x(); + const auto emboss_reserved_local_ok_subexpr_2 = (emboss_reserved_local_ok_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !x().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Equal((x().Ok() ? ::emboss::support::Maybe(static_cast(x().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(0LL))); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !xc().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !y().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!x().Ok()) return false; + if (!y().Ok()) return false; + if (!IntrinsicSizeInBytes().Ok()) return false; + if (!MaxSizeInBytes().Ok()) return false; + if (!MinSizeInBytes().Ok()) return false; + } } - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + const auto emboss_reserved_switch_discrim = emboss_reserved_local_ok_subexpr_2; + if (!emboss_reserved_switch_discrim.Known()) return false; + switch (emboss_reserved_switch_discrim.ValueOrDefault()) { + case static_cast(0LL): + if (!xc().Ok()) return false; + break; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - static constexpr ::std::size_t SizeInBytes() { + [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - static constexpr bool SizeIsKnown() { + [[nodiscard]] static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericConditionDoesNotContributeToSizeView emboss_reserved_local_other) const { if (!has_x().Known()) return false; @@ -7068,7 +6866,7 @@ class GenericConditionDoesNotContributeToSizeView final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericConditionDoesNotContributeToSizeView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_x().ValueOr(false) && @@ -7129,7 +6927,7 @@ class GenericConditionDoesNotContributeToSizeView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericConditionDoesNotContributeToSizeView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -7300,31 +7098,31 @@ class GenericConditionDoesNotContributeToSizeView final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> x() const; - ::emboss::support::Maybe has_x() const; + [[nodiscard]] ::emboss::support::Maybe has_x() const; public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> xc() const; - ::emboss::support::Maybe has_xc() const; + [[nodiscard]] ::emboss::support::Maybe has_xc() const; public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> y() const; - ::emboss::support::Maybe has_y() const; + [[nodiscard]] ::emboss::support::Maybe has_y() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -7340,9 +7138,9 @@ class GenericConditionDoesNotContributeToSizeView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -7351,13 +7149,13 @@ class GenericConditionDoesNotContributeToSizeView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -7375,9 +7173,9 @@ class GenericConditionDoesNotContributeToSizeView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -7386,13 +7184,13 @@ class GenericConditionDoesNotContributeToSizeView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -7410,9 +7208,9 @@ class GenericConditionDoesNotContributeToSizeView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -7421,13 +7219,13 @@ class GenericConditionDoesNotContributeToSizeView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -7458,7 +7256,7 @@ struct EmbossReservedInternalIsGenericConditionDoesNotContributeToSizeView< }; template -inline GenericConditionDoesNotContributeToSizeView< +[[nodiscard]] inline GenericConditionDoesNotContributeToSizeView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -7473,7 +7271,7 @@ MakeConditionDoesNotContributeToSizeView( T &&emboss_reserved_local_arg) { } template -inline GenericConditionDoesNotContributeToSizeView> +[[nodiscard]] inline GenericConditionDoesNotContributeToSizeView> MakeConditionDoesNotContributeToSizeView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericConditionDoesNotContributeToSizeView>( @@ -7482,7 +7280,7 @@ MakeConditionDoesNotContributeToSizeView( T *emboss_reserved_local_data, } template -inline GenericConditionDoesNotContributeToSizeView< +[[nodiscard]] inline GenericConditionDoesNotContributeToSizeView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedConditionDoesNotContributeToSizeView( T *emboss_reserved_local_data, @@ -7636,72 +7434,58 @@ class GenericEnumConditionView final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; - const auto emboss_reserved_local_ok_subexpr_1 = x(); - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !x().Ok()) return false; - } - + const auto emboss_reserved_local_ok_subexpr_1 = x(); + const auto emboss_reserved_local_ok_subexpr_2 = (emboss_reserved_local_ok_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_ok_subexpr_3 = ::emboss::support::GreaterThan(emboss_reserved_local_ok_subexpr_2, ::emboss::support::Maybe(static_cast(0))); { - const auto emboss_reserved_local_field_present = ::emboss::support::Equal((emboss_reserved_local_ok_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(1))); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !xc().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!x().Ok()) return false; + if (!IntrinsicSizeInBytes().Ok()) return false; + if (!MaxSizeInBytes().Ok()) return false; + if (!MinSizeInBytes().Ok()) return false; + } } - - { - const auto emboss_reserved_local_field_present = ::emboss::support::GreaterThan((emboss_reserved_local_ok_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(0))); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !xc2().Ok()) return false; + const auto emboss_reserved_switch_discrim = emboss_reserved_local_ok_subexpr_2; + if (!emboss_reserved_switch_discrim.Known()) return false; + switch (emboss_reserved_switch_discrim.ValueOrDefault()) { + case static_cast(1): + if (!xc().Ok()) return false; + break; + } } - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = emboss_reserved_local_ok_subexpr_3; + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!xc2().Ok()) return false; + } } - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; - } - - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - ::std::size_t SizeInBytes() const { + [[nodiscard]] ::std::size_t SizeInBytes() const { return static_cast(IntrinsicSizeInBytes().Read()); } - bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + [[nodiscard]] bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericEnumConditionView emboss_reserved_local_other) const { if (!has_x().Known()) return false; @@ -7756,7 +7540,7 @@ class GenericEnumConditionView final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericEnumConditionView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_x().ValueOr(false) && @@ -7817,7 +7601,7 @@ class GenericEnumConditionView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericEnumConditionView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -7988,32 +7772,32 @@ class GenericEnumConditionView final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: - typename ::emboss::support::EnumView< + [[nodiscard]] typename ::emboss::support::EnumView< /**/ ::emboss::test::OnOff, ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> x() const; - ::emboss::support::Maybe has_x() const; + [[nodiscard]] ::emboss::support::Maybe has_x() const; public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> xc() const; - ::emboss::support::Maybe has_xc() const; + [[nodiscard]] ::emboss::support::Maybe has_xc() const; public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> xc2() const; - ::emboss::support::Maybe has_xc2() const; + [[nodiscard]] ::emboss::support::Maybe has_xc2() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -8032,17 +7816,17 @@ class GenericEnumConditionView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - ::std::int32_t Read() const { + [[nodiscard]] ::std::int32_t Read() const { EMBOSS_CHECK(view_.has_IntrinsicSizeInBytes().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - ::std::int32_t UncheckedRead() const { + [[nodiscard]] ::std::int32_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - bool Ok() const { + [[nodiscard]] bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -8055,12 +7839,12 @@ class GenericEnumConditionView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } private: - ::emboss::support::Maybe MaybeRead() const { + [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.x(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(1))); @@ -8072,7 +7856,7 @@ class GenericEnumConditionView final { return emboss_reserved_local_subexpr_7; } - static constexpr bool ValueIsOk( + [[nodiscard]] static constexpr bool ValueIsOk( ::std::int32_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -8080,8 +7864,8 @@ class GenericEnumConditionView final { const GenericEnumConditionView view_; }; - EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; - ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; + [[nodiscard]] EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + [[nodiscard]] ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; public: class EmbossReservedDollarVirtualMaxSizeInBytesView final { @@ -8097,9 +7881,9 @@ class GenericEnumConditionView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -8108,13 +7892,13 @@ class GenericEnumConditionView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -8132,9 +7916,9 @@ class GenericEnumConditionView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -8143,13 +7927,13 @@ class GenericEnumConditionView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -8180,7 +7964,7 @@ struct EmbossReservedInternalIsGenericEnumConditionView< }; template -inline GenericEnumConditionView< +[[nodiscard]] inline GenericEnumConditionView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -8195,7 +7979,7 @@ MakeEnumConditionView( T &&emboss_reserved_local_arg) { } template -inline GenericEnumConditionView> +[[nodiscard]] inline GenericEnumConditionView> MakeEnumConditionView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericEnumConditionView>( @@ -8204,7 +7988,7 @@ MakeEnumConditionView( T *emboss_reserved_local_data, } template -inline GenericEnumConditionView< +[[nodiscard]] inline GenericEnumConditionView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedEnumConditionView( T *emboss_reserved_local_data, @@ -8270,64 +8054,49 @@ class GenericNegativeEnumConditionView final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; + const auto emboss_reserved_local_ok_subexpr_1 = x(); + const auto emboss_reserved_local_ok_subexpr_2 = (emboss_reserved_local_ok_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_ok_subexpr_3 = ::emboss::support::NotEqual(emboss_reserved_local_ok_subexpr_2, ::emboss::support::Maybe(static_cast(1))); { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !x().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::NotEqual((x().Ok() ? ::emboss::support::Maybe(static_cast(x().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(1))); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !xc().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!x().Ok()) return false; + if (!IntrinsicSizeInBytes().Ok()) return false; + if (!MaxSizeInBytes().Ok()) return false; + if (!MinSizeInBytes().Ok()) return false; + } } - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = emboss_reserved_local_ok_subexpr_3; + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!xc().Ok()) return false; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - ::std::size_t SizeInBytes() const { + [[nodiscard]] ::std::size_t SizeInBytes() const { return static_cast(IntrinsicSizeInBytes().Read()); } - bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + [[nodiscard]] bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericNegativeEnumConditionView emboss_reserved_local_other) const { if (!has_x().Known()) return false; @@ -8365,7 +8134,7 @@ class GenericNegativeEnumConditionView final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericNegativeEnumConditionView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_x().ValueOr(false) && @@ -8412,7 +8181,7 @@ class GenericNegativeEnumConditionView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericNegativeEnumConditionView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -8545,24 +8314,24 @@ class GenericNegativeEnumConditionView final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: - typename ::emboss::support::EnumView< + [[nodiscard]] typename ::emboss::support::EnumView< /**/ ::emboss::test::OnOff, ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> x() const; - ::emboss::support::Maybe has_x() const; + [[nodiscard]] ::emboss::support::Maybe has_x() const; public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> xc() const; - ::emboss::support::Maybe has_xc() const; + [[nodiscard]] ::emboss::support::Maybe has_xc() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -8581,17 +8350,17 @@ class GenericNegativeEnumConditionView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - ::std::int32_t Read() const { + [[nodiscard]] ::std::int32_t Read() const { EMBOSS_CHECK(view_.has_IntrinsicSizeInBytes().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - ::std::int32_t UncheckedRead() const { + [[nodiscard]] ::std::int32_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - bool Ok() const { + [[nodiscard]] bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -8604,12 +8373,12 @@ class GenericNegativeEnumConditionView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } private: - ::emboss::support::Maybe MaybeRead() const { + [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.x(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::NotEqual(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(1))); @@ -8619,7 +8388,7 @@ class GenericNegativeEnumConditionView final { return emboss_reserved_local_subexpr_5; } - static constexpr bool ValueIsOk( + [[nodiscard]] static constexpr bool ValueIsOk( ::std::int32_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -8627,8 +8396,8 @@ class GenericNegativeEnumConditionView final { const GenericNegativeEnumConditionView view_; }; - EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; - ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; + [[nodiscard]] EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + [[nodiscard]] ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; public: class EmbossReservedDollarVirtualMaxSizeInBytesView final { @@ -8644,9 +8413,9 @@ class GenericNegativeEnumConditionView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -8655,13 +8424,13 @@ class GenericNegativeEnumConditionView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -8679,9 +8448,9 @@ class GenericNegativeEnumConditionView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -8690,13 +8459,13 @@ class GenericNegativeEnumConditionView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -8727,7 +8496,7 @@ struct EmbossReservedInternalIsGenericNegativeEnumConditionView< }; template -inline GenericNegativeEnumConditionView< +[[nodiscard]] inline GenericNegativeEnumConditionView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -8742,7 +8511,7 @@ MakeNegativeEnumConditionView( T &&emboss_reserved_local_arg) { } template -inline GenericNegativeEnumConditionView> +[[nodiscard]] inline GenericNegativeEnumConditionView> MakeNegativeEnumConditionView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericNegativeEnumConditionView>( @@ -8751,7 +8520,7 @@ MakeNegativeEnumConditionView( T *emboss_reserved_local_data, } template -inline GenericNegativeEnumConditionView< +[[nodiscard]] inline GenericNegativeEnumConditionView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedNegativeEnumConditionView( T *emboss_reserved_local_data, @@ -8817,64 +8586,49 @@ class GenericLessThanConditionView final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; + const auto emboss_reserved_local_ok_subexpr_1 = x(); + const auto emboss_reserved_local_ok_subexpr_2 = (emboss_reserved_local_ok_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_ok_subexpr_3 = ::emboss::support::LessThan(emboss_reserved_local_ok_subexpr_2, ::emboss::support::Maybe(static_cast(5LL))); { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !x().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::LessThan((x().Ok() ? ::emboss::support::Maybe(static_cast(x().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(5LL))); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !xc().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!x().Ok()) return false; + if (!IntrinsicSizeInBytes().Ok()) return false; + if (!MaxSizeInBytes().Ok()) return false; + if (!MinSizeInBytes().Ok()) return false; + } } - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = emboss_reserved_local_ok_subexpr_3; + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!xc().Ok()) return false; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - ::std::size_t SizeInBytes() const { + [[nodiscard]] ::std::size_t SizeInBytes() const { return static_cast(IntrinsicSizeInBytes().Read()); } - bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + [[nodiscard]] bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericLessThanConditionView emboss_reserved_local_other) const { if (!has_x().Known()) return false; @@ -8912,7 +8666,7 @@ class GenericLessThanConditionView final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericLessThanConditionView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_x().ValueOr(false) && @@ -8959,7 +8713,7 @@ class GenericLessThanConditionView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericLessThanConditionView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -9092,23 +8846,23 @@ class GenericLessThanConditionView final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> x() const; - ::emboss::support::Maybe has_x() const; + [[nodiscard]] ::emboss::support::Maybe has_x() const; public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> xc() const; - ::emboss::support::Maybe has_xc() const; + [[nodiscard]] ::emboss::support::Maybe has_xc() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -9127,17 +8881,17 @@ class GenericLessThanConditionView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - ::std::int32_t Read() const { + [[nodiscard]] ::std::int32_t Read() const { EMBOSS_CHECK(view_.has_IntrinsicSizeInBytes().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - ::std::int32_t UncheckedRead() const { + [[nodiscard]] ::std::int32_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - bool Ok() const { + [[nodiscard]] bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -9150,12 +8904,12 @@ class GenericLessThanConditionView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } private: - ::emboss::support::Maybe MaybeRead() const { + [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.x(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::LessThan(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(5LL))); @@ -9165,7 +8919,7 @@ class GenericLessThanConditionView final { return emboss_reserved_local_subexpr_5; } - static constexpr bool ValueIsOk( + [[nodiscard]] static constexpr bool ValueIsOk( ::std::int32_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -9173,8 +8927,8 @@ class GenericLessThanConditionView final { const GenericLessThanConditionView view_; }; - EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; - ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; + [[nodiscard]] EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + [[nodiscard]] ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; public: class EmbossReservedDollarVirtualMaxSizeInBytesView final { @@ -9190,9 +8944,9 @@ class GenericLessThanConditionView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -9201,13 +8955,13 @@ class GenericLessThanConditionView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -9225,9 +8979,9 @@ class GenericLessThanConditionView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -9236,13 +8990,13 @@ class GenericLessThanConditionView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -9273,7 +9027,7 @@ struct EmbossReservedInternalIsGenericLessThanConditionView< }; template -inline GenericLessThanConditionView< +[[nodiscard]] inline GenericLessThanConditionView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -9288,7 +9042,7 @@ MakeLessThanConditionView( T &&emboss_reserved_local_arg) { } template -inline GenericLessThanConditionView> +[[nodiscard]] inline GenericLessThanConditionView> MakeLessThanConditionView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericLessThanConditionView>( @@ -9297,7 +9051,7 @@ MakeLessThanConditionView( T *emboss_reserved_local_data, } template -inline GenericLessThanConditionView< +[[nodiscard]] inline GenericLessThanConditionView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedLessThanConditionView( T *emboss_reserved_local_data, @@ -9363,64 +9117,49 @@ class GenericLessThanOrEqualConditionView final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; + const auto emboss_reserved_local_ok_subexpr_1 = x(); + const auto emboss_reserved_local_ok_subexpr_2 = (emboss_reserved_local_ok_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_ok_subexpr_3 = ::emboss::support::LessThanOrEqual(emboss_reserved_local_ok_subexpr_2, ::emboss::support::Maybe(static_cast(5LL))); { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !x().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::LessThanOrEqual((x().Ok() ? ::emboss::support::Maybe(static_cast(x().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(5LL))); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !xc().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!x().Ok()) return false; + if (!IntrinsicSizeInBytes().Ok()) return false; + if (!MaxSizeInBytes().Ok()) return false; + if (!MinSizeInBytes().Ok()) return false; + } } - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = emboss_reserved_local_ok_subexpr_3; + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!xc().Ok()) return false; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - ::std::size_t SizeInBytes() const { + [[nodiscard]] ::std::size_t SizeInBytes() const { return static_cast(IntrinsicSizeInBytes().Read()); } - bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + [[nodiscard]] bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericLessThanOrEqualConditionView emboss_reserved_local_other) const { if (!has_x().Known()) return false; @@ -9458,7 +9197,7 @@ class GenericLessThanOrEqualConditionView final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericLessThanOrEqualConditionView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_x().ValueOr(false) && @@ -9505,7 +9244,7 @@ class GenericLessThanOrEqualConditionView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericLessThanOrEqualConditionView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -9638,23 +9377,23 @@ class GenericLessThanOrEqualConditionView final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> x() const; - ::emboss::support::Maybe has_x() const; + [[nodiscard]] ::emboss::support::Maybe has_x() const; public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> xc() const; - ::emboss::support::Maybe has_xc() const; + [[nodiscard]] ::emboss::support::Maybe has_xc() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -9673,17 +9412,17 @@ class GenericLessThanOrEqualConditionView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - ::std::int32_t Read() const { + [[nodiscard]] ::std::int32_t Read() const { EMBOSS_CHECK(view_.has_IntrinsicSizeInBytes().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - ::std::int32_t UncheckedRead() const { + [[nodiscard]] ::std::int32_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - bool Ok() const { + [[nodiscard]] bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -9696,12 +9435,12 @@ class GenericLessThanOrEqualConditionView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } private: - ::emboss::support::Maybe MaybeRead() const { + [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.x(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::LessThanOrEqual(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(5LL))); @@ -9711,7 +9450,7 @@ class GenericLessThanOrEqualConditionView final { return emboss_reserved_local_subexpr_5; } - static constexpr bool ValueIsOk( + [[nodiscard]] static constexpr bool ValueIsOk( ::std::int32_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -9719,8 +9458,8 @@ class GenericLessThanOrEqualConditionView final { const GenericLessThanOrEqualConditionView view_; }; - EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; - ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; + [[nodiscard]] EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + [[nodiscard]] ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; public: class EmbossReservedDollarVirtualMaxSizeInBytesView final { @@ -9736,9 +9475,9 @@ class GenericLessThanOrEqualConditionView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -9747,13 +9486,13 @@ class GenericLessThanOrEqualConditionView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -9771,9 +9510,9 @@ class GenericLessThanOrEqualConditionView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -9782,13 +9521,13 @@ class GenericLessThanOrEqualConditionView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -9819,7 +9558,7 @@ struct EmbossReservedInternalIsGenericLessThanOrEqualConditionView< }; template -inline GenericLessThanOrEqualConditionView< +[[nodiscard]] inline GenericLessThanOrEqualConditionView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -9834,7 +9573,7 @@ MakeLessThanOrEqualConditionView( T &&emboss_reserved_local_arg) { } template -inline GenericLessThanOrEqualConditionView> +[[nodiscard]] inline GenericLessThanOrEqualConditionView> MakeLessThanOrEqualConditionView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericLessThanOrEqualConditionView>( @@ -9843,7 +9582,7 @@ MakeLessThanOrEqualConditionView( T *emboss_reserved_local_data, } template -inline GenericLessThanOrEqualConditionView< +[[nodiscard]] inline GenericLessThanOrEqualConditionView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedLessThanOrEqualConditionView( T *emboss_reserved_local_data, @@ -9909,64 +9648,49 @@ class GenericGreaterThanOrEqualConditionView final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; + const auto emboss_reserved_local_ok_subexpr_1 = x(); + const auto emboss_reserved_local_ok_subexpr_2 = (emboss_reserved_local_ok_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_ok_subexpr_3 = ::emboss::support::GreaterThanOrEqual(emboss_reserved_local_ok_subexpr_2, ::emboss::support::Maybe(static_cast(5LL))); { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !x().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::GreaterThanOrEqual((x().Ok() ? ::emboss::support::Maybe(static_cast(x().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(5LL))); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !xc().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!x().Ok()) return false; + if (!IntrinsicSizeInBytes().Ok()) return false; + if (!MaxSizeInBytes().Ok()) return false; + if (!MinSizeInBytes().Ok()) return false; + } } - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = emboss_reserved_local_ok_subexpr_3; + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!xc().Ok()) return false; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - ::std::size_t SizeInBytes() const { + [[nodiscard]] ::std::size_t SizeInBytes() const { return static_cast(IntrinsicSizeInBytes().Read()); } - bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + [[nodiscard]] bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericGreaterThanOrEqualConditionView emboss_reserved_local_other) const { if (!has_x().Known()) return false; @@ -10004,7 +9728,7 @@ class GenericGreaterThanOrEqualConditionView final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericGreaterThanOrEqualConditionView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_x().ValueOr(false) && @@ -10051,7 +9775,7 @@ class GenericGreaterThanOrEqualConditionView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericGreaterThanOrEqualConditionView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -10184,23 +9908,23 @@ class GenericGreaterThanOrEqualConditionView final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> x() const; - ::emboss::support::Maybe has_x() const; + [[nodiscard]] ::emboss::support::Maybe has_x() const; public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> xc() const; - ::emboss::support::Maybe has_xc() const; + [[nodiscard]] ::emboss::support::Maybe has_xc() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -10219,17 +9943,17 @@ class GenericGreaterThanOrEqualConditionView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - ::std::int32_t Read() const { + [[nodiscard]] ::std::int32_t Read() const { EMBOSS_CHECK(view_.has_IntrinsicSizeInBytes().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - ::std::int32_t UncheckedRead() const { + [[nodiscard]] ::std::int32_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - bool Ok() const { + [[nodiscard]] bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -10242,12 +9966,12 @@ class GenericGreaterThanOrEqualConditionView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } private: - ::emboss::support::Maybe MaybeRead() const { + [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.x(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::GreaterThanOrEqual(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(5LL))); @@ -10257,7 +9981,7 @@ class GenericGreaterThanOrEqualConditionView final { return emboss_reserved_local_subexpr_5; } - static constexpr bool ValueIsOk( + [[nodiscard]] static constexpr bool ValueIsOk( ::std::int32_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -10265,8 +9989,8 @@ class GenericGreaterThanOrEqualConditionView final { const GenericGreaterThanOrEqualConditionView view_; }; - EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; - ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; + [[nodiscard]] EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + [[nodiscard]] ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; public: class EmbossReservedDollarVirtualMaxSizeInBytesView final { @@ -10282,9 +10006,9 @@ class GenericGreaterThanOrEqualConditionView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -10293,13 +10017,13 @@ class GenericGreaterThanOrEqualConditionView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -10317,9 +10041,9 @@ class GenericGreaterThanOrEqualConditionView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -10328,13 +10052,13 @@ class GenericGreaterThanOrEqualConditionView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -10365,7 +10089,7 @@ struct EmbossReservedInternalIsGenericGreaterThanOrEqualConditionView< }; template -inline GenericGreaterThanOrEqualConditionView< +[[nodiscard]] inline GenericGreaterThanOrEqualConditionView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -10380,7 +10104,7 @@ MakeGreaterThanOrEqualConditionView( T &&emboss_reserved_local_arg) { } template -inline GenericGreaterThanOrEqualConditionView> +[[nodiscard]] inline GenericGreaterThanOrEqualConditionView> MakeGreaterThanOrEqualConditionView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericGreaterThanOrEqualConditionView>( @@ -10389,7 +10113,7 @@ MakeGreaterThanOrEqualConditionView( T *emboss_reserved_local_data, } template -inline GenericGreaterThanOrEqualConditionView< +[[nodiscard]] inline GenericGreaterThanOrEqualConditionView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedGreaterThanOrEqualConditionView( T *emboss_reserved_local_data, @@ -10455,64 +10179,49 @@ class GenericGreaterThanConditionView final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; + const auto emboss_reserved_local_ok_subexpr_1 = x(); + const auto emboss_reserved_local_ok_subexpr_2 = (emboss_reserved_local_ok_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_ok_subexpr_3 = ::emboss::support::GreaterThan(emboss_reserved_local_ok_subexpr_2, ::emboss::support::Maybe(static_cast(5LL))); { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !x().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::GreaterThan((x().Ok() ? ::emboss::support::Maybe(static_cast(x().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(5LL))); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !xc().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!x().Ok()) return false; + if (!IntrinsicSizeInBytes().Ok()) return false; + if (!MaxSizeInBytes().Ok()) return false; + if (!MinSizeInBytes().Ok()) return false; + } } - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = emboss_reserved_local_ok_subexpr_3; + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!xc().Ok()) return false; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - ::std::size_t SizeInBytes() const { + [[nodiscard]] ::std::size_t SizeInBytes() const { return static_cast(IntrinsicSizeInBytes().Read()); } - bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + [[nodiscard]] bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericGreaterThanConditionView emboss_reserved_local_other) const { if (!has_x().Known()) return false; @@ -10550,7 +10259,7 @@ class GenericGreaterThanConditionView final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericGreaterThanConditionView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_x().ValueOr(false) && @@ -10597,7 +10306,7 @@ class GenericGreaterThanConditionView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericGreaterThanConditionView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -10730,23 +10439,23 @@ class GenericGreaterThanConditionView final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> x() const; - ::emboss::support::Maybe has_x() const; + [[nodiscard]] ::emboss::support::Maybe has_x() const; public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> xc() const; - ::emboss::support::Maybe has_xc() const; + [[nodiscard]] ::emboss::support::Maybe has_xc() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -10765,17 +10474,17 @@ class GenericGreaterThanConditionView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - ::std::int32_t Read() const { + [[nodiscard]] ::std::int32_t Read() const { EMBOSS_CHECK(view_.has_IntrinsicSizeInBytes().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - ::std::int32_t UncheckedRead() const { + [[nodiscard]] ::std::int32_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - bool Ok() const { + [[nodiscard]] bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -10788,12 +10497,12 @@ class GenericGreaterThanConditionView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } private: - ::emboss::support::Maybe MaybeRead() const { + [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.x(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::GreaterThan(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(5LL))); @@ -10803,7 +10512,7 @@ class GenericGreaterThanConditionView final { return emboss_reserved_local_subexpr_5; } - static constexpr bool ValueIsOk( + [[nodiscard]] static constexpr bool ValueIsOk( ::std::int32_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -10811,8 +10520,8 @@ class GenericGreaterThanConditionView final { const GenericGreaterThanConditionView view_; }; - EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; - ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; + [[nodiscard]] EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + [[nodiscard]] ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; public: class EmbossReservedDollarVirtualMaxSizeInBytesView final { @@ -10828,9 +10537,9 @@ class GenericGreaterThanConditionView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -10839,13 +10548,13 @@ class GenericGreaterThanConditionView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -10863,9 +10572,9 @@ class GenericGreaterThanConditionView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -10874,13 +10583,13 @@ class GenericGreaterThanConditionView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -10911,7 +10620,7 @@ struct EmbossReservedInternalIsGenericGreaterThanConditionView< }; template -inline GenericGreaterThanConditionView< +[[nodiscard]] inline GenericGreaterThanConditionView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -10926,7 +10635,7 @@ MakeGreaterThanConditionView( T &&emboss_reserved_local_arg) { } template -inline GenericGreaterThanConditionView> +[[nodiscard]] inline GenericGreaterThanConditionView> MakeGreaterThanConditionView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericGreaterThanConditionView>( @@ -10935,7 +10644,7 @@ MakeGreaterThanConditionView( T *emboss_reserved_local_data, } template -inline GenericGreaterThanConditionView< +[[nodiscard]] inline GenericGreaterThanConditionView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedGreaterThanConditionView( T *emboss_reserved_local_data, @@ -11002,73 +10711,56 @@ class GenericRangeConditionView final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; - const auto emboss_reserved_local_ok_subexpr_1 = x(); - const auto emboss_reserved_local_ok_subexpr_2 = y(); - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !x().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !y().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::And(::emboss::support::And(::emboss::support::LessThan(::emboss::support::Maybe(static_cast(5LL)), (emboss_reserved_local_ok_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe())), ::emboss::support::LessThanOrEqual((emboss_reserved_local_ok_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()), (emboss_reserved_local_ok_subexpr_2.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_2.UncheckedRead())) : ::emboss::support::Maybe()))), ::emboss::support::LessThan((emboss_reserved_local_ok_subexpr_2.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_2.UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(10LL)))); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !xc().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; - } - + const auto emboss_reserved_local_ok_subexpr_1 = x(); + const auto emboss_reserved_local_ok_subexpr_2 = (emboss_reserved_local_ok_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_ok_subexpr_3 = ::emboss::support::LessThan(::emboss::support::Maybe(static_cast(5LL)), emboss_reserved_local_ok_subexpr_2); + const auto emboss_reserved_local_ok_subexpr_4 = y(); + const auto emboss_reserved_local_ok_subexpr_5 = (emboss_reserved_local_ok_subexpr_4.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_4.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_ok_subexpr_6 = ::emboss::support::LessThanOrEqual(emboss_reserved_local_ok_subexpr_2, emboss_reserved_local_ok_subexpr_5); + const auto emboss_reserved_local_ok_subexpr_7 = ::emboss::support::And(emboss_reserved_local_ok_subexpr_3, emboss_reserved_local_ok_subexpr_6); + const auto emboss_reserved_local_ok_subexpr_8 = ::emboss::support::LessThan(emboss_reserved_local_ok_subexpr_5, ::emboss::support::Maybe(static_cast(10LL))); + const auto emboss_reserved_local_ok_subexpr_9 = ::emboss::support::And(emboss_reserved_local_ok_subexpr_7, emboss_reserved_local_ok_subexpr_8); { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!x().Ok()) return false; + if (!y().Ok()) return false; + if (!IntrinsicSizeInBytes().Ok()) return false; + if (!MaxSizeInBytes().Ok()) return false; + if (!MinSizeInBytes().Ok()) return false; + } } - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = emboss_reserved_local_ok_subexpr_9; + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!xc().Ok()) return false; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - ::std::size_t SizeInBytes() const { + [[nodiscard]] ::std::size_t SizeInBytes() const { return static_cast(IntrinsicSizeInBytes().Read()); } - bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + [[nodiscard]] bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericRangeConditionView emboss_reserved_local_other) const { if (!has_x().Known()) return false; @@ -11123,7 +10815,7 @@ class GenericRangeConditionView final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericRangeConditionView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_x().ValueOr(false) && @@ -11184,7 +10876,7 @@ class GenericRangeConditionView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericRangeConditionView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -11355,31 +11047,31 @@ class GenericRangeConditionView final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> x() const; - ::emboss::support::Maybe has_x() const; + [[nodiscard]] ::emboss::support::Maybe has_x() const; public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> y() const; - ::emboss::support::Maybe has_y() const; + [[nodiscard]] ::emboss::support::Maybe has_y() const; public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> xc() const; - ::emboss::support::Maybe has_xc() const; + [[nodiscard]] ::emboss::support::Maybe has_xc() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -11398,17 +11090,17 @@ class GenericRangeConditionView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - ::std::int32_t Read() const { + [[nodiscard]] ::std::int32_t Read() const { EMBOSS_CHECK(view_.has_IntrinsicSizeInBytes().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - ::std::int32_t UncheckedRead() const { + [[nodiscard]] ::std::int32_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - bool Ok() const { + [[nodiscard]] bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -11421,12 +11113,12 @@ class GenericRangeConditionView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } private: - ::emboss::support::Maybe MaybeRead() const { + [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.x(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::LessThan(::emboss::support::Maybe(static_cast(5LL)), emboss_reserved_local_subexpr_2); @@ -11442,7 +11134,7 @@ class GenericRangeConditionView final { return emboss_reserved_local_subexpr_11; } - static constexpr bool ValueIsOk( + [[nodiscard]] static constexpr bool ValueIsOk( ::std::int32_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -11450,8 +11142,8 @@ class GenericRangeConditionView final { const GenericRangeConditionView view_; }; - EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; - ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; + [[nodiscard]] EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + [[nodiscard]] ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; public: class EmbossReservedDollarVirtualMaxSizeInBytesView final { @@ -11467,9 +11159,9 @@ class GenericRangeConditionView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -11478,13 +11170,13 @@ class GenericRangeConditionView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -11502,9 +11194,9 @@ class GenericRangeConditionView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -11513,13 +11205,13 @@ class GenericRangeConditionView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -11550,7 +11242,7 @@ struct EmbossReservedInternalIsGenericRangeConditionView< }; template -inline GenericRangeConditionView< +[[nodiscard]] inline GenericRangeConditionView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -11565,7 +11257,7 @@ MakeRangeConditionView( T &&emboss_reserved_local_arg) { } template -inline GenericRangeConditionView> +[[nodiscard]] inline GenericRangeConditionView> MakeRangeConditionView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericRangeConditionView>( @@ -11574,7 +11266,7 @@ MakeRangeConditionView( T *emboss_reserved_local_data, } template -inline GenericRangeConditionView< +[[nodiscard]] inline GenericRangeConditionView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedRangeConditionView( T *emboss_reserved_local_data, @@ -11641,73 +11333,56 @@ class GenericReverseRangeConditionView final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; - const auto emboss_reserved_local_ok_subexpr_1 = y(); - const auto emboss_reserved_local_ok_subexpr_2 = x(); - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !x().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !y().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::And(::emboss::support::And(::emboss::support::GreaterThan(::emboss::support::Maybe(static_cast(10LL)), (emboss_reserved_local_ok_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe())), ::emboss::support::GreaterThanOrEqual((emboss_reserved_local_ok_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()), (emboss_reserved_local_ok_subexpr_2.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_2.UncheckedRead())) : ::emboss::support::Maybe()))), ::emboss::support::GreaterThan((emboss_reserved_local_ok_subexpr_2.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_2.UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(5LL)))); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !xc().Ok()) return false; - } - + const auto emboss_reserved_local_ok_subexpr_1 = y(); + const auto emboss_reserved_local_ok_subexpr_2 = (emboss_reserved_local_ok_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_ok_subexpr_3 = ::emboss::support::GreaterThan(::emboss::support::Maybe(static_cast(10LL)), emboss_reserved_local_ok_subexpr_2); + const auto emboss_reserved_local_ok_subexpr_4 = x(); + const auto emboss_reserved_local_ok_subexpr_5 = (emboss_reserved_local_ok_subexpr_4.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_4.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_ok_subexpr_6 = ::emboss::support::GreaterThanOrEqual(emboss_reserved_local_ok_subexpr_2, emboss_reserved_local_ok_subexpr_5); + const auto emboss_reserved_local_ok_subexpr_7 = ::emboss::support::And(emboss_reserved_local_ok_subexpr_3, emboss_reserved_local_ok_subexpr_6); + const auto emboss_reserved_local_ok_subexpr_8 = ::emboss::support::GreaterThan(emboss_reserved_local_ok_subexpr_5, ::emboss::support::Maybe(static_cast(5LL))); + const auto emboss_reserved_local_ok_subexpr_9 = ::emboss::support::And(emboss_reserved_local_ok_subexpr_7, emboss_reserved_local_ok_subexpr_8); { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!x().Ok()) return false; + if (!y().Ok()) return false; + if (!IntrinsicSizeInBytes().Ok()) return false; + if (!MaxSizeInBytes().Ok()) return false; + if (!MinSizeInBytes().Ok()) return false; + } } - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = emboss_reserved_local_ok_subexpr_9; + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!xc().Ok()) return false; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - ::std::size_t SizeInBytes() const { + [[nodiscard]] ::std::size_t SizeInBytes() const { return static_cast(IntrinsicSizeInBytes().Read()); } - bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + [[nodiscard]] bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericReverseRangeConditionView emboss_reserved_local_other) const { if (!has_x().Known()) return false; @@ -11762,7 +11437,7 @@ class GenericReverseRangeConditionView final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericReverseRangeConditionView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_x().ValueOr(false) && @@ -11823,7 +11498,7 @@ class GenericReverseRangeConditionView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericReverseRangeConditionView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -11994,31 +11669,31 @@ class GenericReverseRangeConditionView final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> x() const; - ::emboss::support::Maybe has_x() const; + [[nodiscard]] ::emboss::support::Maybe has_x() const; public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> y() const; - ::emboss::support::Maybe has_y() const; + [[nodiscard]] ::emboss::support::Maybe has_y() const; public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> xc() const; - ::emboss::support::Maybe has_xc() const; + [[nodiscard]] ::emboss::support::Maybe has_xc() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -12037,17 +11712,17 @@ class GenericReverseRangeConditionView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - ::std::int32_t Read() const { + [[nodiscard]] ::std::int32_t Read() const { EMBOSS_CHECK(view_.has_IntrinsicSizeInBytes().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - ::std::int32_t UncheckedRead() const { + [[nodiscard]] ::std::int32_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - bool Ok() const { + [[nodiscard]] bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -12060,12 +11735,12 @@ class GenericReverseRangeConditionView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } private: - ::emboss::support::Maybe MaybeRead() const { + [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.y(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::GreaterThan(::emboss::support::Maybe(static_cast(10LL)), emboss_reserved_local_subexpr_2); @@ -12081,7 +11756,7 @@ class GenericReverseRangeConditionView final { return emboss_reserved_local_subexpr_11; } - static constexpr bool ValueIsOk( + [[nodiscard]] static constexpr bool ValueIsOk( ::std::int32_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -12089,8 +11764,8 @@ class GenericReverseRangeConditionView final { const GenericReverseRangeConditionView view_; }; - EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; - ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; + [[nodiscard]] EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + [[nodiscard]] ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; public: class EmbossReservedDollarVirtualMaxSizeInBytesView final { @@ -12106,9 +11781,9 @@ class GenericReverseRangeConditionView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -12117,13 +11792,13 @@ class GenericReverseRangeConditionView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -12141,9 +11816,9 @@ class GenericReverseRangeConditionView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -12152,13 +11827,13 @@ class GenericReverseRangeConditionView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -12189,7 +11864,7 @@ struct EmbossReservedInternalIsGenericReverseRangeConditionView< }; template -inline GenericReverseRangeConditionView< +[[nodiscard]] inline GenericReverseRangeConditionView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -12204,7 +11879,7 @@ MakeReverseRangeConditionView( T &&emboss_reserved_local_arg) { } template -inline GenericReverseRangeConditionView> +[[nodiscard]] inline GenericReverseRangeConditionView> MakeReverseRangeConditionView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericReverseRangeConditionView>( @@ -12213,7 +11888,7 @@ MakeReverseRangeConditionView( T *emboss_reserved_local_data, } template -inline GenericReverseRangeConditionView< +[[nodiscard]] inline GenericReverseRangeConditionView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedReverseRangeConditionView( T *emboss_reserved_local_data, @@ -12280,71 +11955,54 @@ class GenericAndConditionView final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; + const auto emboss_reserved_local_ok_subexpr_1 = x(); + const auto emboss_reserved_local_ok_subexpr_2 = (emboss_reserved_local_ok_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_ok_subexpr_3 = ::emboss::support::Equal(emboss_reserved_local_ok_subexpr_2, ::emboss::support::Maybe(static_cast(5LL))); + const auto emboss_reserved_local_ok_subexpr_4 = y(); + const auto emboss_reserved_local_ok_subexpr_5 = (emboss_reserved_local_ok_subexpr_4.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_4.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_ok_subexpr_6 = ::emboss::support::Equal(emboss_reserved_local_ok_subexpr_5, ::emboss::support::Maybe(static_cast(5LL))); + const auto emboss_reserved_local_ok_subexpr_7 = ::emboss::support::And(emboss_reserved_local_ok_subexpr_3, emboss_reserved_local_ok_subexpr_6); { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !x().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !y().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::And(::emboss::support::Equal((x().Ok() ? ::emboss::support::Maybe(static_cast(x().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(5LL))), ::emboss::support::Equal((y().Ok() ? ::emboss::support::Maybe(static_cast(y().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(5LL)))); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !xc().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!x().Ok()) return false; + if (!y().Ok()) return false; + if (!IntrinsicSizeInBytes().Ok()) return false; + if (!MaxSizeInBytes().Ok()) return false; + if (!MinSizeInBytes().Ok()) return false; + } } - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = emboss_reserved_local_ok_subexpr_7; + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!xc().Ok()) return false; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - ::std::size_t SizeInBytes() const { + [[nodiscard]] ::std::size_t SizeInBytes() const { return static_cast(IntrinsicSizeInBytes().Read()); } - bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + [[nodiscard]] bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericAndConditionView emboss_reserved_local_other) const { if (!has_x().Known()) return false; @@ -12399,7 +12057,7 @@ class GenericAndConditionView final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericAndConditionView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_x().ValueOr(false) && @@ -12460,7 +12118,7 @@ class GenericAndConditionView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericAndConditionView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -12631,31 +12289,31 @@ class GenericAndConditionView final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> x() const; - ::emboss::support::Maybe has_x() const; + [[nodiscard]] ::emboss::support::Maybe has_x() const; public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> y() const; - ::emboss::support::Maybe has_y() const; + [[nodiscard]] ::emboss::support::Maybe has_y() const; public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> xc() const; - ::emboss::support::Maybe has_xc() const; + [[nodiscard]] ::emboss::support::Maybe has_xc() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -12674,17 +12332,17 @@ class GenericAndConditionView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - ::std::int32_t Read() const { + [[nodiscard]] ::std::int32_t Read() const { EMBOSS_CHECK(view_.has_IntrinsicSizeInBytes().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - ::std::int32_t UncheckedRead() const { + [[nodiscard]] ::std::int32_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - bool Ok() const { + [[nodiscard]] bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -12697,12 +12355,12 @@ class GenericAndConditionView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } private: - ::emboss::support::Maybe MaybeRead() const { + [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.x(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(5LL))); @@ -12716,7 +12374,7 @@ class GenericAndConditionView final { return emboss_reserved_local_subexpr_9; } - static constexpr bool ValueIsOk( + [[nodiscard]] static constexpr bool ValueIsOk( ::std::int32_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -12724,8 +12382,8 @@ class GenericAndConditionView final { const GenericAndConditionView view_; }; - EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; - ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; + [[nodiscard]] EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + [[nodiscard]] ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; public: class EmbossReservedDollarVirtualMaxSizeInBytesView final { @@ -12741,9 +12399,9 @@ class GenericAndConditionView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -12752,13 +12410,13 @@ class GenericAndConditionView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -12776,9 +12434,9 @@ class GenericAndConditionView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -12787,13 +12445,13 @@ class GenericAndConditionView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -12824,7 +12482,7 @@ struct EmbossReservedInternalIsGenericAndConditionView< }; template -inline GenericAndConditionView< +[[nodiscard]] inline GenericAndConditionView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -12839,7 +12497,7 @@ MakeAndConditionView( T &&emboss_reserved_local_arg) { } template -inline GenericAndConditionView> +[[nodiscard]] inline GenericAndConditionView> MakeAndConditionView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericAndConditionView>( @@ -12848,7 +12506,7 @@ MakeAndConditionView( T *emboss_reserved_local_data, } template -inline GenericAndConditionView< +[[nodiscard]] inline GenericAndConditionView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedAndConditionView( T *emboss_reserved_local_data, @@ -12915,71 +12573,54 @@ class GenericOrConditionView final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; + const auto emboss_reserved_local_ok_subexpr_1 = x(); + const auto emboss_reserved_local_ok_subexpr_2 = (emboss_reserved_local_ok_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_ok_subexpr_3 = ::emboss::support::Equal(emboss_reserved_local_ok_subexpr_2, ::emboss::support::Maybe(static_cast(5LL))); + const auto emboss_reserved_local_ok_subexpr_4 = y(); + const auto emboss_reserved_local_ok_subexpr_5 = (emboss_reserved_local_ok_subexpr_4.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_4.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_ok_subexpr_6 = ::emboss::support::Equal(emboss_reserved_local_ok_subexpr_5, ::emboss::support::Maybe(static_cast(5LL))); + const auto emboss_reserved_local_ok_subexpr_7 = ::emboss::support::Or(emboss_reserved_local_ok_subexpr_3, emboss_reserved_local_ok_subexpr_6); { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !x().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !y().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Or(::emboss::support::Equal((x().Ok() ? ::emboss::support::Maybe(static_cast(x().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(5LL))), ::emboss::support::Equal((y().Ok() ? ::emboss::support::Maybe(static_cast(y().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(5LL)))); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !xc().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!x().Ok()) return false; + if (!y().Ok()) return false; + if (!IntrinsicSizeInBytes().Ok()) return false; + if (!MaxSizeInBytes().Ok()) return false; + if (!MinSizeInBytes().Ok()) return false; + } } - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = emboss_reserved_local_ok_subexpr_7; + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!xc().Ok()) return false; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - ::std::size_t SizeInBytes() const { + [[nodiscard]] ::std::size_t SizeInBytes() const { return static_cast(IntrinsicSizeInBytes().Read()); } - bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + [[nodiscard]] bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericOrConditionView emboss_reserved_local_other) const { if (!has_x().Known()) return false; @@ -13034,7 +12675,7 @@ class GenericOrConditionView final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericOrConditionView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_x().ValueOr(false) && @@ -13095,7 +12736,7 @@ class GenericOrConditionView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericOrConditionView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -13266,31 +12907,31 @@ class GenericOrConditionView final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> x() const; - ::emboss::support::Maybe has_x() const; + [[nodiscard]] ::emboss::support::Maybe has_x() const; public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> y() const; - ::emboss::support::Maybe has_y() const; + [[nodiscard]] ::emboss::support::Maybe has_y() const; public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> xc() const; - ::emboss::support::Maybe has_xc() const; + [[nodiscard]] ::emboss::support::Maybe has_xc() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -13309,17 +12950,17 @@ class GenericOrConditionView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - ::std::int32_t Read() const { + [[nodiscard]] ::std::int32_t Read() const { EMBOSS_CHECK(view_.has_IntrinsicSizeInBytes().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - ::std::int32_t UncheckedRead() const { + [[nodiscard]] ::std::int32_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - bool Ok() const { + [[nodiscard]] bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -13332,12 +12973,12 @@ class GenericOrConditionView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } private: - ::emboss::support::Maybe MaybeRead() const { + [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.x(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(5LL))); @@ -13351,7 +12992,7 @@ class GenericOrConditionView final { return emboss_reserved_local_subexpr_9; } - static constexpr bool ValueIsOk( + [[nodiscard]] static constexpr bool ValueIsOk( ::std::int32_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -13359,8 +13000,8 @@ class GenericOrConditionView final { const GenericOrConditionView view_; }; - EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; - ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; + [[nodiscard]] EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + [[nodiscard]] ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; public: class EmbossReservedDollarVirtualMaxSizeInBytesView final { @@ -13376,9 +13017,9 @@ class GenericOrConditionView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -13387,13 +13028,13 @@ class GenericOrConditionView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -13411,9 +13052,9 @@ class GenericOrConditionView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -13422,13 +13063,13 @@ class GenericOrConditionView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -13459,7 +13100,7 @@ struct EmbossReservedInternalIsGenericOrConditionView< }; template -inline GenericOrConditionView< +[[nodiscard]] inline GenericOrConditionView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -13474,7 +13115,7 @@ MakeOrConditionView( T &&emboss_reserved_local_arg) { } template -inline GenericOrConditionView> +[[nodiscard]] inline GenericOrConditionView> MakeOrConditionView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericOrConditionView>( @@ -13483,7 +13124,7 @@ MakeOrConditionView( T *emboss_reserved_local_data, } template -inline GenericOrConditionView< +[[nodiscard]] inline GenericOrConditionView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedOrConditionView( T *emboss_reserved_local_data, @@ -13638,78 +13279,58 @@ class GenericChoiceConditionView final { using Field = ::emboss::test::ChoiceCondition::Field; - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; + const auto emboss_reserved_local_ok_subexpr_1 = field(); + const auto emboss_reserved_local_ok_subexpr_2 = (emboss_reserved_local_ok_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_ok_subexpr_3 = ::emboss::support::Equal(emboss_reserved_local_ok_subexpr_2, ::emboss::support::Maybe(static_cast(1))); + const auto emboss_reserved_local_ok_subexpr_4 = x(); + const auto emboss_reserved_local_ok_subexpr_5 = (emboss_reserved_local_ok_subexpr_4.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_4.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_ok_subexpr_6 = y(); + const auto emboss_reserved_local_ok_subexpr_7 = (emboss_reserved_local_ok_subexpr_6.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_6.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_ok_subexpr_8 = ::emboss::support::Choice(emboss_reserved_local_ok_subexpr_3, emboss_reserved_local_ok_subexpr_5, emboss_reserved_local_ok_subexpr_7); { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !field().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !x().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !y().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Equal(::emboss::support::Choice(::emboss::support::Equal((field().Ok() ? ::emboss::support::Maybe(static_cast(field().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(1))), (x().Ok() ? ::emboss::support::Maybe(static_cast(x().UncheckedRead())) : ::emboss::support::Maybe()), (y().Ok() ? ::emboss::support::Maybe(static_cast(y().UncheckedRead())) : ::emboss::support::Maybe())), ::emboss::support::Maybe(static_cast(5LL))); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !xyc().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!field().Ok()) return false; + if (!x().Ok()) return false; + if (!y().Ok()) return false; + if (!IntrinsicSizeInBytes().Ok()) return false; + if (!MaxSizeInBytes().Ok()) return false; + if (!MinSizeInBytes().Ok()) return false; + } } - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + const auto emboss_reserved_switch_discrim = emboss_reserved_local_ok_subexpr_8; + if (!emboss_reserved_switch_discrim.Known()) return false; + switch (emboss_reserved_switch_discrim.ValueOrDefault()) { + case static_cast(5LL): + if (!xyc().Ok()) return false; + break; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - ::std::size_t SizeInBytes() const { + [[nodiscard]] ::std::size_t SizeInBytes() const { return static_cast(IntrinsicSizeInBytes().Read()); } - bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + [[nodiscard]] bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericChoiceConditionView emboss_reserved_local_other) const { if (!has_field().Known()) return false; @@ -13781,7 +13402,7 @@ class GenericChoiceConditionView final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericChoiceConditionView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_field().ValueOr(false) && @@ -13856,7 +13477,7 @@ class GenericChoiceConditionView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericChoiceConditionView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -14065,40 +13686,40 @@ class GenericChoiceConditionView final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: - typename ::emboss::support::EnumView< + [[nodiscard]] typename ::emboss::support::EnumView< /**/ ::emboss::test::ChoiceCondition::Field, ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> field() const; - ::emboss::support::Maybe has_field() const; + [[nodiscard]] ::emboss::support::Maybe has_field() const; public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> x() const; - ::emboss::support::Maybe has_x() const; + [[nodiscard]] ::emboss::support::Maybe has_x() const; public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> y() const; - ::emboss::support::Maybe has_y() const; + [[nodiscard]] ::emboss::support::Maybe has_y() const; public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> xyc() const; - ::emboss::support::Maybe has_xyc() const; + [[nodiscard]] ::emboss::support::Maybe has_xyc() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -14117,17 +13738,17 @@ class GenericChoiceConditionView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - ::std::int32_t Read() const { + [[nodiscard]] ::std::int32_t Read() const { EMBOSS_CHECK(view_.has_IntrinsicSizeInBytes().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - ::std::int32_t UncheckedRead() const { + [[nodiscard]] ::std::int32_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - bool Ok() const { + [[nodiscard]] bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -14140,12 +13761,12 @@ class GenericChoiceConditionView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } private: - ::emboss::support::Maybe MaybeRead() const { + [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.field(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(1))); @@ -14161,7 +13782,7 @@ class GenericChoiceConditionView final { return emboss_reserved_local_subexpr_11; } - static constexpr bool ValueIsOk( + [[nodiscard]] static constexpr bool ValueIsOk( ::std::int32_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -14169,8 +13790,8 @@ class GenericChoiceConditionView final { const GenericChoiceConditionView view_; }; - EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; - ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; + [[nodiscard]] EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + [[nodiscard]] ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; public: class EmbossReservedDollarVirtualMaxSizeInBytesView final { @@ -14186,9 +13807,9 @@ class GenericChoiceConditionView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -14197,13 +13818,13 @@ class GenericChoiceConditionView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -14221,9 +13842,9 @@ class GenericChoiceConditionView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -14232,13 +13853,13 @@ class GenericChoiceConditionView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -14269,7 +13890,7 @@ struct EmbossReservedInternalIsGenericChoiceConditionView< }; template -inline GenericChoiceConditionView< +[[nodiscard]] inline GenericChoiceConditionView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -14284,7 +13905,7 @@ MakeChoiceConditionView( T &&emboss_reserved_local_arg) { } template -inline GenericChoiceConditionView> +[[nodiscard]] inline GenericChoiceConditionView> MakeChoiceConditionView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericChoiceConditionView>( @@ -14293,7 +13914,7 @@ MakeChoiceConditionView( T *emboss_reserved_local_data, } template -inline GenericChoiceConditionView< +[[nodiscard]] inline GenericChoiceConditionView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedChoiceConditionView( T *emboss_reserved_local_data, @@ -14365,65 +13986,41 @@ class GenericEmbossReservedAnonymousField3View final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !has_top().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !has_bottom().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBits().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBits().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBits().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!has_top().Ok()) return false; + if (!has_bottom().Ok()) return false; + if (!IntrinsicSizeInBits().Ok()) return false; + if (!MaxSizeInBits().Ok()) return false; + if (!MinSizeInBits().Ok()) return false; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBits().Ok() && backing_.SizeInBits() >= static_cast( IntrinsicSizeInBits().UncheckedRead()); } - static constexpr ::std::size_t SizeInBits() { + [[nodiscard]] static constexpr ::std::size_t SizeInBits() { return static_cast(IntrinsicSizeInBits().Read()); } - static constexpr bool SizeIsKnown() { + [[nodiscard]] static constexpr bool SizeIsKnown() { return IntrinsicSizeInBits().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericEmbossReservedAnonymousField3View emboss_reserved_local_other) const { if (!has_has_top().Known()) return false; @@ -14461,7 +14058,7 @@ class GenericEmbossReservedAnonymousField3View final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericEmbossReservedAnonymousField3View emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_has_top().ValueOr(false) && @@ -14508,7 +14105,7 @@ class GenericEmbossReservedAnonymousField3View final { emboss_reserved_local_other.IntrinsicSizeInBits().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericEmbossReservedAnonymousField3View emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -14641,23 +14238,23 @@ class GenericEmbossReservedAnonymousField3View final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, typename Storage::template OffsetStorageType> has_top() const; - ::emboss::support::Maybe has_has_top() const; + [[nodiscard]] ::emboss::support::Maybe has_has_top() const; public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, typename Storage::template OffsetStorageType> has_bottom() const; - ::emboss::support::Maybe has_has_bottom() const; + [[nodiscard]] ::emboss::support::Maybe has_has_bottom() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBitsView final { @@ -14673,9 +14270,9 @@ class GenericEmbossReservedAnonymousField3View final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBitsView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -14684,13 +14281,13 @@ class GenericEmbossReservedAnonymousField3View final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBitsView IntrinsicSizeInBits() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBitsView IntrinsicSizeInBits() { return EmbossReservedDollarVirtualIntrinsicSizeInBitsView(); } - static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBits() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBits() { return ::emboss::support::Maybe(true); } @@ -14708,9 +14305,9 @@ class GenericEmbossReservedAnonymousField3View final { default; ~EmbossReservedDollarVirtualMaxSizeInBitsView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -14719,13 +14316,13 @@ class GenericEmbossReservedAnonymousField3View final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBitsView MaxSizeInBits() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBitsView MaxSizeInBits() { return EmbossReservedDollarVirtualMaxSizeInBitsView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBits() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBits() { return ::emboss::support::Maybe(true); } @@ -14743,9 +14340,9 @@ class GenericEmbossReservedAnonymousField3View final { default; ~EmbossReservedDollarVirtualMinSizeInBitsView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -14754,13 +14351,13 @@ class GenericEmbossReservedAnonymousField3View final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBitsView MinSizeInBits() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBitsView MinSizeInBits() { return EmbossReservedDollarVirtualMinSizeInBitsView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBits() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBits() { return ::emboss::support::Maybe(true); } @@ -14791,7 +14388,7 @@ struct EmbossReservedInternalIsGenericEmbossReservedAnonymousField3View< }; template -inline GenericEmbossReservedAnonymousField3View< +[[nodiscard]] inline GenericEmbossReservedAnonymousField3View< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -14806,7 +14403,7 @@ MakeEmbossReservedAnonymousField3View( T &&emboss_reserved_local_arg) { } template -inline GenericEmbossReservedAnonymousField3View> +[[nodiscard]] inline GenericEmbossReservedAnonymousField3View> MakeEmbossReservedAnonymousField3View( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericEmbossReservedAnonymousField3View>( @@ -14815,7 +14412,7 @@ MakeEmbossReservedAnonymousField3View( T *emboss_reserved_local_data, } template -inline GenericEmbossReservedAnonymousField3View< +[[nodiscard]] inline GenericEmbossReservedAnonymousField3View< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedEmbossReservedAnonymousField3View( T *emboss_reserved_local_data, @@ -14876,73 +14473,49 @@ class GenericContainsBitsView final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; - const auto emboss_reserved_local_ok_subexpr_1 = ::emboss::support::And(::emboss::support::Maybe(true), ::emboss::support::Maybe(true)); - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !emboss_reserved_anonymous_field_3().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = emboss_reserved_local_ok_subexpr_1; - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !has_top().Ok()) return false; - } - + const auto emboss_reserved_local_ok_subexpr_1 = ::emboss::support::And(::emboss::support::Maybe(true), ::emboss::support::Maybe(true)); { - const auto emboss_reserved_local_field_present = emboss_reserved_local_ok_subexpr_1; - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !has_bottom().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!emboss_reserved_anonymous_field_3().Ok()) return false; + if (!IntrinsicSizeInBytes().Ok()) return false; + if (!MaxSizeInBytes().Ok()) return false; + if (!MinSizeInBytes().Ok()) return false; + } } - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = emboss_reserved_local_ok_subexpr_1; + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!has_top().Ok()) return false; + if (!has_bottom().Ok()) return false; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - static constexpr ::std::size_t SizeInBytes() { + [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - static constexpr bool SizeIsKnown() { + [[nodiscard]] static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericContainsBitsView emboss_reserved_local_other) const { if (!has_emboss_reserved_anonymous_field_3().Known()) return false; @@ -14963,7 +14536,7 @@ class GenericContainsBitsView final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericContainsBitsView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_emboss_reserved_anonymous_field_3().ValueOr(false) && @@ -14996,7 +14569,7 @@ class GenericContainsBitsView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericContainsBitsView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -15129,27 +14702,27 @@ class GenericContainsBitsView final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } private: - typename ::emboss::test::ContainsBits::GenericEmbossReservedAnonymousField3View>, 8>> + [[nodiscard]] typename ::emboss::test::ContainsBits::GenericEmbossReservedAnonymousField3View>, 8>> emboss_reserved_anonymous_field_3() const; - ::emboss::support::Maybe has_emboss_reserved_anonymous_field_3() const; + [[nodiscard]] ::emboss::support::Maybe has_emboss_reserved_anonymous_field_3() const; public: - auto has_top() const -> decltype(this->emboss_reserved_anonymous_field_3().has_top()) { + [[nodiscard]] auto has_top() const -> decltype(this->emboss_reserved_anonymous_field_3().has_top()) { return has_has_top().ValueOrDefault() ? emboss_reserved_anonymous_field_3().has_top() : decltype(this->emboss_reserved_anonymous_field_3().has_top())(); } - ::emboss::support::Maybe has_has_top() const; + [[nodiscard]] ::emboss::support::Maybe has_has_top() const; public: - auto has_bottom() const -> decltype(this->emboss_reserved_anonymous_field_3().has_bottom()) { + [[nodiscard]] auto has_bottom() const -> decltype(this->emboss_reserved_anonymous_field_3().has_bottom()) { return has_has_bottom().ValueOrDefault() ? emboss_reserved_anonymous_field_3().has_bottom() : decltype(this->emboss_reserved_anonymous_field_3().has_bottom())(); } - ::emboss::support::Maybe has_has_bottom() const; + [[nodiscard]] ::emboss::support::Maybe has_has_bottom() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -15165,9 +14738,9 @@ class GenericContainsBitsView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -15176,13 +14749,13 @@ class GenericContainsBitsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -15200,9 +14773,9 @@ class GenericContainsBitsView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -15211,13 +14784,13 @@ class GenericContainsBitsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -15235,9 +14808,9 @@ class GenericContainsBitsView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -15246,13 +14819,13 @@ class GenericContainsBitsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -15283,7 +14856,7 @@ struct EmbossReservedInternalIsGenericContainsBitsView< }; template -inline GenericContainsBitsView< +[[nodiscard]] inline GenericContainsBitsView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -15298,7 +14871,7 @@ MakeContainsBitsView( T &&emboss_reserved_local_arg) { } template -inline GenericContainsBitsView> +[[nodiscard]] inline GenericContainsBitsView> MakeContainsBitsView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericContainsBitsView>( @@ -15307,7 +14880,7 @@ MakeContainsBitsView( T *emboss_reserved_local_data, } template -inline GenericContainsBitsView< +[[nodiscard]] inline GenericContainsBitsView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedContainsBitsView( T *emboss_reserved_local_data, @@ -15373,64 +14946,50 @@ class GenericContainsContainsBitsView final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; + const auto emboss_reserved_local_ok_subexpr_1 = condition().has_top(); + const auto emboss_reserved_local_ok_subexpr_2 = (emboss_reserved_local_ok_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !condition().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Equal((condition().has_top().Ok() ? ::emboss::support::Maybe(static_cast(condition().has_top().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(1LL))); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !top().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!condition().Ok()) return false; + if (!IntrinsicSizeInBytes().Ok()) return false; + if (!MaxSizeInBytes().Ok()) return false; + if (!MinSizeInBytes().Ok()) return false; + } } - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + const auto emboss_reserved_switch_discrim = emboss_reserved_local_ok_subexpr_2; + if (!emboss_reserved_switch_discrim.Known()) return false; + switch (emboss_reserved_switch_discrim.ValueOrDefault()) { + case static_cast(1LL): + if (!top().Ok()) return false; + break; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - ::std::size_t SizeInBytes() const { + [[nodiscard]] ::std::size_t SizeInBytes() const { return static_cast(IntrinsicSizeInBytes().Read()); } - bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + [[nodiscard]] bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericContainsContainsBitsView emboss_reserved_local_other) const { if (!has_condition().Known()) return false; @@ -15468,7 +15027,7 @@ class GenericContainsContainsBitsView final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericContainsContainsBitsView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_condition().ValueOr(false) && @@ -15515,7 +15074,7 @@ class GenericContainsContainsBitsView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericContainsContainsBitsView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -15648,21 +15207,21 @@ class GenericContainsContainsBitsView final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: - typename ::emboss::test::GenericContainsBitsView> + [[nodiscard]] typename ::emboss::test::GenericContainsBitsView> condition() const; - ::emboss::support::Maybe has_condition() const; + [[nodiscard]] ::emboss::support::Maybe has_condition() const; public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> top() const; - ::emboss::support::Maybe has_top() const; + [[nodiscard]] ::emboss::support::Maybe has_top() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -15681,17 +15240,17 @@ class GenericContainsContainsBitsView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - ::std::int32_t Read() const { + [[nodiscard]] ::std::int32_t Read() const { EMBOSS_CHECK(view_.has_IntrinsicSizeInBytes().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - ::std::int32_t UncheckedRead() const { + [[nodiscard]] ::std::int32_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - bool Ok() const { + [[nodiscard]] bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -15704,12 +15263,12 @@ class GenericContainsContainsBitsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } private: - ::emboss::support::Maybe MaybeRead() const { + [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.condition().has_top(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(1LL))); @@ -15719,7 +15278,7 @@ class GenericContainsContainsBitsView final { return emboss_reserved_local_subexpr_5; } - static constexpr bool ValueIsOk( + [[nodiscard]] static constexpr bool ValueIsOk( ::std::int32_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -15727,8 +15286,8 @@ class GenericContainsContainsBitsView final { const GenericContainsContainsBitsView view_; }; - EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; - ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; + [[nodiscard]] EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + [[nodiscard]] ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; public: class EmbossReservedDollarVirtualMaxSizeInBytesView final { @@ -15744,9 +15303,9 @@ class GenericContainsContainsBitsView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -15755,13 +15314,13 @@ class GenericContainsContainsBitsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -15779,9 +15338,9 @@ class GenericContainsContainsBitsView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -15790,13 +15349,13 @@ class GenericContainsContainsBitsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -15827,7 +15386,7 @@ struct EmbossReservedInternalIsGenericContainsContainsBitsView< }; template -inline GenericContainsContainsBitsView< +[[nodiscard]] inline GenericContainsContainsBitsView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -15842,7 +15401,7 @@ MakeContainsContainsBitsView( T &&emboss_reserved_local_arg) { } template -inline GenericContainsContainsBitsView> +[[nodiscard]] inline GenericContainsContainsBitsView> MakeContainsContainsBitsView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericContainsContainsBitsView>( @@ -15851,7 +15410,7 @@ MakeContainsContainsBitsView( T *emboss_reserved_local_data, } template -inline GenericContainsContainsBitsView< +[[nodiscard]] inline GenericContainsContainsBitsView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedContainsContainsBitsView( T *emboss_reserved_local_data, @@ -15924,72 +15483,42 @@ class GenericType0View final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !a().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !b().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !c().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!a().Ok()) return false; + if (!b().Ok()) return false; + if (!c().Ok()) return false; + if (!IntrinsicSizeInBytes().Ok()) return false; + if (!MaxSizeInBytes().Ok()) return false; + if (!MinSizeInBytes().Ok()) return false; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - static constexpr ::std::size_t SizeInBytes() { + [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - static constexpr bool SizeIsKnown() { + [[nodiscard]] static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericType0View emboss_reserved_local_other) const { if (!has_a().Known()) return false; @@ -16044,7 +15573,7 @@ class GenericType0View final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericType0View emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_a().ValueOr(false) && @@ -16105,7 +15634,7 @@ class GenericType0View final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericType0View emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -16276,31 +15805,31 @@ class GenericType0View final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> a() const; - ::emboss::support::Maybe has_a() const; + [[nodiscard]] ::emboss::support::Maybe has_a() const; public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> b() const; - ::emboss::support::Maybe has_b() const; + [[nodiscard]] ::emboss::support::Maybe has_b() const; public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> c() const; - ::emboss::support::Maybe has_c() const; + [[nodiscard]] ::emboss::support::Maybe has_c() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -16316,9 +15845,9 @@ class GenericType0View final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -16327,13 +15856,13 @@ class GenericType0View final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -16351,9 +15880,9 @@ class GenericType0View final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -16362,13 +15891,13 @@ class GenericType0View final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -16386,9 +15915,9 @@ class GenericType0View final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -16397,13 +15926,13 @@ class GenericType0View final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -16434,7 +15963,7 @@ struct EmbossReservedInternalIsGenericType0View< }; template -inline GenericType0View< +[[nodiscard]] inline GenericType0View< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -16449,7 +15978,7 @@ MakeType0View( T &&emboss_reserved_local_arg) { } template -inline GenericType0View> +[[nodiscard]] inline GenericType0View> MakeType0View( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericType0View>( @@ -16458,7 +15987,7 @@ MakeType0View( T *emboss_reserved_local_data, } template -inline GenericType0View< +[[nodiscard]] inline GenericType0View< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedType0View( T *emboss_reserved_local_data, @@ -16526,72 +16055,42 @@ class GenericType1View final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !a().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !b().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !c().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!a().Ok()) return false; + if (!b().Ok()) return false; + if (!c().Ok()) return false; + if (!IntrinsicSizeInBytes().Ok()) return false; + if (!MaxSizeInBytes().Ok()) return false; + if (!MinSizeInBytes().Ok()) return false; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - static constexpr ::std::size_t SizeInBytes() { + [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - static constexpr bool SizeIsKnown() { + [[nodiscard]] static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericType1View emboss_reserved_local_other) const { if (!has_a().Known()) return false; @@ -16646,7 +16145,7 @@ class GenericType1View final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericType1View emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_a().ValueOr(false) && @@ -16707,7 +16206,7 @@ class GenericType1View final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericType1View emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -16878,31 +16377,31 @@ class GenericType1View final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> a() const; - ::emboss::support::Maybe has_a() const; + [[nodiscard]] ::emboss::support::Maybe has_a() const; public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> b() const; - ::emboss::support::Maybe has_b() const; + [[nodiscard]] ::emboss::support::Maybe has_b() const; public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> c() const; - ::emboss::support::Maybe has_c() const; + [[nodiscard]] ::emboss::support::Maybe has_c() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -16918,9 +16417,9 @@ class GenericType1View final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -16929,13 +16428,13 @@ class GenericType1View final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -16953,9 +16452,9 @@ class GenericType1View final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -16964,13 +16463,13 @@ class GenericType1View final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -16988,9 +16487,9 @@ class GenericType1View final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -16999,13 +16498,13 @@ class GenericType1View final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -17036,7 +16535,7 @@ struct EmbossReservedInternalIsGenericType1View< }; template -inline GenericType1View< +[[nodiscard]] inline GenericType1View< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -17051,7 +16550,7 @@ MakeType1View( T &&emboss_reserved_local_arg) { } template -inline GenericType1View> +[[nodiscard]] inline GenericType1View> MakeType1View( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericType1View>( @@ -17060,7 +16559,7 @@ MakeType1View( T *emboss_reserved_local_data, } template -inline GenericType1View< +[[nodiscard]] inline GenericType1View< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedType1View( T *emboss_reserved_local_data, @@ -17121,72 +16620,53 @@ class GenericConditionalInlineView final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; - const auto emboss_reserved_local_ok_subexpr_1 = payload_id(); + const auto emboss_reserved_local_ok_subexpr_1 = payload_id(); + const auto emboss_reserved_local_ok_subexpr_2 = (emboss_reserved_local_ok_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !payload_id().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Equal((emboss_reserved_local_ok_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(0LL))); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !type_0().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Equal((emboss_reserved_local_ok_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(1LL))); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !type_1().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!payload_id().Ok()) return false; + if (!IntrinsicSizeInBytes().Ok()) return false; + if (!MaxSizeInBytes().Ok()) return false; + if (!MinSizeInBytes().Ok()) return false; + } } - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + const auto emboss_reserved_switch_discrim = emboss_reserved_local_ok_subexpr_2; + if (!emboss_reserved_switch_discrim.Known()) return false; + switch (emboss_reserved_switch_discrim.ValueOrDefault()) { + case static_cast(0LL): + if (!type_0().Ok()) return false; + break; + case static_cast(1LL): + if (!type_1().Ok()) return false; + break; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - ::std::size_t SizeInBytes() const { + [[nodiscard]] ::std::size_t SizeInBytes() const { return static_cast(IntrinsicSizeInBytes().Read()); } - bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + [[nodiscard]] bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericConditionalInlineView emboss_reserved_local_other) const { if (!has_payload_id().Known()) return false; @@ -17241,7 +16721,7 @@ class GenericConditionalInlineView final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericConditionalInlineView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_payload_id().ValueOr(false) && @@ -17302,7 +16782,7 @@ class GenericConditionalInlineView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericConditionalInlineView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -17473,27 +16953,27 @@ class GenericConditionalInlineView final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> payload_id() const; - ::emboss::support::Maybe has_payload_id() const; + [[nodiscard]] ::emboss::support::Maybe has_payload_id() const; public: - typename ::emboss::test::ConditionalInline::GenericType0View> + [[nodiscard]] typename ::emboss::test::ConditionalInline::GenericType0View> type_0() const; - ::emboss::support::Maybe has_type_0() const; + [[nodiscard]] ::emboss::support::Maybe has_type_0() const; public: - typename ::emboss::test::ConditionalInline::GenericType1View> + [[nodiscard]] typename ::emboss::test::ConditionalInline::GenericType1View> type_1() const; - ::emboss::support::Maybe has_type_1() const; + [[nodiscard]] ::emboss::support::Maybe has_type_1() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -17512,17 +16992,17 @@ class GenericConditionalInlineView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - ::std::int32_t Read() const { + [[nodiscard]] ::std::int32_t Read() const { EMBOSS_CHECK(view_.has_IntrinsicSizeInBytes().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - ::std::int32_t UncheckedRead() const { + [[nodiscard]] ::std::int32_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - bool Ok() const { + [[nodiscard]] bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -17535,12 +17015,12 @@ class GenericConditionalInlineView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } private: - ::emboss::support::Maybe MaybeRead() const { + [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.payload_id(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(0LL))); @@ -17552,7 +17032,7 @@ class GenericConditionalInlineView final { return emboss_reserved_local_subexpr_7; } - static constexpr bool ValueIsOk( + [[nodiscard]] static constexpr bool ValueIsOk( ::std::int32_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -17560,8 +17040,8 @@ class GenericConditionalInlineView final { const GenericConditionalInlineView view_; }; - EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; - ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; + [[nodiscard]] EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + [[nodiscard]] ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; public: class EmbossReservedDollarVirtualMaxSizeInBytesView final { @@ -17577,9 +17057,9 @@ class GenericConditionalInlineView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -17588,13 +17068,13 @@ class GenericConditionalInlineView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -17612,9 +17092,9 @@ class GenericConditionalInlineView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -17623,13 +17103,13 @@ class GenericConditionalInlineView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -17660,7 +17140,7 @@ struct EmbossReservedInternalIsGenericConditionalInlineView< }; template -inline GenericConditionalInlineView< +[[nodiscard]] inline GenericConditionalInlineView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -17675,7 +17155,7 @@ MakeConditionalInlineView( T &&emboss_reserved_local_arg) { } template -inline GenericConditionalInlineView> +[[nodiscard]] inline GenericConditionalInlineView> MakeConditionalInlineView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericConditionalInlineView>( @@ -17684,7 +17164,7 @@ MakeConditionalInlineView( T *emboss_reserved_local_data, } template -inline GenericConditionalInlineView< +[[nodiscard]] inline GenericConditionalInlineView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedConditionalInlineView( T *emboss_reserved_local_data, @@ -17759,72 +17239,52 @@ class GenericEmbossReservedAnonymousField2View final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; + const auto emboss_reserved_local_ok_subexpr_1 = low(); + const auto emboss_reserved_local_ok_subexpr_2 = (emboss_reserved_local_ok_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !low().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Equal((low().Ok() ? ::emboss::support::Maybe(static_cast(low().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(1LL))); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !mid().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !high().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBits().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBits().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!low().Ok()) return false; + if (!high().Ok()) return false; + if (!IntrinsicSizeInBits().Ok()) return false; + if (!MaxSizeInBits().Ok()) return false; + if (!MinSizeInBits().Ok()) return false; + } } - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBits().Ok()) return false; + const auto emboss_reserved_switch_discrim = emboss_reserved_local_ok_subexpr_2; + if (!emboss_reserved_switch_discrim.Known()) return false; + switch (emboss_reserved_switch_discrim.ValueOrDefault()) { + case static_cast(1LL): + if (!mid().Ok()) return false; + break; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBits().Ok() && backing_.SizeInBits() >= static_cast( IntrinsicSizeInBits().UncheckedRead()); } - static constexpr ::std::size_t SizeInBits() { + [[nodiscard]] static constexpr ::std::size_t SizeInBits() { return static_cast(IntrinsicSizeInBits().Read()); } - static constexpr bool SizeIsKnown() { + [[nodiscard]] static constexpr bool SizeIsKnown() { return IntrinsicSizeInBits().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericEmbossReservedAnonymousField2View emboss_reserved_local_other) const { if (!has_low().Known()) return false; @@ -17879,7 +17339,7 @@ class GenericEmbossReservedAnonymousField2View final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericEmbossReservedAnonymousField2View emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_low().ValueOr(false) && @@ -17940,7 +17400,7 @@ class GenericEmbossReservedAnonymousField2View final { emboss_reserved_local_other.IntrinsicSizeInBits().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericEmbossReservedAnonymousField2View emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -18111,31 +17571,31 @@ class GenericEmbossReservedAnonymousField2View final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, typename Storage::template OffsetStorageType> low() const; - ::emboss::support::Maybe has_low() const; + [[nodiscard]] ::emboss::support::Maybe has_low() const; public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<2, ::emboss::support::AllValuesAreOk>, typename Storage::template OffsetStorageType> mid() const; - ::emboss::support::Maybe has_mid() const; + [[nodiscard]] ::emboss::support::Maybe has_mid() const; public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, typename Storage::template OffsetStorageType> high() const; - ::emboss::support::Maybe has_high() const; + [[nodiscard]] ::emboss::support::Maybe has_high() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBitsView final { @@ -18151,9 +17611,9 @@ class GenericEmbossReservedAnonymousField2View final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBitsView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -18162,13 +17622,13 @@ class GenericEmbossReservedAnonymousField2View final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBitsView IntrinsicSizeInBits() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBitsView IntrinsicSizeInBits() { return EmbossReservedDollarVirtualIntrinsicSizeInBitsView(); } - static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBits() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBits() { return ::emboss::support::Maybe(true); } @@ -18186,9 +17646,9 @@ class GenericEmbossReservedAnonymousField2View final { default; ~EmbossReservedDollarVirtualMaxSizeInBitsView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -18197,13 +17657,13 @@ class GenericEmbossReservedAnonymousField2View final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBitsView MaxSizeInBits() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBitsView MaxSizeInBits() { return EmbossReservedDollarVirtualMaxSizeInBitsView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBits() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBits() { return ::emboss::support::Maybe(true); } @@ -18221,9 +17681,9 @@ class GenericEmbossReservedAnonymousField2View final { default; ~EmbossReservedDollarVirtualMinSizeInBitsView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -18232,13 +17692,13 @@ class GenericEmbossReservedAnonymousField2View final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBitsView MinSizeInBits() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBitsView MinSizeInBits() { return EmbossReservedDollarVirtualMinSizeInBitsView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBits() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBits() { return ::emboss::support::Maybe(true); } @@ -18269,7 +17729,7 @@ struct EmbossReservedInternalIsGenericEmbossReservedAnonymousField2View< }; template -inline GenericEmbossReservedAnonymousField2View< +[[nodiscard]] inline GenericEmbossReservedAnonymousField2View< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -18284,7 +17744,7 @@ MakeEmbossReservedAnonymousField2View( T &&emboss_reserved_local_arg) { } template -inline GenericEmbossReservedAnonymousField2View> +[[nodiscard]] inline GenericEmbossReservedAnonymousField2View> MakeEmbossReservedAnonymousField2View( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericEmbossReservedAnonymousField2View>( @@ -18293,7 +17753,7 @@ MakeEmbossReservedAnonymousField2View( T *emboss_reserved_local_data, } template -inline GenericEmbossReservedAnonymousField2View< +[[nodiscard]] inline GenericEmbossReservedAnonymousField2View< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedEmbossReservedAnonymousField2View( T *emboss_reserved_local_data, @@ -18354,86 +17814,68 @@ class GenericConditionalAnonymousView final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; - const auto emboss_reserved_local_ok_subexpr_1 = has_emboss_reserved_anonymous_field_2(); - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !x().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::GreaterThan((x().Ok() ? ::emboss::support::Maybe(static_cast(x().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(10LL))); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !emboss_reserved_anonymous_field_2().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::And(emboss_reserved_local_ok_subexpr_1, ::emboss::support::Maybe(true)); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !low().Ok()) return false; - } - + const auto emboss_reserved_local_ok_subexpr_1 = x(); + const auto emboss_reserved_local_ok_subexpr_2 = (emboss_reserved_local_ok_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_ok_subexpr_3 = ::emboss::support::GreaterThan(emboss_reserved_local_ok_subexpr_2, ::emboss::support::Maybe(static_cast(10LL))); + const auto emboss_reserved_local_ok_subexpr_4 = has_emboss_reserved_anonymous_field_2(); + const auto emboss_reserved_local_ok_subexpr_5 = ::emboss::support::And(emboss_reserved_local_ok_subexpr_4, ::emboss::support::Maybe(true)); + const auto emboss_reserved_local_ok_subexpr_6 = emboss_reserved_anonymous_field_2().has_mid(); + const auto emboss_reserved_local_ok_subexpr_7 = ::emboss::support::And(emboss_reserved_local_ok_subexpr_4, emboss_reserved_local_ok_subexpr_6); { - const auto emboss_reserved_local_field_present = ::emboss::support::And(emboss_reserved_local_ok_subexpr_1, emboss_reserved_anonymous_field_2().has_mid()); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !mid().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::And(emboss_reserved_local_ok_subexpr_1, ::emboss::support::Maybe(true)); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !high().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!x().Ok()) return false; + if (!IntrinsicSizeInBytes().Ok()) return false; + if (!MaxSizeInBytes().Ok()) return false; + if (!MinSizeInBytes().Ok()) return false; + } } - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = emboss_reserved_local_ok_subexpr_3; + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!emboss_reserved_anonymous_field_2().Ok()) return false; + } } - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = emboss_reserved_local_ok_subexpr_5; + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!low().Ok()) return false; + if (!high().Ok()) return false; + } } - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = emboss_reserved_local_ok_subexpr_7; + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!mid().Ok()) return false; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - ::std::size_t SizeInBytes() const { + [[nodiscard]] ::std::size_t SizeInBytes() const { return static_cast(IntrinsicSizeInBytes().Read()); } - bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + [[nodiscard]] bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericConditionalAnonymousView emboss_reserved_local_other) const { if (!has_x().Known()) return false; @@ -18471,7 +17913,7 @@ class GenericConditionalAnonymousView final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericConditionalAnonymousView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_x().ValueOr(false) && @@ -18518,7 +17960,7 @@ class GenericConditionalAnonymousView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericConditionalAnonymousView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -18727,42 +18169,42 @@ class GenericConditionalAnonymousView final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> x() const; - ::emboss::support::Maybe has_x() const; + [[nodiscard]] ::emboss::support::Maybe has_x() const; private: - typename ::emboss::test::ConditionalAnonymous::GenericEmbossReservedAnonymousField2View>, 8>> + [[nodiscard]] typename ::emboss::test::ConditionalAnonymous::GenericEmbossReservedAnonymousField2View>, 8>> emboss_reserved_anonymous_field_2() const; - ::emboss::support::Maybe has_emboss_reserved_anonymous_field_2() const; + [[nodiscard]] ::emboss::support::Maybe has_emboss_reserved_anonymous_field_2() const; public: - auto low() const -> decltype(this->emboss_reserved_anonymous_field_2().low()) { + [[nodiscard]] auto low() const -> decltype(this->emboss_reserved_anonymous_field_2().low()) { return has_low().ValueOrDefault() ? emboss_reserved_anonymous_field_2().low() : decltype(this->emboss_reserved_anonymous_field_2().low())(); } - ::emboss::support::Maybe has_low() const; + [[nodiscard]] ::emboss::support::Maybe has_low() const; public: - auto mid() const -> decltype(this->emboss_reserved_anonymous_field_2().mid()) { + [[nodiscard]] auto mid() const -> decltype(this->emboss_reserved_anonymous_field_2().mid()) { return has_mid().ValueOrDefault() ? emboss_reserved_anonymous_field_2().mid() : decltype(this->emboss_reserved_anonymous_field_2().mid())(); } - ::emboss::support::Maybe has_mid() const; + [[nodiscard]] ::emboss::support::Maybe has_mid() const; public: - auto high() const -> decltype(this->emboss_reserved_anonymous_field_2().high()) { + [[nodiscard]] auto high() const -> decltype(this->emboss_reserved_anonymous_field_2().high()) { return has_high().ValueOrDefault() ? emboss_reserved_anonymous_field_2().high() : decltype(this->emboss_reserved_anonymous_field_2().high())(); } - ::emboss::support::Maybe has_high() const; + [[nodiscard]] ::emboss::support::Maybe has_high() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -18781,17 +18223,17 @@ class GenericConditionalAnonymousView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - ::std::int32_t Read() const { + [[nodiscard]] ::std::int32_t Read() const { EMBOSS_CHECK(view_.has_IntrinsicSizeInBytes().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - ::std::int32_t UncheckedRead() const { + [[nodiscard]] ::std::int32_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - bool Ok() const { + [[nodiscard]] bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -18804,12 +18246,12 @@ class GenericConditionalAnonymousView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } private: - ::emboss::support::Maybe MaybeRead() const { + [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.x(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::GreaterThan(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(10LL))); @@ -18819,7 +18261,7 @@ class GenericConditionalAnonymousView final { return emboss_reserved_local_subexpr_5; } - static constexpr bool ValueIsOk( + [[nodiscard]] static constexpr bool ValueIsOk( ::std::int32_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -18827,8 +18269,8 @@ class GenericConditionalAnonymousView final { const GenericConditionalAnonymousView view_; }; - EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; - ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; + [[nodiscard]] EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + [[nodiscard]] ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; public: class EmbossReservedDollarVirtualMaxSizeInBytesView final { @@ -18844,9 +18286,9 @@ class GenericConditionalAnonymousView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -18855,13 +18297,13 @@ class GenericConditionalAnonymousView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -18879,9 +18321,9 @@ class GenericConditionalAnonymousView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -18890,13 +18332,13 @@ class GenericConditionalAnonymousView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -18927,7 +18369,7 @@ struct EmbossReservedInternalIsGenericConditionalAnonymousView< }; template -inline GenericConditionalAnonymousView< +[[nodiscard]] inline GenericConditionalAnonymousView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -18942,7 +18384,7 @@ MakeConditionalAnonymousView( T &&emboss_reserved_local_arg) { } template -inline GenericConditionalAnonymousView> +[[nodiscard]] inline GenericConditionalAnonymousView> MakeConditionalAnonymousView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericConditionalAnonymousView>( @@ -18951,7 +18393,7 @@ MakeConditionalAnonymousView( T *emboss_reserved_local_data, } template -inline GenericConditionalAnonymousView< +[[nodiscard]] inline GenericConditionalAnonymousView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedConditionalAnonymousView( T *emboss_reserved_local_data, @@ -19022,58 +18464,40 @@ class GenericEmbossReservedAnonymousField1View final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !enabled().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBits().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBits().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBits().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!enabled().Ok()) return false; + if (!IntrinsicSizeInBits().Ok()) return false; + if (!MaxSizeInBits().Ok()) return false; + if (!MinSizeInBits().Ok()) return false; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBits().Ok() && backing_.SizeInBits() >= static_cast( IntrinsicSizeInBits().UncheckedRead()); } - static constexpr ::std::size_t SizeInBits() { + [[nodiscard]] static constexpr ::std::size_t SizeInBits() { return static_cast(IntrinsicSizeInBits().Read()); } - static constexpr bool SizeIsKnown() { + [[nodiscard]] static constexpr bool SizeIsKnown() { return IntrinsicSizeInBits().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericEmbossReservedAnonymousField1View emboss_reserved_local_other) const { if (!has_enabled().Known()) return false; @@ -19094,7 +18518,7 @@ class GenericEmbossReservedAnonymousField1View final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericEmbossReservedAnonymousField1View emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_enabled().ValueOr(false) && @@ -19127,7 +18551,7 @@ class GenericEmbossReservedAnonymousField1View final { emboss_reserved_local_other.IntrinsicSizeInBits().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericEmbossReservedAnonymousField1View emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -19222,15 +18646,15 @@ class GenericEmbossReservedAnonymousField1View final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: - typename ::emboss::prelude::FlagView< + [[nodiscard]] typename ::emboss::prelude::FlagView< /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, typename Storage::template OffsetStorageType> enabled() const; - ::emboss::support::Maybe has_enabled() const; + [[nodiscard]] ::emboss::support::Maybe has_enabled() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBitsView final { @@ -19246,9 +18670,9 @@ class GenericEmbossReservedAnonymousField1View final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBitsView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -19257,13 +18681,13 @@ class GenericEmbossReservedAnonymousField1View final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBitsView IntrinsicSizeInBits() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBitsView IntrinsicSizeInBits() { return EmbossReservedDollarVirtualIntrinsicSizeInBitsView(); } - static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBits() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBits() { return ::emboss::support::Maybe(true); } @@ -19281,9 +18705,9 @@ class GenericEmbossReservedAnonymousField1View final { default; ~EmbossReservedDollarVirtualMaxSizeInBitsView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -19292,13 +18716,13 @@ class GenericEmbossReservedAnonymousField1View final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBitsView MaxSizeInBits() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBitsView MaxSizeInBits() { return EmbossReservedDollarVirtualMaxSizeInBitsView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBits() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBits() { return ::emboss::support::Maybe(true); } @@ -19316,9 +18740,9 @@ class GenericEmbossReservedAnonymousField1View final { default; ~EmbossReservedDollarVirtualMinSizeInBitsView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -19327,13 +18751,13 @@ class GenericEmbossReservedAnonymousField1View final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBitsView MinSizeInBits() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBitsView MinSizeInBits() { return EmbossReservedDollarVirtualMinSizeInBitsView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBits() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBits() { return ::emboss::support::Maybe(true); } @@ -19364,7 +18788,7 @@ struct EmbossReservedInternalIsGenericEmbossReservedAnonymousField1View< }; template -inline GenericEmbossReservedAnonymousField1View< +[[nodiscard]] inline GenericEmbossReservedAnonymousField1View< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -19379,7 +18803,7 @@ MakeEmbossReservedAnonymousField1View( T &&emboss_reserved_local_arg) { } template -inline GenericEmbossReservedAnonymousField1View> +[[nodiscard]] inline GenericEmbossReservedAnonymousField1View> MakeEmbossReservedAnonymousField1View( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericEmbossReservedAnonymousField1View>( @@ -19388,7 +18812,7 @@ MakeEmbossReservedAnonymousField1View( T *emboss_reserved_local_data, } template -inline GenericEmbossReservedAnonymousField1View< +[[nodiscard]] inline GenericEmbossReservedAnonymousField1View< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedEmbossReservedAnonymousField1View( T *emboss_reserved_local_data, @@ -19449,71 +18873,56 @@ class GenericConditionalOnFlagView final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; + const auto emboss_reserved_local_ok_subexpr_1 = ::emboss::support::And(::emboss::support::Maybe(true), ::emboss::support::Maybe(true)); + const auto emboss_reserved_local_ok_subexpr_2 = enabled(); + const auto emboss_reserved_local_ok_subexpr_3 = (emboss_reserved_local_ok_subexpr_2.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_2.UncheckedRead())) : ::emboss::support::Maybe()); { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !emboss_reserved_anonymous_field_1().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::And(::emboss::support::Maybe(true), ::emboss::support::Maybe(true)); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !enabled().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = (enabled().Ok() ? ::emboss::support::Maybe(static_cast(enabled().UncheckedRead())) : ::emboss::support::Maybe()); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !value().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!emboss_reserved_anonymous_field_1().Ok()) return false; + if (!IntrinsicSizeInBytes().Ok()) return false; + if (!MaxSizeInBytes().Ok()) return false; + if (!MinSizeInBytes().Ok()) return false; + } } - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = emboss_reserved_local_ok_subexpr_1; + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!enabled().Ok()) return false; + } } - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = emboss_reserved_local_ok_subexpr_3; + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!value().Ok()) return false; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - ::std::size_t SizeInBytes() const { + [[nodiscard]] ::std::size_t SizeInBytes() const { return static_cast(IntrinsicSizeInBytes().Read()); } - bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + [[nodiscard]] bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericConditionalOnFlagView emboss_reserved_local_other) const { if (!has_emboss_reserved_anonymous_field_1().Known()) return false; @@ -19551,7 +18960,7 @@ class GenericConditionalOnFlagView final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericConditionalOnFlagView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_emboss_reserved_anonymous_field_1().ValueOr(false) && @@ -19598,7 +19007,7 @@ class GenericConditionalOnFlagView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericConditionalOnFlagView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -19731,28 +19140,28 @@ class GenericConditionalOnFlagView final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } private: - typename ::emboss::test::ConditionalOnFlag::GenericEmbossReservedAnonymousField1View>, 8>> + [[nodiscard]] typename ::emboss::test::ConditionalOnFlag::GenericEmbossReservedAnonymousField1View>, 8>> emboss_reserved_anonymous_field_1() const; - ::emboss::support::Maybe has_emboss_reserved_anonymous_field_1() const; + [[nodiscard]] ::emboss::support::Maybe has_emboss_reserved_anonymous_field_1() const; public: - auto enabled() const -> decltype(this->emboss_reserved_anonymous_field_1().enabled()) { + [[nodiscard]] auto enabled() const -> decltype(this->emboss_reserved_anonymous_field_1().enabled()) { return has_enabled().ValueOrDefault() ? emboss_reserved_anonymous_field_1().enabled() : decltype(this->emboss_reserved_anonymous_field_1().enabled())(); } - ::emboss::support::Maybe has_enabled() const; + [[nodiscard]] ::emboss::support::Maybe has_enabled() const; public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> value() const; - ::emboss::support::Maybe has_value() const; + [[nodiscard]] ::emboss::support::Maybe has_value() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -19771,17 +19180,17 @@ class GenericConditionalOnFlagView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - ::std::int32_t Read() const { + [[nodiscard]] ::std::int32_t Read() const { EMBOSS_CHECK(view_.has_IntrinsicSizeInBytes().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - ::std::int32_t UncheckedRead() const { + [[nodiscard]] ::std::int32_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - bool Ok() const { + [[nodiscard]] bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -19794,12 +19203,12 @@ class GenericConditionalOnFlagView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } private: - ::emboss::support::Maybe MaybeRead() const { + [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.enabled(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Choice(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(2LL)), ::emboss::support::Maybe(static_cast(0LL))); @@ -19808,7 +19217,7 @@ class GenericConditionalOnFlagView final { return emboss_reserved_local_subexpr_4; } - static constexpr bool ValueIsOk( + [[nodiscard]] static constexpr bool ValueIsOk( ::std::int32_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -19816,8 +19225,8 @@ class GenericConditionalOnFlagView final { const GenericConditionalOnFlagView view_; }; - EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; - ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; + [[nodiscard]] EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + [[nodiscard]] ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; public: class EmbossReservedDollarVirtualMaxSizeInBytesView final { @@ -19833,9 +19242,9 @@ class GenericConditionalOnFlagView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -19844,13 +19253,13 @@ class GenericConditionalOnFlagView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -19868,9 +19277,9 @@ class GenericConditionalOnFlagView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -19879,13 +19288,13 @@ class GenericConditionalOnFlagView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -19916,7 +19325,7 @@ struct EmbossReservedInternalIsGenericConditionalOnFlagView< }; template -inline GenericConditionalOnFlagView< +[[nodiscard]] inline GenericConditionalOnFlagView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -19931,7 +19340,7 @@ MakeConditionalOnFlagView( T &&emboss_reserved_local_arg) { } template -inline GenericConditionalOnFlagView> +[[nodiscard]] inline GenericConditionalOnFlagView> MakeConditionalOnFlagView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericConditionalOnFlagView>( @@ -19940,7 +19349,7 @@ MakeConditionalOnFlagView( T *emboss_reserved_local_data, } template -inline GenericConditionalOnFlagView< +[[nodiscard]] inline GenericConditionalOnFlagView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedConditionalOnFlagView( T *emboss_reserved_local_data, diff --git a/testdata/golden_cpp/dynamic_size.emb.h b/testdata/golden_cpp/dynamic_size.emb.h index cfbe3b7..41ce2ea 100644 --- a/testdata/golden_cpp/dynamic_size.emb.h +++ b/testdata/golden_cpp/dynamic_size.emb.h @@ -171,85 +171,43 @@ class GenericMessageView final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !header_length().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !message_length().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !padding().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !message().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !crc32().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!header_length().Ok()) return false; + if (!message_length().Ok()) return false; + if (!padding().Ok()) return false; + if (!message().Ok()) return false; + if (!crc32().Ok()) return false; + if (!IntrinsicSizeInBytes().Ok()) return false; + if (!MaxSizeInBytes().Ok()) return false; + if (!MinSizeInBytes().Ok()) return false; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - ::std::size_t SizeInBytes() const { + [[nodiscard]] ::std::size_t SizeInBytes() const { return static_cast(IntrinsicSizeInBytes().Read()); } - bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + [[nodiscard]] bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericMessageView emboss_reserved_local_other) const { if (!has_header_length().Known()) return false; @@ -338,7 +296,7 @@ class GenericMessageView final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericMessageView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_header_length().ValueOr(false) && @@ -427,7 +385,7 @@ class GenericMessageView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericMessageView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -674,26 +632,26 @@ class GenericMessageView final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> header_length() const; - ::emboss::support::Maybe has_header_length() const; + [[nodiscard]] ::emboss::support::Maybe has_header_length() const; public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> message_length() const; - ::emboss::support::Maybe has_message_length() const; + [[nodiscard]] ::emboss::support::Maybe has_message_length() const; public: - typename ::emboss::support::GenericArrayView< + [[nodiscard]] typename ::emboss::support::GenericArrayView< typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock::template OffsetStorageType>, 8>> @@ -702,10 +660,10 @@ class GenericMessageView final { 8 > padding() const; - ::emboss::support::Maybe has_padding() const; + [[nodiscard]] ::emboss::support::Maybe has_padding() const; public: - typename ::emboss::support::GenericArrayView< + [[nodiscard]] typename ::emboss::support::GenericArrayView< typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock::template OffsetStorageType>, 8>> @@ -714,15 +672,15 @@ class GenericMessageView final { 8 > message() const; - ::emboss::support::Maybe has_message() const; + [[nodiscard]] ::emboss::support::Maybe has_message() const; public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 32>> crc32() const; - ::emboss::support::Maybe has_crc32() const; + [[nodiscard]] ::emboss::support::Maybe has_crc32() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -741,17 +699,17 @@ class GenericMessageView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - ::std::int32_t Read() const { + [[nodiscard]] ::std::int32_t Read() const { EMBOSS_CHECK(view_.has_IntrinsicSizeInBytes().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - ::std::int32_t UncheckedRead() const { + [[nodiscard]] ::std::int32_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - bool Ok() const { + [[nodiscard]] bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -764,12 +722,12 @@ class GenericMessageView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } private: - ::emboss::support::Maybe MaybeRead() const { + [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.header_length(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Difference(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(2LL))); @@ -786,7 +744,7 @@ class GenericMessageView final { return emboss_reserved_local_subexpr_12; } - static constexpr bool ValueIsOk( + [[nodiscard]] static constexpr bool ValueIsOk( ::std::int32_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -794,8 +752,8 @@ class GenericMessageView final { const GenericMessageView view_; }; - EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; - ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; + [[nodiscard]] EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + [[nodiscard]] ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; public: class EmbossReservedDollarVirtualMaxSizeInBytesView final { @@ -811,9 +769,9 @@ class GenericMessageView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -822,13 +780,13 @@ class GenericMessageView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -846,9 +804,9 @@ class GenericMessageView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -857,13 +815,13 @@ class GenericMessageView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -894,7 +852,7 @@ struct EmbossReservedInternalIsGenericMessageView< }; template -inline GenericMessageView< +[[nodiscard]] inline GenericMessageView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -909,7 +867,7 @@ MakeMessageView( T &&emboss_reserved_local_arg) { } template -inline GenericMessageView> +[[nodiscard]] inline GenericMessageView> MakeMessageView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericMessageView>( @@ -918,7 +876,7 @@ MakeMessageView( T *emboss_reserved_local_data, } template -inline GenericMessageView< +[[nodiscard]] inline GenericMessageView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedMessageView( T *emboss_reserved_local_data, @@ -984,64 +942,40 @@ class GenericImageView final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !size().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !pixels().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!size().Ok()) return false; + if (!pixels().Ok()) return false; + if (!IntrinsicSizeInBytes().Ok()) return false; + if (!MaxSizeInBytes().Ok()) return false; + if (!MinSizeInBytes().Ok()) return false; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - ::std::size_t SizeInBytes() const { + [[nodiscard]] ::std::size_t SizeInBytes() const { return static_cast(IntrinsicSizeInBytes().Read()); } - bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + [[nodiscard]] bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericImageView emboss_reserved_local_other) const { if (!has_size().Known()) return false; @@ -1079,7 +1013,7 @@ class GenericImageView final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericImageView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_size().ValueOr(false) && @@ -1126,7 +1060,7 @@ class GenericImageView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericImageView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -1259,18 +1193,18 @@ class GenericImageView final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> size() const; - ::emboss::support::Maybe has_size() const; + [[nodiscard]] ::emboss::support::Maybe has_size() const; public: - typename ::emboss::support::GenericArrayView< + [[nodiscard]] typename ::emboss::support::GenericArrayView< typename ::emboss::support::GenericArrayView< typename ::emboss::support::GenericArrayView< typename ::emboss::prelude::UIntView< @@ -1287,7 +1221,7 @@ class GenericImageView final { 8 > pixels() const; - ::emboss::support::Maybe has_pixels() const; + [[nodiscard]] ::emboss::support::Maybe has_pixels() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -1306,17 +1240,17 @@ class GenericImageView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - ::std::int32_t Read() const { + [[nodiscard]] ::std::int32_t Read() const { EMBOSS_CHECK(view_.has_IntrinsicSizeInBytes().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - ::std::int32_t UncheckedRead() const { + [[nodiscard]] ::std::int32_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - bool Ok() const { + [[nodiscard]] bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -1329,12 +1263,12 @@ class GenericImageView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } private: - ::emboss::support::Maybe MaybeRead() const { + [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.size(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Product(::emboss::support::Maybe(static_cast(15LL)), emboss_reserved_local_subexpr_2); @@ -1345,7 +1279,7 @@ class GenericImageView final { return emboss_reserved_local_subexpr_6; } - static constexpr bool ValueIsOk( + [[nodiscard]] static constexpr bool ValueIsOk( ::std::int32_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -1353,8 +1287,8 @@ class GenericImageView final { const GenericImageView view_; }; - EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; - ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; + [[nodiscard]] EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + [[nodiscard]] ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; public: class EmbossReservedDollarVirtualMaxSizeInBytesView final { @@ -1370,9 +1304,9 @@ class GenericImageView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -1381,13 +1315,13 @@ class GenericImageView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -1405,9 +1339,9 @@ class GenericImageView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -1416,13 +1350,13 @@ class GenericImageView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -1453,7 +1387,7 @@ struct EmbossReservedInternalIsGenericImageView< }; template -inline GenericImageView< +[[nodiscard]] inline GenericImageView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -1468,7 +1402,7 @@ MakeImageView( T &&emboss_reserved_local_arg) { } template -inline GenericImageView> +[[nodiscard]] inline GenericImageView> MakeImageView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericImageView>( @@ -1477,7 +1411,7 @@ MakeImageView( T *emboss_reserved_local_data, } template -inline GenericImageView< +[[nodiscard]] inline GenericImageView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedImageView( T *emboss_reserved_local_data, @@ -1547,92 +1481,44 @@ class GenericTwoRegionsView final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !b_end().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !b_start().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !a_size().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !a_start().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !region_a().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !region_b().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!b_end().Ok()) return false; + if (!b_start().Ok()) return false; + if (!a_size().Ok()) return false; + if (!a_start().Ok()) return false; + if (!region_a().Ok()) return false; + if (!region_b().Ok()) return false; + if (!IntrinsicSizeInBytes().Ok()) return false; + if (!MaxSizeInBytes().Ok()) return false; + if (!MinSizeInBytes().Ok()) return false; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - ::std::size_t SizeInBytes() const { + [[nodiscard]] ::std::size_t SizeInBytes() const { return static_cast(IntrinsicSizeInBytes().Read()); } - bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + [[nodiscard]] bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericTwoRegionsView emboss_reserved_local_other) const { if (!has_b_end().Known()) return false; @@ -1738,7 +1624,7 @@ class GenericTwoRegionsView final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericTwoRegionsView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_b_end().ValueOr(false) && @@ -1841,7 +1727,7 @@ class GenericTwoRegionsView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericTwoRegionsView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -2126,42 +2012,42 @@ class GenericTwoRegionsView final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> b_end() const; - ::emboss::support::Maybe has_b_end() const; + [[nodiscard]] ::emboss::support::Maybe has_b_end() const; public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> b_start() const; - ::emboss::support::Maybe has_b_start() const; + [[nodiscard]] ::emboss::support::Maybe has_b_start() const; public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> a_size() const; - ::emboss::support::Maybe has_a_size() const; + [[nodiscard]] ::emboss::support::Maybe has_a_size() const; public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> a_start() const; - ::emboss::support::Maybe has_a_start() const; + [[nodiscard]] ::emboss::support::Maybe has_a_start() const; public: - typename ::emboss::support::GenericArrayView< + [[nodiscard]] typename ::emboss::support::GenericArrayView< typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock::template OffsetStorageType>, 8>> @@ -2170,10 +2056,10 @@ class GenericTwoRegionsView final { 8 > region_a() const; - ::emboss::support::Maybe has_region_a() const; + [[nodiscard]] ::emboss::support::Maybe has_region_a() const; public: - typename ::emboss::support::GenericArrayView< + [[nodiscard]] typename ::emboss::support::GenericArrayView< typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock::template OffsetStorageType>, 8>> @@ -2182,7 +2068,7 @@ class GenericTwoRegionsView final { 8 > region_b() const; - ::emboss::support::Maybe has_region_b() const; + [[nodiscard]] ::emboss::support::Maybe has_region_b() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -2201,17 +2087,17 @@ class GenericTwoRegionsView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - ::std::int32_t Read() const { + [[nodiscard]] ::std::int32_t Read() const { EMBOSS_CHECK(view_.has_IntrinsicSizeInBytes().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - ::std::int32_t UncheckedRead() const { + [[nodiscard]] ::std::int32_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - bool Ok() const { + [[nodiscard]] bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -2224,12 +2110,12 @@ class GenericTwoRegionsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } private: - ::emboss::support::Maybe MaybeRead() const { + [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.a_start(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = view_.a_size(); @@ -2248,7 +2134,7 @@ class GenericTwoRegionsView final { return emboss_reserved_local_subexpr_14; } - static constexpr bool ValueIsOk( + [[nodiscard]] static constexpr bool ValueIsOk( ::std::int32_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -2256,8 +2142,8 @@ class GenericTwoRegionsView final { const GenericTwoRegionsView view_; }; - EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; - ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; + [[nodiscard]] EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + [[nodiscard]] ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; public: class EmbossReservedDollarVirtualMaxSizeInBytesView final { @@ -2273,9 +2159,9 @@ class GenericTwoRegionsView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -2284,13 +2170,13 @@ class GenericTwoRegionsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -2308,9 +2194,9 @@ class GenericTwoRegionsView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -2319,13 +2205,13 @@ class GenericTwoRegionsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -2356,7 +2242,7 @@ struct EmbossReservedInternalIsGenericTwoRegionsView< }; template -inline GenericTwoRegionsView< +[[nodiscard]] inline GenericTwoRegionsView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -2371,7 +2257,7 @@ MakeTwoRegionsView( T &&emboss_reserved_local_arg) { } template -inline GenericTwoRegionsView> +[[nodiscard]] inline GenericTwoRegionsView> MakeTwoRegionsView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericTwoRegionsView>( @@ -2380,7 +2266,7 @@ MakeTwoRegionsView( T *emboss_reserved_local_data, } template -inline GenericTwoRegionsView< +[[nodiscard]] inline GenericTwoRegionsView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedTwoRegionsView( T *emboss_reserved_local_data, @@ -2447,71 +2333,41 @@ class GenericMultipliedSizeView final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !width().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !height().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !data().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!width().Ok()) return false; + if (!height().Ok()) return false; + if (!data().Ok()) return false; + if (!IntrinsicSizeInBytes().Ok()) return false; + if (!MaxSizeInBytes().Ok()) return false; + if (!MinSizeInBytes().Ok()) return false; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - ::std::size_t SizeInBytes() const { + [[nodiscard]] ::std::size_t SizeInBytes() const { return static_cast(IntrinsicSizeInBytes().Read()); } - bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + [[nodiscard]] bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericMultipliedSizeView emboss_reserved_local_other) const { if (!has_width().Known()) return false; @@ -2566,7 +2422,7 @@ class GenericMultipliedSizeView final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericMultipliedSizeView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_width().ValueOr(false) && @@ -2627,7 +2483,7 @@ class GenericMultipliedSizeView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericMultipliedSizeView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -2798,26 +2654,26 @@ class GenericMultipliedSizeView final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> width() const; - ::emboss::support::Maybe has_width() const; + [[nodiscard]] ::emboss::support::Maybe has_width() const; public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> height() const; - ::emboss::support::Maybe has_height() const; + [[nodiscard]] ::emboss::support::Maybe has_height() const; public: - typename ::emboss::support::GenericArrayView< + [[nodiscard]] typename ::emboss::support::GenericArrayView< typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock::template OffsetStorageType>, 8>> @@ -2826,7 +2682,7 @@ class GenericMultipliedSizeView final { 8 > data() const; - ::emboss::support::Maybe has_data() const; + [[nodiscard]] ::emboss::support::Maybe has_data() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -2845,17 +2701,17 @@ class GenericMultipliedSizeView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - ::std::int32_t Read() const { + [[nodiscard]] ::std::int32_t Read() const { EMBOSS_CHECK(view_.has_IntrinsicSizeInBytes().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - ::std::int32_t UncheckedRead() const { + [[nodiscard]] ::std::int32_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - bool Ok() const { + [[nodiscard]] bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -2868,12 +2724,12 @@ class GenericMultipliedSizeView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } private: - ::emboss::support::Maybe MaybeRead() const { + [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.width(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = view_.height(); @@ -2886,7 +2742,7 @@ class GenericMultipliedSizeView final { return emboss_reserved_local_subexpr_8; } - static constexpr bool ValueIsOk( + [[nodiscard]] static constexpr bool ValueIsOk( ::std::int32_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -2894,8 +2750,8 @@ class GenericMultipliedSizeView final { const GenericMultipliedSizeView view_; }; - EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; - ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; + [[nodiscard]] EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + [[nodiscard]] ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; public: class EmbossReservedDollarVirtualMaxSizeInBytesView final { @@ -2911,9 +2767,9 @@ class GenericMultipliedSizeView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -2922,13 +2778,13 @@ class GenericMultipliedSizeView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -2946,9 +2802,9 @@ class GenericMultipliedSizeView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -2957,13 +2813,13 @@ class GenericMultipliedSizeView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -2994,7 +2850,7 @@ struct EmbossReservedInternalIsGenericMultipliedSizeView< }; template -inline GenericMultipliedSizeView< +[[nodiscard]] inline GenericMultipliedSizeView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -3009,7 +2865,7 @@ MakeMultipliedSizeView( T &&emboss_reserved_local_arg) { } template -inline GenericMultipliedSizeView> +[[nodiscard]] inline GenericMultipliedSizeView> MakeMultipliedSizeView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericMultipliedSizeView>( @@ -3018,7 +2874,7 @@ MakeMultipliedSizeView( T *emboss_reserved_local_data, } template -inline GenericMultipliedSizeView< +[[nodiscard]] inline GenericMultipliedSizeView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedMultipliedSizeView( T *emboss_reserved_local_data, @@ -3091,113 +2947,47 @@ class GenericNegativeTermsInSizesView final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !a().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !b().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !c().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !a_minus_b().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !a_minus_2b().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !a_minus_b_minus_c().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !ten_minus_a().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !a_minus_2c().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !a_minus_c().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!a().Ok()) return false; + if (!b().Ok()) return false; + if (!c().Ok()) return false; + if (!a_minus_b().Ok()) return false; + if (!a_minus_2b().Ok()) return false; + if (!a_minus_b_minus_c().Ok()) return false; + if (!ten_minus_a().Ok()) return false; + if (!a_minus_2c().Ok()) return false; + if (!a_minus_c().Ok()) return false; + if (!IntrinsicSizeInBytes().Ok()) return false; + if (!MaxSizeInBytes().Ok()) return false; + if (!MinSizeInBytes().Ok()) return false; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - ::std::size_t SizeInBytes() const { + [[nodiscard]] ::std::size_t SizeInBytes() const { return static_cast(IntrinsicSizeInBytes().Read()); } - bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + [[nodiscard]] bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericNegativeTermsInSizesView emboss_reserved_local_other) const { if (!has_a().Known()) return false; @@ -3354,7 +3144,7 @@ class GenericNegativeTermsInSizesView final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericNegativeTermsInSizesView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_a().ValueOr(false) && @@ -3499,7 +3289,7 @@ class GenericNegativeTermsInSizesView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericNegativeTermsInSizesView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -3898,34 +3688,34 @@ class GenericNegativeTermsInSizesView final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> a() const; - ::emboss::support::Maybe has_a() const; + [[nodiscard]] ::emboss::support::Maybe has_a() const; public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> b() const; - ::emboss::support::Maybe has_b() const; + [[nodiscard]] ::emboss::support::Maybe has_b() const; public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> c() const; - ::emboss::support::Maybe has_c() const; + [[nodiscard]] ::emboss::support::Maybe has_c() const; public: - typename ::emboss::support::GenericArrayView< + [[nodiscard]] typename ::emboss::support::GenericArrayView< typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock::template OffsetStorageType>, 8>> @@ -3934,10 +3724,10 @@ class GenericNegativeTermsInSizesView final { 8 > a_minus_b() const; - ::emboss::support::Maybe has_a_minus_b() const; + [[nodiscard]] ::emboss::support::Maybe has_a_minus_b() const; public: - typename ::emboss::support::GenericArrayView< + [[nodiscard]] typename ::emboss::support::GenericArrayView< typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock::template OffsetStorageType>, 8>> @@ -3946,10 +3736,10 @@ class GenericNegativeTermsInSizesView final { 8 > a_minus_2b() const; - ::emboss::support::Maybe has_a_minus_2b() const; + [[nodiscard]] ::emboss::support::Maybe has_a_minus_2b() const; public: - typename ::emboss::support::GenericArrayView< + [[nodiscard]] typename ::emboss::support::GenericArrayView< typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock::template OffsetStorageType>, 8>> @@ -3958,10 +3748,10 @@ class GenericNegativeTermsInSizesView final { 8 > a_minus_b_minus_c() const; - ::emboss::support::Maybe has_a_minus_b_minus_c() const; + [[nodiscard]] ::emboss::support::Maybe has_a_minus_b_minus_c() const; public: - typename ::emboss::support::GenericArrayView< + [[nodiscard]] typename ::emboss::support::GenericArrayView< typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock::template OffsetStorageType>, 8>> @@ -3970,10 +3760,10 @@ class GenericNegativeTermsInSizesView final { 8 > ten_minus_a() const; - ::emboss::support::Maybe has_ten_minus_a() const; + [[nodiscard]] ::emboss::support::Maybe has_ten_minus_a() const; public: - typename ::emboss::support::GenericArrayView< + [[nodiscard]] typename ::emboss::support::GenericArrayView< typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock::template OffsetStorageType>, 8>> @@ -3982,10 +3772,10 @@ class GenericNegativeTermsInSizesView final { 8 > a_minus_2c() const; - ::emboss::support::Maybe has_a_minus_2c() const; + [[nodiscard]] ::emboss::support::Maybe has_a_minus_2c() const; public: - typename ::emboss::support::GenericArrayView< + [[nodiscard]] typename ::emboss::support::GenericArrayView< typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock::template OffsetStorageType>, 8>> @@ -3994,7 +3784,7 @@ class GenericNegativeTermsInSizesView final { 8 > a_minus_c() const; - ::emboss::support::Maybe has_a_minus_c() const; + [[nodiscard]] ::emboss::support::Maybe has_a_minus_c() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -4013,17 +3803,17 @@ class GenericNegativeTermsInSizesView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - ::std::int32_t Read() const { + [[nodiscard]] ::std::int32_t Read() const { EMBOSS_CHECK(view_.has_IntrinsicSizeInBytes().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - ::std::int32_t UncheckedRead() const { + [[nodiscard]] ::std::int32_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - bool Ok() const { + [[nodiscard]] bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -4036,12 +3826,12 @@ class GenericNegativeTermsInSizesView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } private: - ::emboss::support::Maybe MaybeRead() const { + [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.a(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = view_.b(); @@ -4078,7 +3868,7 @@ class GenericNegativeTermsInSizesView final { return emboss_reserved_local_subexpr_32; } - static constexpr bool ValueIsOk( + [[nodiscard]] static constexpr bool ValueIsOk( ::std::int32_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -4086,8 +3876,8 @@ class GenericNegativeTermsInSizesView final { const GenericNegativeTermsInSizesView view_; }; - EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; - ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; + [[nodiscard]] EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + [[nodiscard]] ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; public: class EmbossReservedDollarVirtualMaxSizeInBytesView final { @@ -4103,9 +3893,9 @@ class GenericNegativeTermsInSizesView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -4114,13 +3904,13 @@ class GenericNegativeTermsInSizesView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -4138,9 +3928,9 @@ class GenericNegativeTermsInSizesView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -4149,13 +3939,13 @@ class GenericNegativeTermsInSizesView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -4186,7 +3976,7 @@ struct EmbossReservedInternalIsGenericNegativeTermsInSizesView< }; template -inline GenericNegativeTermsInSizesView< +[[nodiscard]] inline GenericNegativeTermsInSizesView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -4201,7 +3991,7 @@ MakeNegativeTermsInSizesView( T &&emboss_reserved_local_arg) { } template -inline GenericNegativeTermsInSizesView> +[[nodiscard]] inline GenericNegativeTermsInSizesView> MakeNegativeTermsInSizesView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericNegativeTermsInSizesView>( @@ -4210,7 +4000,7 @@ MakeNegativeTermsInSizesView( T *emboss_reserved_local_data, } template -inline GenericNegativeTermsInSizesView< +[[nodiscard]] inline GenericNegativeTermsInSizesView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedNegativeTermsInSizesView( T *emboss_reserved_local_data, @@ -4276,64 +4066,40 @@ class GenericNegativeTermInLocationView final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !a().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !b().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!a().Ok()) return false; + if (!b().Ok()) return false; + if (!IntrinsicSizeInBytes().Ok()) return false; + if (!MaxSizeInBytes().Ok()) return false; + if (!MinSizeInBytes().Ok()) return false; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - ::std::size_t SizeInBytes() const { + [[nodiscard]] ::std::size_t SizeInBytes() const { return static_cast(IntrinsicSizeInBytes().Read()); } - bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + [[nodiscard]] bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericNegativeTermInLocationView emboss_reserved_local_other) const { if (!has_a().Known()) return false; @@ -4371,7 +4137,7 @@ class GenericNegativeTermInLocationView final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericNegativeTermInLocationView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_a().ValueOr(false) && @@ -4418,7 +4184,7 @@ class GenericNegativeTermInLocationView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericNegativeTermInLocationView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -4551,23 +4317,23 @@ class GenericNegativeTermInLocationView final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> a() const; - ::emboss::support::Maybe has_a() const; + [[nodiscard]] ::emboss::support::Maybe has_a() const; public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> b() const; - ::emboss::support::Maybe has_b() const; + [[nodiscard]] ::emboss::support::Maybe has_b() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -4586,17 +4352,17 @@ class GenericNegativeTermInLocationView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - ::std::int32_t Read() const { + [[nodiscard]] ::std::int32_t Read() const { EMBOSS_CHECK(view_.has_IntrinsicSizeInBytes().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - ::std::int32_t UncheckedRead() const { + [[nodiscard]] ::std::int32_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - bool Ok() const { + [[nodiscard]] bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -4609,12 +4375,12 @@ class GenericNegativeTermInLocationView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } private: - ::emboss::support::Maybe MaybeRead() const { + [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.a(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Difference(::emboss::support::Maybe(static_cast(10LL)), emboss_reserved_local_subexpr_2); @@ -4625,7 +4391,7 @@ class GenericNegativeTermInLocationView final { return emboss_reserved_local_subexpr_6; } - static constexpr bool ValueIsOk( + [[nodiscard]] static constexpr bool ValueIsOk( ::std::int32_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -4633,8 +4399,8 @@ class GenericNegativeTermInLocationView final { const GenericNegativeTermInLocationView view_; }; - EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; - ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; + [[nodiscard]] EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + [[nodiscard]] ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; public: class EmbossReservedDollarVirtualMaxSizeInBytesView final { @@ -4650,9 +4416,9 @@ class GenericNegativeTermInLocationView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -4661,13 +4427,13 @@ class GenericNegativeTermInLocationView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -4685,9 +4451,9 @@ class GenericNegativeTermInLocationView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -4696,13 +4462,13 @@ class GenericNegativeTermInLocationView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -4733,7 +4499,7 @@ struct EmbossReservedInternalIsGenericNegativeTermInLocationView< }; template -inline GenericNegativeTermInLocationView< +[[nodiscard]] inline GenericNegativeTermInLocationView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -4748,7 +4514,7 @@ MakeNegativeTermInLocationView( T &&emboss_reserved_local_arg) { } template -inline GenericNegativeTermInLocationView> +[[nodiscard]] inline GenericNegativeTermInLocationView> MakeNegativeTermInLocationView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericNegativeTermInLocationView>( @@ -4757,7 +4523,7 @@ MakeNegativeTermInLocationView( T *emboss_reserved_local_data, } template -inline GenericNegativeTermInLocationView< +[[nodiscard]] inline GenericNegativeTermInLocationView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedNegativeTermInLocationView( T *emboss_reserved_local_data, @@ -4825,78 +4591,42 @@ class GenericChainedSizeView final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !a().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !b().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !c().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !d().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!a().Ok()) return false; + if (!b().Ok()) return false; + if (!c().Ok()) return false; + if (!d().Ok()) return false; + if (!IntrinsicSizeInBytes().Ok()) return false; + if (!MaxSizeInBytes().Ok()) return false; + if (!MinSizeInBytes().Ok()) return false; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - ::std::size_t SizeInBytes() const { + [[nodiscard]] ::std::size_t SizeInBytes() const { return static_cast(IntrinsicSizeInBytes().Read()); } - bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + [[nodiscard]] bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericChainedSizeView emboss_reserved_local_other) const { if (!has_a().Known()) return false; @@ -4968,7 +4698,7 @@ class GenericChainedSizeView final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericChainedSizeView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_a().ValueOr(false) && @@ -5043,7 +4773,7 @@ class GenericChainedSizeView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericChainedSizeView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -5252,39 +4982,39 @@ class GenericChainedSizeView final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> a() const; - ::emboss::support::Maybe has_a() const; + [[nodiscard]] ::emboss::support::Maybe has_a() const; public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> b() const; - ::emboss::support::Maybe has_b() const; + [[nodiscard]] ::emboss::support::Maybe has_b() const; public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> c() const; - ::emboss::support::Maybe has_c() const; + [[nodiscard]] ::emboss::support::Maybe has_c() const; public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> d() const; - ::emboss::support::Maybe has_d() const; + [[nodiscard]] ::emboss::support::Maybe has_d() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -5303,17 +5033,17 @@ class GenericChainedSizeView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - ::std::int32_t Read() const { + [[nodiscard]] ::std::int32_t Read() const { EMBOSS_CHECK(view_.has_IntrinsicSizeInBytes().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - ::std::int32_t UncheckedRead() const { + [[nodiscard]] ::std::int32_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - bool Ok() const { + [[nodiscard]] bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -5326,12 +5056,12 @@ class GenericChainedSizeView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } private: - ::emboss::support::Maybe MaybeRead() const { + [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.a(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Sum(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(1LL))); @@ -5349,7 +5079,7 @@ class GenericChainedSizeView final { return emboss_reserved_local_subexpr_13; } - static constexpr bool ValueIsOk( + [[nodiscard]] static constexpr bool ValueIsOk( ::std::int32_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -5357,8 +5087,8 @@ class GenericChainedSizeView final { const GenericChainedSizeView view_; }; - EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; - ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; + [[nodiscard]] EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + [[nodiscard]] ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; public: class EmbossReservedDollarVirtualMaxSizeInBytesView final { @@ -5374,9 +5104,9 @@ class GenericChainedSizeView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -5385,13 +5115,13 @@ class GenericChainedSizeView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -5409,9 +5139,9 @@ class GenericChainedSizeView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -5420,13 +5150,13 @@ class GenericChainedSizeView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -5457,7 +5187,7 @@ struct EmbossReservedInternalIsGenericChainedSizeView< }; template -inline GenericChainedSizeView< +[[nodiscard]] inline GenericChainedSizeView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -5472,7 +5202,7 @@ MakeChainedSizeView( T &&emboss_reserved_local_arg) { } template -inline GenericChainedSizeView> +[[nodiscard]] inline GenericChainedSizeView> MakeChainedSizeView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericChainedSizeView>( @@ -5481,7 +5211,7 @@ MakeChainedSizeView( T *emboss_reserved_local_data, } template -inline GenericChainedSizeView< +[[nodiscard]] inline GenericChainedSizeView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedChainedSizeView( T *emboss_reserved_local_data, @@ -5548,72 +5278,42 @@ class GenericFinalFieldOverlapsView final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !a().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !b().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !c().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!a().Ok()) return false; + if (!b().Ok()) return false; + if (!c().Ok()) return false; + if (!IntrinsicSizeInBytes().Ok()) return false; + if (!MaxSizeInBytes().Ok()) return false; + if (!MinSizeInBytes().Ok()) return false; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - static constexpr ::std::size_t SizeInBytes() { + [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - static constexpr bool SizeIsKnown() { + [[nodiscard]] static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericFinalFieldOverlapsView emboss_reserved_local_other) const { if (!has_a().Known()) return false; @@ -5668,7 +5368,7 @@ class GenericFinalFieldOverlapsView final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericFinalFieldOverlapsView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_a().ValueOr(false) && @@ -5729,7 +5429,7 @@ class GenericFinalFieldOverlapsView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericFinalFieldOverlapsView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -5900,31 +5600,31 @@ class GenericFinalFieldOverlapsView final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> a() const; - ::emboss::support::Maybe has_a() const; + [[nodiscard]] ::emboss::support::Maybe has_a() const; public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 32>> b() const; - ::emboss::support::Maybe has_b() const; + [[nodiscard]] ::emboss::support::Maybe has_b() const; public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<16, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 16>> c() const; - ::emboss::support::Maybe has_c() const; + [[nodiscard]] ::emboss::support::Maybe has_c() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -5940,9 +5640,9 @@ class GenericFinalFieldOverlapsView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -5951,13 +5651,13 @@ class GenericFinalFieldOverlapsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -5975,9 +5675,9 @@ class GenericFinalFieldOverlapsView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -5986,13 +5686,13 @@ class GenericFinalFieldOverlapsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -6010,9 +5710,9 @@ class GenericFinalFieldOverlapsView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -6021,13 +5721,13 @@ class GenericFinalFieldOverlapsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -6058,7 +5758,7 @@ struct EmbossReservedInternalIsGenericFinalFieldOverlapsView< }; template -inline GenericFinalFieldOverlapsView< +[[nodiscard]] inline GenericFinalFieldOverlapsView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -6073,7 +5773,7 @@ MakeFinalFieldOverlapsView( T &&emboss_reserved_local_arg) { } template -inline GenericFinalFieldOverlapsView> +[[nodiscard]] inline GenericFinalFieldOverlapsView> MakeFinalFieldOverlapsView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericFinalFieldOverlapsView>( @@ -6082,7 +5782,7 @@ MakeFinalFieldOverlapsView( T *emboss_reserved_local_data, } template -inline GenericFinalFieldOverlapsView< +[[nodiscard]] inline GenericFinalFieldOverlapsView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedFinalFieldOverlapsView( T *emboss_reserved_local_data, @@ -6150,78 +5850,42 @@ class GenericDynamicFinalFieldOverlapsView final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !a().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !b().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !c().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !d().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!a().Ok()) return false; + if (!b().Ok()) return false; + if (!c().Ok()) return false; + if (!d().Ok()) return false; + if (!IntrinsicSizeInBytes().Ok()) return false; + if (!MaxSizeInBytes().Ok()) return false; + if (!MinSizeInBytes().Ok()) return false; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - ::std::size_t SizeInBytes() const { + [[nodiscard]] ::std::size_t SizeInBytes() const { return static_cast(IntrinsicSizeInBytes().Read()); } - bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + [[nodiscard]] bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericDynamicFinalFieldOverlapsView emboss_reserved_local_other) const { if (!has_a().Known()) return false; @@ -6293,7 +5957,7 @@ class GenericDynamicFinalFieldOverlapsView final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericDynamicFinalFieldOverlapsView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_a().ValueOr(false) && @@ -6368,7 +6032,7 @@ class GenericDynamicFinalFieldOverlapsView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericDynamicFinalFieldOverlapsView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -6577,39 +6241,39 @@ class GenericDynamicFinalFieldOverlapsView final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> a() const; - ::emboss::support::Maybe has_a() const; + [[nodiscard]] ::emboss::support::Maybe has_a() const; public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> b() const; - ::emboss::support::Maybe has_b() const; + [[nodiscard]] ::emboss::support::Maybe has_b() const; public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<16, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 16>> c() const; - ::emboss::support::Maybe has_c() const; + [[nodiscard]] ::emboss::support::Maybe has_c() const; public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> d() const; - ::emboss::support::Maybe has_d() const; + [[nodiscard]] ::emboss::support::Maybe has_d() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -6628,17 +6292,17 @@ class GenericDynamicFinalFieldOverlapsView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - ::std::int32_t Read() const { + [[nodiscard]] ::std::int32_t Read() const { EMBOSS_CHECK(view_.has_IntrinsicSizeInBytes().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - ::std::int32_t UncheckedRead() const { + [[nodiscard]] ::std::int32_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - bool Ok() const { + [[nodiscard]] bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -6651,12 +6315,12 @@ class GenericDynamicFinalFieldOverlapsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } private: - ::emboss::support::Maybe MaybeRead() const { + [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.a(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Sum(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(2LL))); @@ -6669,7 +6333,7 @@ class GenericDynamicFinalFieldOverlapsView final { return emboss_reserved_local_subexpr_8; } - static constexpr bool ValueIsOk( + [[nodiscard]] static constexpr bool ValueIsOk( ::std::int32_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -6677,8 +6341,8 @@ class GenericDynamicFinalFieldOverlapsView final { const GenericDynamicFinalFieldOverlapsView view_; }; - EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; - ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; + [[nodiscard]] EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + [[nodiscard]] ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; public: class EmbossReservedDollarVirtualMaxSizeInBytesView final { @@ -6694,9 +6358,9 @@ class GenericDynamicFinalFieldOverlapsView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -6705,13 +6369,13 @@ class GenericDynamicFinalFieldOverlapsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -6729,9 +6393,9 @@ class GenericDynamicFinalFieldOverlapsView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -6740,13 +6404,13 @@ class GenericDynamicFinalFieldOverlapsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -6777,7 +6441,7 @@ struct EmbossReservedInternalIsGenericDynamicFinalFieldOverlapsView< }; template -inline GenericDynamicFinalFieldOverlapsView< +[[nodiscard]] inline GenericDynamicFinalFieldOverlapsView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -6792,7 +6456,7 @@ MakeDynamicFinalFieldOverlapsView( T &&emboss_reserved_local_arg) { } template -inline GenericDynamicFinalFieldOverlapsView> +[[nodiscard]] inline GenericDynamicFinalFieldOverlapsView> MakeDynamicFinalFieldOverlapsView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericDynamicFinalFieldOverlapsView>( @@ -6801,7 +6465,7 @@ MakeDynamicFinalFieldOverlapsView( T *emboss_reserved_local_data, } template -inline GenericDynamicFinalFieldOverlapsView< +[[nodiscard]] inline GenericDynamicFinalFieldOverlapsView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedDynamicFinalFieldOverlapsView( T *emboss_reserved_local_data, @@ -6867,64 +6531,40 @@ class GenericDynamicFieldDependsOnLaterFieldView final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !a().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !b().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!a().Ok()) return false; + if (!b().Ok()) return false; + if (!IntrinsicSizeInBytes().Ok()) return false; + if (!MaxSizeInBytes().Ok()) return false; + if (!MinSizeInBytes().Ok()) return false; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - ::std::size_t SizeInBytes() const { + [[nodiscard]] ::std::size_t SizeInBytes() const { return static_cast(IntrinsicSizeInBytes().Read()); } - bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + [[nodiscard]] bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericDynamicFieldDependsOnLaterFieldView emboss_reserved_local_other) const { if (!has_a().Known()) return false; @@ -6962,7 +6602,7 @@ class GenericDynamicFieldDependsOnLaterFieldView final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericDynamicFieldDependsOnLaterFieldView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_a().ValueOr(false) && @@ -7009,7 +6649,7 @@ class GenericDynamicFieldDependsOnLaterFieldView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericDynamicFieldDependsOnLaterFieldView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -7142,23 +6782,23 @@ class GenericDynamicFieldDependsOnLaterFieldView final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> a() const; - ::emboss::support::Maybe has_a() const; + [[nodiscard]] ::emboss::support::Maybe has_a() const; public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> b() const; - ::emboss::support::Maybe has_b() const; + [[nodiscard]] ::emboss::support::Maybe has_b() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -7177,17 +6817,17 @@ class GenericDynamicFieldDependsOnLaterFieldView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - ::std::int32_t Read() const { + [[nodiscard]] ::std::int32_t Read() const { EMBOSS_CHECK(view_.has_IntrinsicSizeInBytes().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - ::std::int32_t UncheckedRead() const { + [[nodiscard]] ::std::int32_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - bool Ok() const { + [[nodiscard]] bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -7200,12 +6840,12 @@ class GenericDynamicFieldDependsOnLaterFieldView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } private: - ::emboss::support::Maybe MaybeRead() const { + [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.a(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Sum(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(1LL))); @@ -7216,7 +6856,7 @@ class GenericDynamicFieldDependsOnLaterFieldView final { return emboss_reserved_local_subexpr_6; } - static constexpr bool ValueIsOk( + [[nodiscard]] static constexpr bool ValueIsOk( ::std::int32_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -7224,8 +6864,8 @@ class GenericDynamicFieldDependsOnLaterFieldView final { const GenericDynamicFieldDependsOnLaterFieldView view_; }; - EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; - ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; + [[nodiscard]] EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + [[nodiscard]] ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; public: class EmbossReservedDollarVirtualMaxSizeInBytesView final { @@ -7241,9 +6881,9 @@ class GenericDynamicFieldDependsOnLaterFieldView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -7252,13 +6892,13 @@ class GenericDynamicFieldDependsOnLaterFieldView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -7276,9 +6916,9 @@ class GenericDynamicFieldDependsOnLaterFieldView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -7287,13 +6927,13 @@ class GenericDynamicFieldDependsOnLaterFieldView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -7324,7 +6964,7 @@ struct EmbossReservedInternalIsGenericDynamicFieldDependsOnLaterFieldView< }; template -inline GenericDynamicFieldDependsOnLaterFieldView< +[[nodiscard]] inline GenericDynamicFieldDependsOnLaterFieldView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -7339,7 +6979,7 @@ MakeDynamicFieldDependsOnLaterFieldView( T &&emboss_reserved_local_arg) { } template -inline GenericDynamicFieldDependsOnLaterFieldView> +[[nodiscard]] inline GenericDynamicFieldDependsOnLaterFieldView> MakeDynamicFieldDependsOnLaterFieldView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericDynamicFieldDependsOnLaterFieldView>( @@ -7348,7 +6988,7 @@ MakeDynamicFieldDependsOnLaterFieldView( T *emboss_reserved_local_data, } template -inline GenericDynamicFieldDependsOnLaterFieldView< +[[nodiscard]] inline GenericDynamicFieldDependsOnLaterFieldView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedDynamicFieldDependsOnLaterFieldView( T *emboss_reserved_local_data, @@ -7415,72 +7055,42 @@ class GenericDynamicFieldDoesNotAffectSizeView final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !a().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !b().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !c().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!a().Ok()) return false; + if (!b().Ok()) return false; + if (!c().Ok()) return false; + if (!IntrinsicSizeInBytes().Ok()) return false; + if (!MaxSizeInBytes().Ok()) return false; + if (!MinSizeInBytes().Ok()) return false; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - static constexpr ::std::size_t SizeInBytes() { + [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - static constexpr bool SizeIsKnown() { + [[nodiscard]] static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericDynamicFieldDoesNotAffectSizeView emboss_reserved_local_other) const { if (!has_a().Known()) return false; @@ -7535,7 +7145,7 @@ class GenericDynamicFieldDoesNotAffectSizeView final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericDynamicFieldDoesNotAffectSizeView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_a().ValueOr(false) && @@ -7596,7 +7206,7 @@ class GenericDynamicFieldDoesNotAffectSizeView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericDynamicFieldDoesNotAffectSizeView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -7767,31 +7377,31 @@ class GenericDynamicFieldDoesNotAffectSizeView final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> a() const; - ::emboss::support::Maybe has_a() const; + [[nodiscard]] ::emboss::support::Maybe has_a() const; public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> b() const; - ::emboss::support::Maybe has_b() const; + [[nodiscard]] ::emboss::support::Maybe has_b() const; public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> c() const; - ::emboss::support::Maybe has_c() const; + [[nodiscard]] ::emboss::support::Maybe has_c() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -7807,9 +7417,9 @@ class GenericDynamicFieldDoesNotAffectSizeView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -7818,13 +7428,13 @@ class GenericDynamicFieldDoesNotAffectSizeView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -7842,9 +7452,9 @@ class GenericDynamicFieldDoesNotAffectSizeView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -7853,13 +7463,13 @@ class GenericDynamicFieldDoesNotAffectSizeView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -7877,9 +7487,9 @@ class GenericDynamicFieldDoesNotAffectSizeView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -7888,13 +7498,13 @@ class GenericDynamicFieldDoesNotAffectSizeView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -7925,7 +7535,7 @@ struct EmbossReservedInternalIsGenericDynamicFieldDoesNotAffectSizeView< }; template -inline GenericDynamicFieldDoesNotAffectSizeView< +[[nodiscard]] inline GenericDynamicFieldDoesNotAffectSizeView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -7940,7 +7550,7 @@ MakeDynamicFieldDoesNotAffectSizeView( T &&emboss_reserved_local_arg) { } template -inline GenericDynamicFieldDoesNotAffectSizeView> +[[nodiscard]] inline GenericDynamicFieldDoesNotAffectSizeView> MakeDynamicFieldDoesNotAffectSizeView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericDynamicFieldDoesNotAffectSizeView>( @@ -7949,7 +7559,7 @@ MakeDynamicFieldDoesNotAffectSizeView( T *emboss_reserved_local_data, } template -inline GenericDynamicFieldDoesNotAffectSizeView< +[[nodiscard]] inline GenericDynamicFieldDoesNotAffectSizeView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedDynamicFieldDoesNotAffectSizeView( T *emboss_reserved_local_data, diff --git a/testdata/golden_cpp/enum.emb.h b/testdata/golden_cpp/enum.emb.h index 1d03fb6..ddd45bf 100644 --- a/testdata/golden_cpp/enum.emb.h +++ b/testdata/golden_cpp/enum.emb.h @@ -136,70 +136,46 @@ class GenericConstantsView final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !sprocket().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !geegaw().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!sprocket().Ok()) return false; + if (!geegaw().Ok()) return false; + if (!IntrinsicSizeInBytes().Ok()) return false; + if (!MaxSizeInBytes().Ok()) return false; + if (!MinSizeInBytes().Ok()) return false; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - static constexpr ::std::size_t SizeInBytes() { + [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - static constexpr bool SizeIsKnown() { + [[nodiscard]] static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericConstantsView emboss_reserved_local_other) const { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericConstantsView emboss_reserved_local_other) const { return true; } @@ -219,7 +195,7 @@ class GenericConstantsView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericConstantsView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -315,7 +291,7 @@ class GenericConstantsView final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: class EmbossReservedVirtualSprocketView final { @@ -331,9 +307,9 @@ class GenericConstantsView final { default; ~EmbossReservedVirtualSprocketView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -342,13 +318,13 @@ class GenericConstantsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedVirtualSprocketView sprocket() { + [[nodiscard]] static constexpr EmbossReservedVirtualSprocketView sprocket() { return EmbossReservedVirtualSprocketView(); } - static constexpr ::emboss::support::Maybe has_sprocket() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_sprocket() { return ::emboss::support::Maybe(true); } @@ -366,9 +342,9 @@ class GenericConstantsView final { default; ~EmbossReservedVirtualGeegawView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -377,13 +353,13 @@ class GenericConstantsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedVirtualGeegawView geegaw() { + [[nodiscard]] static constexpr EmbossReservedVirtualGeegawView geegaw() { return EmbossReservedVirtualGeegawView(); } - static constexpr ::emboss::support::Maybe has_geegaw() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_geegaw() { return ::emboss::support::Maybe(true); } @@ -401,9 +377,9 @@ class GenericConstantsView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -412,13 +388,13 @@ class GenericConstantsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -436,9 +412,9 @@ class GenericConstantsView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -447,13 +423,13 @@ class GenericConstantsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -471,9 +447,9 @@ class GenericConstantsView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -482,13 +458,13 @@ class GenericConstantsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -519,7 +495,7 @@ struct EmbossReservedInternalIsGenericConstantsView< }; template -inline GenericConstantsView< +[[nodiscard]] inline GenericConstantsView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -534,7 +510,7 @@ MakeConstantsView( T &&emboss_reserved_local_arg) { } template -inline GenericConstantsView> +[[nodiscard]] inline GenericConstantsView> MakeConstantsView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericConstantsView>( @@ -543,7 +519,7 @@ MakeConstantsView( T *emboss_reserved_local_data, } template -inline GenericConstantsView< +[[nodiscard]] inline GenericConstantsView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedConstantsView( T *emboss_reserved_local_data, @@ -1559,58 +1535,40 @@ class GenericEmbossReservedAnonymousField1View final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !wide_kind_in_bits().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBits().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBits().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBits().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!wide_kind_in_bits().Ok()) return false; + if (!IntrinsicSizeInBits().Ok()) return false; + if (!MaxSizeInBits().Ok()) return false; + if (!MinSizeInBits().Ok()) return false; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBits().Ok() && backing_.SizeInBits() >= static_cast( IntrinsicSizeInBits().UncheckedRead()); } - static constexpr ::std::size_t SizeInBits() { + [[nodiscard]] static constexpr ::std::size_t SizeInBits() { return static_cast(IntrinsicSizeInBits().Read()); } - static constexpr bool SizeIsKnown() { + [[nodiscard]] static constexpr bool SizeIsKnown() { return IntrinsicSizeInBits().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericEmbossReservedAnonymousField1View emboss_reserved_local_other) const { if (!has_wide_kind_in_bits().Known()) return false; @@ -1631,7 +1589,7 @@ class GenericEmbossReservedAnonymousField1View final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericEmbossReservedAnonymousField1View emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_wide_kind_in_bits().ValueOr(false) && @@ -1664,7 +1622,7 @@ class GenericEmbossReservedAnonymousField1View final { emboss_reserved_local_other.IntrinsicSizeInBits().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericEmbossReservedAnonymousField1View emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -1759,16 +1717,16 @@ class GenericEmbossReservedAnonymousField1View final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: - typename ::emboss::support::EnumView< + [[nodiscard]] typename ::emboss::support::EnumView< /**/ ::emboss::test::Kind, ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, typename Storage::template OffsetStorageType> wide_kind_in_bits() const; - ::emboss::support::Maybe has_wide_kind_in_bits() const; + [[nodiscard]] ::emboss::support::Maybe has_wide_kind_in_bits() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBitsView final { @@ -1784,9 +1742,9 @@ class GenericEmbossReservedAnonymousField1View final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBitsView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -1795,13 +1753,13 @@ class GenericEmbossReservedAnonymousField1View final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBitsView IntrinsicSizeInBits() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBitsView IntrinsicSizeInBits() { return EmbossReservedDollarVirtualIntrinsicSizeInBitsView(); } - static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBits() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBits() { return ::emboss::support::Maybe(true); } @@ -1819,9 +1777,9 @@ class GenericEmbossReservedAnonymousField1View final { default; ~EmbossReservedDollarVirtualMaxSizeInBitsView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -1830,13 +1788,13 @@ class GenericEmbossReservedAnonymousField1View final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBitsView MaxSizeInBits() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBitsView MaxSizeInBits() { return EmbossReservedDollarVirtualMaxSizeInBitsView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBits() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBits() { return ::emboss::support::Maybe(true); } @@ -1854,9 +1812,9 @@ class GenericEmbossReservedAnonymousField1View final { default; ~EmbossReservedDollarVirtualMinSizeInBitsView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -1865,13 +1823,13 @@ class GenericEmbossReservedAnonymousField1View final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBitsView MinSizeInBits() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBitsView MinSizeInBits() { return EmbossReservedDollarVirtualMinSizeInBitsView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBits() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBits() { return ::emboss::support::Maybe(true); } @@ -1902,7 +1860,7 @@ struct EmbossReservedInternalIsGenericEmbossReservedAnonymousField1View< }; template -inline GenericEmbossReservedAnonymousField1View< +[[nodiscard]] inline GenericEmbossReservedAnonymousField1View< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -1917,7 +1875,7 @@ MakeEmbossReservedAnonymousField1View( T &&emboss_reserved_local_arg) { } template -inline GenericEmbossReservedAnonymousField1View> +[[nodiscard]] inline GenericEmbossReservedAnonymousField1View> MakeEmbossReservedAnonymousField1View( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericEmbossReservedAnonymousField1View>( @@ -1926,7 +1884,7 @@ MakeEmbossReservedAnonymousField1View( T *emboss_reserved_local_data, } template -inline GenericEmbossReservedAnonymousField1View< +[[nodiscard]] inline GenericEmbossReservedAnonymousField1View< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedEmbossReservedAnonymousField1View( T *emboss_reserved_local_data, @@ -1987,86 +1945,51 @@ class GenericManifestEntryView final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; + const auto emboss_reserved_local_ok_subexpr_1 = ::emboss::support::And(::emboss::support::Maybe(true), ::emboss::support::Maybe(true)); { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !kind().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !count().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !wide_kind().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !emboss_reserved_anonymous_field_1().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::And(::emboss::support::Maybe(true), ::emboss::support::Maybe(true)); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !wide_kind_in_bits().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!kind().Ok()) return false; + if (!count().Ok()) return false; + if (!wide_kind().Ok()) return false; + if (!emboss_reserved_anonymous_field_1().Ok()) return false; + if (!IntrinsicSizeInBytes().Ok()) return false; + if (!MaxSizeInBytes().Ok()) return false; + if (!MinSizeInBytes().Ok()) return false; + } } - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = emboss_reserved_local_ok_subexpr_1; + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!wide_kind_in_bits().Ok()) return false; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - static constexpr ::std::size_t SizeInBytes() { + [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - static constexpr bool SizeIsKnown() { + [[nodiscard]] static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericManifestEntryView emboss_reserved_local_other) const { if (!has_kind().Known()) return false; @@ -2138,7 +2061,7 @@ class GenericManifestEntryView final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericManifestEntryView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_kind().ValueOr(false) && @@ -2213,7 +2136,7 @@ class GenericManifestEntryView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericManifestEntryView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -2422,46 +2345,46 @@ class GenericManifestEntryView final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: - typename ::emboss::support::EnumView< + [[nodiscard]] typename ::emboss::support::EnumView< /**/ ::emboss::test::Kind, ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> kind() const; - ::emboss::support::Maybe has_kind() const; + [[nodiscard]] ::emboss::support::Maybe has_kind() const; public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 32>> count() const; - ::emboss::support::Maybe has_count() const; + [[nodiscard]] ::emboss::support::Maybe has_count() const; public: - typename ::emboss::support::EnumView< + [[nodiscard]] typename ::emboss::support::EnumView< /**/ ::emboss::test::Kind, ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 32>> wide_kind() const; - ::emboss::support::Maybe has_wide_kind() const; + [[nodiscard]] ::emboss::support::Maybe has_wide_kind() const; private: - typename ::emboss::test::ManifestEntry::GenericEmbossReservedAnonymousField1View>, 40>> + [[nodiscard]] typename ::emboss::test::ManifestEntry::GenericEmbossReservedAnonymousField1View>, 40>> emboss_reserved_anonymous_field_1() const; - ::emboss::support::Maybe has_emboss_reserved_anonymous_field_1() const; + [[nodiscard]] ::emboss::support::Maybe has_emboss_reserved_anonymous_field_1() const; public: - auto wide_kind_in_bits() const -> decltype(this->emboss_reserved_anonymous_field_1().wide_kind_in_bits()) { + [[nodiscard]] auto wide_kind_in_bits() const -> decltype(this->emboss_reserved_anonymous_field_1().wide_kind_in_bits()) { return has_wide_kind_in_bits().ValueOrDefault() ? emboss_reserved_anonymous_field_1().wide_kind_in_bits() : decltype(this->emboss_reserved_anonymous_field_1().wide_kind_in_bits())(); } - ::emboss::support::Maybe has_wide_kind_in_bits() const; + [[nodiscard]] ::emboss::support::Maybe has_wide_kind_in_bits() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -2477,9 +2400,9 @@ class GenericManifestEntryView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -2488,13 +2411,13 @@ class GenericManifestEntryView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -2512,9 +2435,9 @@ class GenericManifestEntryView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -2523,13 +2446,13 @@ class GenericManifestEntryView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -2547,9 +2470,9 @@ class GenericManifestEntryView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -2558,13 +2481,13 @@ class GenericManifestEntryView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -2595,7 +2518,7 @@ struct EmbossReservedInternalIsGenericManifestEntryView< }; template -inline GenericManifestEntryView< +[[nodiscard]] inline GenericManifestEntryView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -2610,7 +2533,7 @@ MakeManifestEntryView( T &&emboss_reserved_local_arg) { } template -inline GenericManifestEntryView> +[[nodiscard]] inline GenericManifestEntryView> MakeManifestEntryView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericManifestEntryView>( @@ -2619,7 +2542,7 @@ MakeManifestEntryView( T *emboss_reserved_local_data, } template -inline GenericManifestEntryView< +[[nodiscard]] inline GenericManifestEntryView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedManifestEntryView( T *emboss_reserved_local_data, @@ -2771,58 +2694,40 @@ class GenericStructContainingEnumView final { using Status = ::emboss::test::StructContainingEnum::Status; - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !bar().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!bar().Ok()) return false; + if (!IntrinsicSizeInBytes().Ok()) return false; + if (!MaxSizeInBytes().Ok()) return false; + if (!MinSizeInBytes().Ok()) return false; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - static constexpr ::std::size_t SizeInBytes() { + [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - static constexpr bool SizeIsKnown() { + [[nodiscard]] static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericStructContainingEnumView emboss_reserved_local_other) const { if (!has_bar().Known()) return false; @@ -2843,7 +2748,7 @@ class GenericStructContainingEnumView final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericStructContainingEnumView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_bar().ValueOr(false) && @@ -2876,7 +2781,7 @@ class GenericStructContainingEnumView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericStructContainingEnumView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -2971,15 +2876,15 @@ class GenericStructContainingEnumView final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> bar() const; - ::emboss::support::Maybe has_bar() const; + [[nodiscard]] ::emboss::support::Maybe has_bar() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -2995,9 +2900,9 @@ class GenericStructContainingEnumView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -3006,13 +2911,13 @@ class GenericStructContainingEnumView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -3030,9 +2935,9 @@ class GenericStructContainingEnumView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -3041,13 +2946,13 @@ class GenericStructContainingEnumView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -3065,9 +2970,9 @@ class GenericStructContainingEnumView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -3076,13 +2981,13 @@ class GenericStructContainingEnumView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -3113,7 +3018,7 @@ struct EmbossReservedInternalIsGenericStructContainingEnumView< }; template -inline GenericStructContainingEnumView< +[[nodiscard]] inline GenericStructContainingEnumView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -3128,7 +3033,7 @@ MakeStructContainingEnumView( T &&emboss_reserved_local_arg) { } template -inline GenericStructContainingEnumView> +[[nodiscard]] inline GenericStructContainingEnumView> MakeStructContainingEnumView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericStructContainingEnumView>( @@ -3137,7 +3042,7 @@ MakeStructContainingEnumView( T *emboss_reserved_local_data, } template -inline GenericStructContainingEnumView< +[[nodiscard]] inline GenericStructContainingEnumView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedStructContainingEnumView( T *emboss_reserved_local_data, diff --git a/testdata/golden_cpp/enum_case.emb.h b/testdata/golden_cpp/enum_case.emb.h index 4d6c432..6ef116a 100644 --- a/testdata/golden_cpp/enum_case.emb.h +++ b/testdata/golden_cpp/enum_case.emb.h @@ -331,72 +331,42 @@ class GenericUseKCamelEnumCaseView final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !v().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !first().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !v_is_first().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!v().Ok()) return false; + if (!first().Ok()) return false; + if (!v_is_first().Ok()) return false; + if (!IntrinsicSizeInBytes().Ok()) return false; + if (!MaxSizeInBytes().Ok()) return false; + if (!MinSizeInBytes().Ok()) return false; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - static constexpr ::std::size_t SizeInBytes() { + [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - static constexpr bool SizeIsKnown() { + [[nodiscard]] static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericUseKCamelEnumCaseView emboss_reserved_local_other) const { if (!has_v().Known()) return false; @@ -417,7 +387,7 @@ class GenericUseKCamelEnumCaseView final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericUseKCamelEnumCaseView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_v().ValueOr(false) && @@ -450,7 +420,7 @@ class GenericUseKCamelEnumCaseView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericUseKCamelEnumCaseView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -583,16 +553,16 @@ class GenericUseKCamelEnumCaseView final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: - typename ::emboss::support::EnumView< + [[nodiscard]] typename ::emboss::support::EnumView< /**/ ::emboss::test::EnumDefault, ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 32>> v() const; - ::emboss::support::Maybe has_v() const; + [[nodiscard]] ::emboss::support::Maybe has_v() const; public: class EmbossReservedVirtualFirstView final { @@ -608,9 +578,9 @@ class GenericUseKCamelEnumCaseView final { default; ~EmbossReservedVirtualFirstView() = default; - static constexpr ::emboss::test::EnumDefault Read(); - static constexpr ::emboss::test::EnumDefault UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::emboss::test::EnumDefault Read(); + [[nodiscard]] static constexpr ::emboss::test::EnumDefault UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -619,13 +589,13 @@ class GenericUseKCamelEnumCaseView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedVirtualFirstView first() { + [[nodiscard]] static constexpr EmbossReservedVirtualFirstView first() { return EmbossReservedVirtualFirstView(); } - static constexpr ::emboss::support::Maybe has_first() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_first() { return ::emboss::support::Maybe(true); } @@ -646,17 +616,17 @@ class GenericUseKCamelEnumCaseView final { default; ~EmbossReservedVirtualVIsFirstView() = default; - bool Read() const { + [[nodiscard]] bool Read() const { EMBOSS_CHECK(view_.has_v_is_first().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - bool UncheckedRead() const { + [[nodiscard]] bool UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - bool Ok() const { + [[nodiscard]] bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -669,12 +639,12 @@ class GenericUseKCamelEnumCaseView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } private: - ::emboss::support::Maybe MaybeRead() const { + [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.v(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(0))); @@ -682,7 +652,7 @@ class GenericUseKCamelEnumCaseView final { return emboss_reserved_local_subexpr_3; } - static constexpr bool ValueIsOk( + [[nodiscard]] static constexpr bool ValueIsOk( bool emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -690,8 +660,8 @@ class GenericUseKCamelEnumCaseView final { const GenericUseKCamelEnumCaseView view_; }; - EmbossReservedVirtualVIsFirstView v_is_first() const; - ::emboss::support::Maybe has_v_is_first() const; + [[nodiscard]] EmbossReservedVirtualVIsFirstView v_is_first() const; + [[nodiscard]] ::emboss::support::Maybe has_v_is_first() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -707,9 +677,9 @@ class GenericUseKCamelEnumCaseView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -718,13 +688,13 @@ class GenericUseKCamelEnumCaseView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -742,9 +712,9 @@ class GenericUseKCamelEnumCaseView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -753,13 +723,13 @@ class GenericUseKCamelEnumCaseView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -777,9 +747,9 @@ class GenericUseKCamelEnumCaseView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -788,13 +758,13 @@ class GenericUseKCamelEnumCaseView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -825,7 +795,7 @@ struct EmbossReservedInternalIsGenericUseKCamelEnumCaseView< }; template -inline GenericUseKCamelEnumCaseView< +[[nodiscard]] inline GenericUseKCamelEnumCaseView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -840,7 +810,7 @@ MakeUseKCamelEnumCaseView( T &&emboss_reserved_local_arg) { } template -inline GenericUseKCamelEnumCaseView> +[[nodiscard]] inline GenericUseKCamelEnumCaseView> MakeUseKCamelEnumCaseView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericUseKCamelEnumCaseView>( @@ -849,7 +819,7 @@ MakeUseKCamelEnumCaseView( T *emboss_reserved_local_data, } template -inline GenericUseKCamelEnumCaseView< +[[nodiscard]] inline GenericUseKCamelEnumCaseView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedUseKCamelEnumCaseView( T *emboss_reserved_local_data, diff --git a/testdata/golden_cpp/explicit_sizes.emb.h b/testdata/golden_cpp/explicit_sizes.emb.h index 8005e47..566dcf7 100644 --- a/testdata/golden_cpp/explicit_sizes.emb.h +++ b/testdata/golden_cpp/explicit_sizes.emb.h @@ -115,72 +115,42 @@ class GenericSizedUIntArraysView final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !one_nibble().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !two_nibble().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !four_nibble().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBits().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBits().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBits().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!one_nibble().Ok()) return false; + if (!two_nibble().Ok()) return false; + if (!four_nibble().Ok()) return false; + if (!IntrinsicSizeInBits().Ok()) return false; + if (!MaxSizeInBits().Ok()) return false; + if (!MinSizeInBits().Ok()) return false; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBits().Ok() && backing_.SizeInBits() >= static_cast( IntrinsicSizeInBits().UncheckedRead()); } - static constexpr ::std::size_t SizeInBits() { + [[nodiscard]] static constexpr ::std::size_t SizeInBits() { return static_cast(IntrinsicSizeInBits().Read()); } - static constexpr bool SizeIsKnown() { + [[nodiscard]] static constexpr bool SizeIsKnown() { return IntrinsicSizeInBits().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericSizedUIntArraysView emboss_reserved_local_other) const { if (!has_one_nibble().Known()) return false; @@ -235,7 +205,7 @@ class GenericSizedUIntArraysView final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericSizedUIntArraysView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_one_nibble().ValueOr(false) && @@ -296,7 +266,7 @@ class GenericSizedUIntArraysView final { emboss_reserved_local_other.IntrinsicSizeInBits().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericSizedUIntArraysView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -467,10 +437,10 @@ class GenericSizedUIntArraysView final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: - typename ::emboss::support::GenericArrayView< + [[nodiscard]] typename ::emboss::support::GenericArrayView< typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<4, ::emboss::support::AllValuesAreOk>, typename Storage::template OffsetStorageType::template OffsetStorageType> @@ -479,10 +449,10 @@ class GenericSizedUIntArraysView final { 1 > one_nibble() const; - ::emboss::support::Maybe has_one_nibble() const; + [[nodiscard]] ::emboss::support::Maybe has_one_nibble() const; public: - typename ::emboss::support::GenericArrayView< + [[nodiscard]] typename ::emboss::support::GenericArrayView< typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename Storage::template OffsetStorageType::template OffsetStorageType> @@ -491,10 +461,10 @@ class GenericSizedUIntArraysView final { 1 > two_nibble() const; - ::emboss::support::Maybe has_two_nibble() const; + [[nodiscard]] ::emboss::support::Maybe has_two_nibble() const; public: - typename ::emboss::support::GenericArrayView< + [[nodiscard]] typename ::emboss::support::GenericArrayView< typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<16, ::emboss::support::AllValuesAreOk>, typename Storage::template OffsetStorageType::template OffsetStorageType> @@ -503,7 +473,7 @@ class GenericSizedUIntArraysView final { 1 > four_nibble() const; - ::emboss::support::Maybe has_four_nibble() const; + [[nodiscard]] ::emboss::support::Maybe has_four_nibble() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBitsView final { @@ -519,9 +489,9 @@ class GenericSizedUIntArraysView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBitsView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -530,13 +500,13 @@ class GenericSizedUIntArraysView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBitsView IntrinsicSizeInBits() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBitsView IntrinsicSizeInBits() { return EmbossReservedDollarVirtualIntrinsicSizeInBitsView(); } - static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBits() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBits() { return ::emboss::support::Maybe(true); } @@ -554,9 +524,9 @@ class GenericSizedUIntArraysView final { default; ~EmbossReservedDollarVirtualMaxSizeInBitsView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -565,13 +535,13 @@ class GenericSizedUIntArraysView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBitsView MaxSizeInBits() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBitsView MaxSizeInBits() { return EmbossReservedDollarVirtualMaxSizeInBitsView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBits() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBits() { return ::emboss::support::Maybe(true); } @@ -589,9 +559,9 @@ class GenericSizedUIntArraysView final { default; ~EmbossReservedDollarVirtualMinSizeInBitsView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -600,13 +570,13 @@ class GenericSizedUIntArraysView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBitsView MinSizeInBits() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBitsView MinSizeInBits() { return EmbossReservedDollarVirtualMinSizeInBitsView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBits() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBits() { return ::emboss::support::Maybe(true); } @@ -637,7 +607,7 @@ struct EmbossReservedInternalIsGenericSizedUIntArraysView< }; template -inline GenericSizedUIntArraysView< +[[nodiscard]] inline GenericSizedUIntArraysView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -652,7 +622,7 @@ MakeSizedUIntArraysView( T &&emboss_reserved_local_arg) { } template -inline GenericSizedUIntArraysView> +[[nodiscard]] inline GenericSizedUIntArraysView> MakeSizedUIntArraysView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericSizedUIntArraysView>( @@ -661,7 +631,7 @@ MakeSizedUIntArraysView( T *emboss_reserved_local_data, } template -inline GenericSizedUIntArraysView< +[[nodiscard]] inline GenericSizedUIntArraysView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedSizedUIntArraysView( T *emboss_reserved_local_data, @@ -728,72 +698,42 @@ class GenericSizedIntArraysView final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !one_nibble().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !two_nibble().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !four_nibble().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBits().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBits().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBits().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!one_nibble().Ok()) return false; + if (!two_nibble().Ok()) return false; + if (!four_nibble().Ok()) return false; + if (!IntrinsicSizeInBits().Ok()) return false; + if (!MaxSizeInBits().Ok()) return false; + if (!MinSizeInBits().Ok()) return false; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBits().Ok() && backing_.SizeInBits() >= static_cast( IntrinsicSizeInBits().UncheckedRead()); } - static constexpr ::std::size_t SizeInBits() { + [[nodiscard]] static constexpr ::std::size_t SizeInBits() { return static_cast(IntrinsicSizeInBits().Read()); } - static constexpr bool SizeIsKnown() { + [[nodiscard]] static constexpr bool SizeIsKnown() { return IntrinsicSizeInBits().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericSizedIntArraysView emboss_reserved_local_other) const { if (!has_one_nibble().Known()) return false; @@ -848,7 +788,7 @@ class GenericSizedIntArraysView final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericSizedIntArraysView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_one_nibble().ValueOr(false) && @@ -909,7 +849,7 @@ class GenericSizedIntArraysView final { emboss_reserved_local_other.IntrinsicSizeInBits().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericSizedIntArraysView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -1080,10 +1020,10 @@ class GenericSizedIntArraysView final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: - typename ::emboss::support::GenericArrayView< + [[nodiscard]] typename ::emboss::support::GenericArrayView< typename ::emboss::prelude::IntView< /**/ ::emboss::support::FixedSizeViewParameters<4, ::emboss::support::AllValuesAreOk>, typename Storage::template OffsetStorageType::template OffsetStorageType> @@ -1092,10 +1032,10 @@ class GenericSizedIntArraysView final { 1 > one_nibble() const; - ::emboss::support::Maybe has_one_nibble() const; + [[nodiscard]] ::emboss::support::Maybe has_one_nibble() const; public: - typename ::emboss::support::GenericArrayView< + [[nodiscard]] typename ::emboss::support::GenericArrayView< typename ::emboss::prelude::IntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename Storage::template OffsetStorageType::template OffsetStorageType> @@ -1104,10 +1044,10 @@ class GenericSizedIntArraysView final { 1 > two_nibble() const; - ::emboss::support::Maybe has_two_nibble() const; + [[nodiscard]] ::emboss::support::Maybe has_two_nibble() const; public: - typename ::emboss::support::GenericArrayView< + [[nodiscard]] typename ::emboss::support::GenericArrayView< typename ::emboss::prelude::IntView< /**/ ::emboss::support::FixedSizeViewParameters<16, ::emboss::support::AllValuesAreOk>, typename Storage::template OffsetStorageType::template OffsetStorageType> @@ -1116,7 +1056,7 @@ class GenericSizedIntArraysView final { 1 > four_nibble() const; - ::emboss::support::Maybe has_four_nibble() const; + [[nodiscard]] ::emboss::support::Maybe has_four_nibble() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBitsView final { @@ -1132,9 +1072,9 @@ class GenericSizedIntArraysView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBitsView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -1143,13 +1083,13 @@ class GenericSizedIntArraysView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBitsView IntrinsicSizeInBits() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBitsView IntrinsicSizeInBits() { return EmbossReservedDollarVirtualIntrinsicSizeInBitsView(); } - static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBits() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBits() { return ::emboss::support::Maybe(true); } @@ -1167,9 +1107,9 @@ class GenericSizedIntArraysView final { default; ~EmbossReservedDollarVirtualMaxSizeInBitsView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -1178,13 +1118,13 @@ class GenericSizedIntArraysView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBitsView MaxSizeInBits() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBitsView MaxSizeInBits() { return EmbossReservedDollarVirtualMaxSizeInBitsView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBits() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBits() { return ::emboss::support::Maybe(true); } @@ -1202,9 +1142,9 @@ class GenericSizedIntArraysView final { default; ~EmbossReservedDollarVirtualMinSizeInBitsView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -1213,13 +1153,13 @@ class GenericSizedIntArraysView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBitsView MinSizeInBits() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBitsView MinSizeInBits() { return EmbossReservedDollarVirtualMinSizeInBitsView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBits() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBits() { return ::emboss::support::Maybe(true); } @@ -1250,7 +1190,7 @@ struct EmbossReservedInternalIsGenericSizedIntArraysView< }; template -inline GenericSizedIntArraysView< +[[nodiscard]] inline GenericSizedIntArraysView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -1265,7 +1205,7 @@ MakeSizedIntArraysView( T &&emboss_reserved_local_arg) { } template -inline GenericSizedIntArraysView> +[[nodiscard]] inline GenericSizedIntArraysView> MakeSizedIntArraysView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericSizedIntArraysView>( @@ -1274,7 +1214,7 @@ MakeSizedIntArraysView( T *emboss_reserved_local_data, } template -inline GenericSizedIntArraysView< +[[nodiscard]] inline GenericSizedIntArraysView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedSizedIntArraysView( T *emboss_reserved_local_data, @@ -1341,72 +1281,42 @@ class GenericSizedEnumArraysView final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !one_nibble().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !two_nibble().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !four_nibble().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBits().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBits().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBits().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!one_nibble().Ok()) return false; + if (!two_nibble().Ok()) return false; + if (!four_nibble().Ok()) return false; + if (!IntrinsicSizeInBits().Ok()) return false; + if (!MaxSizeInBits().Ok()) return false; + if (!MinSizeInBits().Ok()) return false; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBits().Ok() && backing_.SizeInBits() >= static_cast( IntrinsicSizeInBits().UncheckedRead()); } - static constexpr ::std::size_t SizeInBits() { + [[nodiscard]] static constexpr ::std::size_t SizeInBits() { return static_cast(IntrinsicSizeInBits().Read()); } - static constexpr bool SizeIsKnown() { + [[nodiscard]] static constexpr bool SizeIsKnown() { return IntrinsicSizeInBits().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericSizedEnumArraysView emboss_reserved_local_other) const { if (!has_one_nibble().Known()) return false; @@ -1461,7 +1371,7 @@ class GenericSizedEnumArraysView final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericSizedEnumArraysView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_one_nibble().ValueOr(false) && @@ -1522,7 +1432,7 @@ class GenericSizedEnumArraysView final { emboss_reserved_local_other.IntrinsicSizeInBits().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericSizedEnumArraysView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -1693,10 +1603,10 @@ class GenericSizedEnumArraysView final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: - typename ::emboss::support::GenericArrayView< + [[nodiscard]] typename ::emboss::support::GenericArrayView< typename ::emboss::support::EnumView< /**/ ::emboss::test::Enum, ::emboss::support::FixedSizeViewParameters<4, ::emboss::support::AllValuesAreOk>, @@ -1706,10 +1616,10 @@ class GenericSizedEnumArraysView final { 1 > one_nibble() const; - ::emboss::support::Maybe has_one_nibble() const; + [[nodiscard]] ::emboss::support::Maybe has_one_nibble() const; public: - typename ::emboss::support::GenericArrayView< + [[nodiscard]] typename ::emboss::support::GenericArrayView< typename ::emboss::support::EnumView< /**/ ::emboss::test::Enum, ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, @@ -1719,10 +1629,10 @@ class GenericSizedEnumArraysView final { 1 > two_nibble() const; - ::emboss::support::Maybe has_two_nibble() const; + [[nodiscard]] ::emboss::support::Maybe has_two_nibble() const; public: - typename ::emboss::support::GenericArrayView< + [[nodiscard]] typename ::emboss::support::GenericArrayView< typename ::emboss::support::EnumView< /**/ ::emboss::test::Enum, ::emboss::support::FixedSizeViewParameters<16, ::emboss::support::AllValuesAreOk>, @@ -1732,7 +1642,7 @@ class GenericSizedEnumArraysView final { 1 > four_nibble() const; - ::emboss::support::Maybe has_four_nibble() const; + [[nodiscard]] ::emboss::support::Maybe has_four_nibble() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBitsView final { @@ -1748,9 +1658,9 @@ class GenericSizedEnumArraysView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBitsView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -1759,13 +1669,13 @@ class GenericSizedEnumArraysView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBitsView IntrinsicSizeInBits() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBitsView IntrinsicSizeInBits() { return EmbossReservedDollarVirtualIntrinsicSizeInBitsView(); } - static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBits() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBits() { return ::emboss::support::Maybe(true); } @@ -1783,9 +1693,9 @@ class GenericSizedEnumArraysView final { default; ~EmbossReservedDollarVirtualMaxSizeInBitsView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -1794,13 +1704,13 @@ class GenericSizedEnumArraysView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBitsView MaxSizeInBits() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBitsView MaxSizeInBits() { return EmbossReservedDollarVirtualMaxSizeInBitsView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBits() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBits() { return ::emboss::support::Maybe(true); } @@ -1818,9 +1728,9 @@ class GenericSizedEnumArraysView final { default; ~EmbossReservedDollarVirtualMinSizeInBitsView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -1829,13 +1739,13 @@ class GenericSizedEnumArraysView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBitsView MinSizeInBits() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBitsView MinSizeInBits() { return EmbossReservedDollarVirtualMinSizeInBitsView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBits() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBits() { return ::emboss::support::Maybe(true); } @@ -1866,7 +1776,7 @@ struct EmbossReservedInternalIsGenericSizedEnumArraysView< }; template -inline GenericSizedEnumArraysView< +[[nodiscard]] inline GenericSizedEnumArraysView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -1881,7 +1791,7 @@ MakeSizedEnumArraysView( T &&emboss_reserved_local_arg) { } template -inline GenericSizedEnumArraysView> +[[nodiscard]] inline GenericSizedEnumArraysView> MakeSizedEnumArraysView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericSizedEnumArraysView>( @@ -1890,7 +1800,7 @@ MakeSizedEnumArraysView( T *emboss_reserved_local_data, } template -inline GenericSizedEnumArraysView< +[[nodiscard]] inline GenericSizedEnumArraysView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedSizedEnumArraysView( T *emboss_reserved_local_data, @@ -1955,58 +1865,40 @@ class GenericBitArrayContainerView final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !uint_arrays().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!uint_arrays().Ok()) return false; + if (!IntrinsicSizeInBytes().Ok()) return false; + if (!MaxSizeInBytes().Ok()) return false; + if (!MinSizeInBytes().Ok()) return false; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - static constexpr ::std::size_t SizeInBytes() { + [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - static constexpr bool SizeIsKnown() { + [[nodiscard]] static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericBitArrayContainerView emboss_reserved_local_other) const { if (!has_uint_arrays().Known()) return false; @@ -2027,7 +1919,7 @@ class GenericBitArrayContainerView final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericBitArrayContainerView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_uint_arrays().ValueOr(false) && @@ -2060,7 +1952,7 @@ class GenericBitArrayContainerView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericBitArrayContainerView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -2155,13 +2047,13 @@ class GenericBitArrayContainerView final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: - typename ::emboss::test::GenericSizedUIntArraysView>, 56>> + [[nodiscard]] typename ::emboss::test::GenericSizedUIntArraysView>, 56>> uint_arrays() const; - ::emboss::support::Maybe has_uint_arrays() const; + [[nodiscard]] ::emboss::support::Maybe has_uint_arrays() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -2177,9 +2069,9 @@ class GenericBitArrayContainerView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -2188,13 +2080,13 @@ class GenericBitArrayContainerView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -2212,9 +2104,9 @@ class GenericBitArrayContainerView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -2223,13 +2115,13 @@ class GenericBitArrayContainerView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -2247,9 +2139,9 @@ class GenericBitArrayContainerView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -2258,13 +2150,13 @@ class GenericBitArrayContainerView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -2295,7 +2187,7 @@ struct EmbossReservedInternalIsGenericBitArrayContainerView< }; template -inline GenericBitArrayContainerView< +[[nodiscard]] inline GenericBitArrayContainerView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -2310,7 +2202,7 @@ MakeBitArrayContainerView( T &&emboss_reserved_local_arg) { } template -inline GenericBitArrayContainerView> +[[nodiscard]] inline GenericBitArrayContainerView> MakeBitArrayContainerView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericBitArrayContainerView>( @@ -2319,7 +2211,7 @@ MakeBitArrayContainerView( T *emboss_reserved_local_data, } template -inline GenericBitArrayContainerView< +[[nodiscard]] inline GenericBitArrayContainerView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedBitArrayContainerView( T *emboss_reserved_local_data, diff --git a/testdata/golden_cpp/float.emb.h b/testdata/golden_cpp/float.emb.h index c54aa66..1e5e869 100644 --- a/testdata/golden_cpp/float.emb.h +++ b/testdata/golden_cpp/float.emb.h @@ -96,65 +96,41 @@ class GenericFloatsView final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !float_little_endian().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !float_big_endian().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!float_little_endian().Ok()) return false; + if (!float_big_endian().Ok()) return false; + if (!IntrinsicSizeInBytes().Ok()) return false; + if (!MaxSizeInBytes().Ok()) return false; + if (!MinSizeInBytes().Ok()) return false; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - static constexpr ::std::size_t SizeInBytes() { + [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - static constexpr bool SizeIsKnown() { + [[nodiscard]] static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericFloatsView emboss_reserved_local_other) const { if (!has_float_little_endian().Known()) return false; @@ -192,7 +168,7 @@ class GenericFloatsView final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericFloatsView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_float_little_endian().ValueOr(false) && @@ -239,7 +215,7 @@ class GenericFloatsView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericFloatsView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -372,23 +348,23 @@ class GenericFloatsView final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: - typename ::emboss::prelude::FloatView< + [[nodiscard]] typename ::emboss::prelude::FloatView< /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 32>> float_little_endian() const; - ::emboss::support::Maybe has_float_little_endian() const; + [[nodiscard]] ::emboss::support::Maybe has_float_little_endian() const; public: - typename ::emboss::prelude::FloatView< + [[nodiscard]] typename ::emboss::prelude::FloatView< /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 32>> float_big_endian() const; - ::emboss::support::Maybe has_float_big_endian() const; + [[nodiscard]] ::emboss::support::Maybe has_float_big_endian() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -404,9 +380,9 @@ class GenericFloatsView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -415,13 +391,13 @@ class GenericFloatsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -439,9 +415,9 @@ class GenericFloatsView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -450,13 +426,13 @@ class GenericFloatsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -474,9 +450,9 @@ class GenericFloatsView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -485,13 +461,13 @@ class GenericFloatsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -522,7 +498,7 @@ struct EmbossReservedInternalIsGenericFloatsView< }; template -inline GenericFloatsView< +[[nodiscard]] inline GenericFloatsView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -537,7 +513,7 @@ MakeFloatsView( T &&emboss_reserved_local_arg) { } template -inline GenericFloatsView> +[[nodiscard]] inline GenericFloatsView> MakeFloatsView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericFloatsView>( @@ -546,7 +522,7 @@ MakeFloatsView( T *emboss_reserved_local_data, } template -inline GenericFloatsView< +[[nodiscard]] inline GenericFloatsView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedFloatsView( T *emboss_reserved_local_data, @@ -612,65 +588,41 @@ class GenericDoublesView final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !double_little_endian().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !double_big_endian().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!double_little_endian().Ok()) return false; + if (!double_big_endian().Ok()) return false; + if (!IntrinsicSizeInBytes().Ok()) return false; + if (!MaxSizeInBytes().Ok()) return false; + if (!MinSizeInBytes().Ok()) return false; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - static constexpr ::std::size_t SizeInBytes() { + [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - static constexpr bool SizeIsKnown() { + [[nodiscard]] static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericDoublesView emboss_reserved_local_other) const { if (!has_double_little_endian().Known()) return false; @@ -708,7 +660,7 @@ class GenericDoublesView final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericDoublesView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_double_little_endian().ValueOr(false) && @@ -755,7 +707,7 @@ class GenericDoublesView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericDoublesView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -888,23 +840,23 @@ class GenericDoublesView final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: - typename ::emboss::prelude::FloatView< + [[nodiscard]] typename ::emboss::prelude::FloatView< /**/ ::emboss::support::FixedSizeViewParameters<64, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 64>> double_little_endian() const; - ::emboss::support::Maybe has_double_little_endian() const; + [[nodiscard]] ::emboss::support::Maybe has_double_little_endian() const; public: - typename ::emboss::prelude::FloatView< + [[nodiscard]] typename ::emboss::prelude::FloatView< /**/ ::emboss::support::FixedSizeViewParameters<64, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 64>> double_big_endian() const; - ::emboss::support::Maybe has_double_big_endian() const; + [[nodiscard]] ::emboss::support::Maybe has_double_big_endian() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -920,9 +872,9 @@ class GenericDoublesView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -931,13 +883,13 @@ class GenericDoublesView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -955,9 +907,9 @@ class GenericDoublesView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -966,13 +918,13 @@ class GenericDoublesView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -990,9 +942,9 @@ class GenericDoublesView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -1001,13 +953,13 @@ class GenericDoublesView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -1038,7 +990,7 @@ struct EmbossReservedInternalIsGenericDoublesView< }; template -inline GenericDoublesView< +[[nodiscard]] inline GenericDoublesView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -1053,7 +1005,7 @@ MakeDoublesView( T &&emboss_reserved_local_arg) { } template -inline GenericDoublesView> +[[nodiscard]] inline GenericDoublesView> MakeDoublesView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericDoublesView>( @@ -1062,7 +1014,7 @@ MakeDoublesView( T *emboss_reserved_local_data, } template -inline GenericDoublesView< +[[nodiscard]] inline GenericDoublesView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedDoublesView( T *emboss_reserved_local_data, diff --git a/testdata/golden_cpp/imported.emb.h b/testdata/golden_cpp/imported.emb.h index ce0cbea..840712a 100644 --- a/testdata/golden_cpp/imported.emb.h +++ b/testdata/golden_cpp/imported.emb.h @@ -87,58 +87,40 @@ class GenericInnerView final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !value().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!value().Ok()) return false; + if (!IntrinsicSizeInBytes().Ok()) return false; + if (!MaxSizeInBytes().Ok()) return false; + if (!MinSizeInBytes().Ok()) return false; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - static constexpr ::std::size_t SizeInBytes() { + [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - static constexpr bool SizeIsKnown() { + [[nodiscard]] static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericInnerView emboss_reserved_local_other) const { if (!has_value().Known()) return false; @@ -159,7 +141,7 @@ class GenericInnerView final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericInnerView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_value().ValueOr(false) && @@ -192,7 +174,7 @@ class GenericInnerView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericInnerView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -287,15 +269,15 @@ class GenericInnerView final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<64, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 64>> value() const; - ::emboss::support::Maybe has_value() const; + [[nodiscard]] ::emboss::support::Maybe has_value() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -311,9 +293,9 @@ class GenericInnerView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -322,13 +304,13 @@ class GenericInnerView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -346,9 +328,9 @@ class GenericInnerView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -357,13 +339,13 @@ class GenericInnerView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -381,9 +363,9 @@ class GenericInnerView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -392,13 +374,13 @@ class GenericInnerView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -429,7 +411,7 @@ struct EmbossReservedInternalIsGenericInnerView< }; template -inline GenericInnerView< +[[nodiscard]] inline GenericInnerView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -444,7 +426,7 @@ MakeInnerView( T &&emboss_reserved_local_arg) { } template -inline GenericInnerView> +[[nodiscard]] inline GenericInnerView> MakeInnerView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericInnerView>( @@ -453,7 +435,7 @@ MakeInnerView( T *emboss_reserved_local_data, } template -inline GenericInnerView< +[[nodiscard]] inline GenericInnerView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedInnerView( T *emboss_reserved_local_data, diff --git a/testdata/golden_cpp/imported_genfiles.emb.h b/testdata/golden_cpp/imported_genfiles.emb.h index eb26bc9..cc5384f 100644 --- a/testdata/golden_cpp/imported_genfiles.emb.h +++ b/testdata/golden_cpp/imported_genfiles.emb.h @@ -88,58 +88,40 @@ class GenericInnerView final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !value().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!value().Ok()) return false; + if (!IntrinsicSizeInBytes().Ok()) return false; + if (!MaxSizeInBytes().Ok()) return false; + if (!MinSizeInBytes().Ok()) return false; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - static constexpr ::std::size_t SizeInBytes() { + [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - static constexpr bool SizeIsKnown() { + [[nodiscard]] static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericInnerView emboss_reserved_local_other) const { if (!has_value().Known()) return false; @@ -160,7 +142,7 @@ class GenericInnerView final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericInnerView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_value().ValueOr(false) && @@ -193,7 +175,7 @@ class GenericInnerView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericInnerView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -288,15 +270,15 @@ class GenericInnerView final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<64, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 64>> value() const; - ::emboss::support::Maybe has_value() const; + [[nodiscard]] ::emboss::support::Maybe has_value() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -312,9 +294,9 @@ class GenericInnerView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -323,13 +305,13 @@ class GenericInnerView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -347,9 +329,9 @@ class GenericInnerView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -358,13 +340,13 @@ class GenericInnerView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -382,9 +364,9 @@ class GenericInnerView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -393,13 +375,13 @@ class GenericInnerView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -430,7 +412,7 @@ struct EmbossReservedInternalIsGenericInnerView< }; template -inline GenericInnerView< +[[nodiscard]] inline GenericInnerView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -445,7 +427,7 @@ MakeInnerView( T &&emboss_reserved_local_arg) { } template -inline GenericInnerView> +[[nodiscard]] inline GenericInnerView> MakeInnerView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericInnerView>( @@ -454,7 +436,7 @@ MakeInnerView( T *emboss_reserved_local_data, } template -inline GenericInnerView< +[[nodiscard]] inline GenericInnerView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedInnerView( T *emboss_reserved_local_data, diff --git a/testdata/golden_cpp/importer.emb.h b/testdata/golden_cpp/importer.emb.h index 3c54911..f209c6c 100644 --- a/testdata/golden_cpp/importer.emb.h +++ b/testdata/golden_cpp/importer.emb.h @@ -92,65 +92,41 @@ class GenericOuterView final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !inner().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !inner_gen().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!inner().Ok()) return false; + if (!inner_gen().Ok()) return false; + if (!IntrinsicSizeInBytes().Ok()) return false; + if (!MaxSizeInBytes().Ok()) return false; + if (!MinSizeInBytes().Ok()) return false; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - static constexpr ::std::size_t SizeInBytes() { + [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - static constexpr bool SizeIsKnown() { + [[nodiscard]] static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericOuterView emboss_reserved_local_other) const { if (!has_inner().Known()) return false; @@ -188,7 +164,7 @@ class GenericOuterView final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericOuterView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_inner().ValueOr(false) && @@ -235,7 +211,7 @@ class GenericOuterView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericOuterView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -368,19 +344,19 @@ class GenericOuterView final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: - typename ::emboss::test::GenericInnerView> + [[nodiscard]] typename ::emboss::test::GenericInnerView> inner() const; - ::emboss::support::Maybe has_inner() const; + [[nodiscard]] ::emboss::support::Maybe has_inner() const; public: - typename ::emboss::test::generated::GenericInnerView> + [[nodiscard]] typename ::emboss::test::generated::GenericInnerView> inner_gen() const; - ::emboss::support::Maybe has_inner_gen() const; + [[nodiscard]] ::emboss::support::Maybe has_inner_gen() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -396,9 +372,9 @@ class GenericOuterView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -407,13 +383,13 @@ class GenericOuterView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -431,9 +407,9 @@ class GenericOuterView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -442,13 +418,13 @@ class GenericOuterView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -466,9 +442,9 @@ class GenericOuterView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -477,13 +453,13 @@ class GenericOuterView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -514,7 +490,7 @@ struct EmbossReservedInternalIsGenericOuterView< }; template -inline GenericOuterView< +[[nodiscard]] inline GenericOuterView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -529,7 +505,7 @@ MakeOuterView( T &&emboss_reserved_local_arg) { } template -inline GenericOuterView> +[[nodiscard]] inline GenericOuterView> MakeOuterView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericOuterView>( @@ -538,7 +514,7 @@ MakeOuterView( T *emboss_reserved_local_data, } template -inline GenericOuterView< +[[nodiscard]] inline GenericOuterView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedOuterView( T *emboss_reserved_local_data, diff --git a/testdata/golden_cpp/importer2.emb.h b/testdata/golden_cpp/importer2.emb.h index 8b99ad6..b4107d1 100644 --- a/testdata/golden_cpp/importer2.emb.h +++ b/testdata/golden_cpp/importer2.emb.h @@ -89,58 +89,40 @@ class GenericOuter2View final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !outer().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!outer().Ok()) return false; + if (!IntrinsicSizeInBytes().Ok()) return false; + if (!MaxSizeInBytes().Ok()) return false; + if (!MinSizeInBytes().Ok()) return false; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - static constexpr ::std::size_t SizeInBytes() { + [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - static constexpr bool SizeIsKnown() { + [[nodiscard]] static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericOuter2View emboss_reserved_local_other) const { if (!has_outer().Known()) return false; @@ -161,7 +143,7 @@ class GenericOuter2View final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericOuter2View emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_outer().ValueOr(false) && @@ -194,7 +176,7 @@ class GenericOuter2View final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericOuter2View emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -289,13 +271,13 @@ class GenericOuter2View final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: - typename ::emboss::test::GenericOuterView> + [[nodiscard]] typename ::emboss::test::GenericOuterView> outer() const; - ::emboss::support::Maybe has_outer() const; + [[nodiscard]] ::emboss::support::Maybe has_outer() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -311,9 +293,9 @@ class GenericOuter2View final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -322,13 +304,13 @@ class GenericOuter2View final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -346,9 +328,9 @@ class GenericOuter2View final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -357,13 +339,13 @@ class GenericOuter2View final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -381,9 +363,9 @@ class GenericOuter2View final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -392,13 +374,13 @@ class GenericOuter2View final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -429,7 +411,7 @@ struct EmbossReservedInternalIsGenericOuter2View< }; template -inline GenericOuter2View< +[[nodiscard]] inline GenericOuter2View< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -444,7 +426,7 @@ MakeOuter2View( T &&emboss_reserved_local_arg) { } template -inline GenericOuter2View> +[[nodiscard]] inline GenericOuter2View> MakeOuter2View( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericOuter2View>( @@ -453,7 +435,7 @@ MakeOuter2View( T *emboss_reserved_local_data, } template -inline GenericOuter2View< +[[nodiscard]] inline GenericOuter2View< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedOuter2View( T *emboss_reserved_local_data, diff --git a/testdata/golden_cpp/inline_type.emb.h b/testdata/golden_cpp/inline_type.emb.h index 0adbce3..f55d002 100644 --- a/testdata/golden_cpp/inline_type.emb.h +++ b/testdata/golden_cpp/inline_type.emb.h @@ -269,65 +269,41 @@ class GenericFooView final { using Status = ::emboss::test::Foo::Status; using SecondaryStatus = ::emboss::test::Foo::SecondaryStatus; - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !status().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !secondary_status().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!status().Ok()) return false; + if (!secondary_status().Ok()) return false; + if (!IntrinsicSizeInBytes().Ok()) return false; + if (!MaxSizeInBytes().Ok()) return false; + if (!MinSizeInBytes().Ok()) return false; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - static constexpr ::std::size_t SizeInBytes() { + [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - static constexpr bool SizeIsKnown() { + [[nodiscard]] static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericFooView emboss_reserved_local_other) const { if (!has_status().Known()) return false; @@ -365,7 +341,7 @@ class GenericFooView final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericFooView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_status().ValueOr(false) && @@ -412,7 +388,7 @@ class GenericFooView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericFooView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -545,25 +521,25 @@ class GenericFooView final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: - typename ::emboss::support::EnumView< + [[nodiscard]] typename ::emboss::support::EnumView< /**/ ::emboss::test::Foo::Status, ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> status() const; - ::emboss::support::Maybe has_status() const; + [[nodiscard]] ::emboss::support::Maybe has_status() const; public: - typename ::emboss::support::EnumView< + [[nodiscard]] typename ::emboss::support::EnumView< /**/ ::emboss::test::Foo::SecondaryStatus, ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> secondary_status() const; - ::emboss::support::Maybe has_secondary_status() const; + [[nodiscard]] ::emboss::support::Maybe has_secondary_status() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -579,9 +555,9 @@ class GenericFooView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -590,13 +566,13 @@ class GenericFooView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -614,9 +590,9 @@ class GenericFooView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -625,13 +601,13 @@ class GenericFooView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -649,9 +625,9 @@ class GenericFooView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -660,13 +636,13 @@ class GenericFooView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -697,7 +673,7 @@ struct EmbossReservedInternalIsGenericFooView< }; template -inline GenericFooView< +[[nodiscard]] inline GenericFooView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -712,7 +688,7 @@ MakeFooView( T &&emboss_reserved_local_arg) { } template -inline GenericFooView> +[[nodiscard]] inline GenericFooView> MakeFooView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericFooView>( @@ -721,7 +697,7 @@ MakeFooView( T *emboss_reserved_local_data, } template -inline GenericFooView< +[[nodiscard]] inline GenericFooView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedFooView( T *emboss_reserved_local_data, diff --git a/testdata/golden_cpp/int_sizes.emb.h b/testdata/golden_cpp/int_sizes.emb.h index ddb7e4d..956706f 100644 --- a/testdata/golden_cpp/int_sizes.emb.h +++ b/testdata/golden_cpp/int_sizes.emb.h @@ -94,107 +94,47 @@ class GenericSizesView final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !one_byte().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !two_byte().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !three_byte().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !four_byte().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !five_byte().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !six_byte().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !seven_byte().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !eight_byte().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!one_byte().Ok()) return false; + if (!two_byte().Ok()) return false; + if (!three_byte().Ok()) return false; + if (!four_byte().Ok()) return false; + if (!five_byte().Ok()) return false; + if (!six_byte().Ok()) return false; + if (!seven_byte().Ok()) return false; + if (!eight_byte().Ok()) return false; + if (!IntrinsicSizeInBytes().Ok()) return false; + if (!MaxSizeInBytes().Ok()) return false; + if (!MinSizeInBytes().Ok()) return false; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - static constexpr ::std::size_t SizeInBytes() { + [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - static constexpr bool SizeIsKnown() { + [[nodiscard]] static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericSizesView emboss_reserved_local_other) const { if (!has_one_byte().Known()) return false; @@ -334,7 +274,7 @@ class GenericSizesView final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericSizesView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_one_byte().ValueOr(false) && @@ -465,7 +405,7 @@ class GenericSizesView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericSizesView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -826,71 +766,71 @@ class GenericSizesView final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: - typename ::emboss::prelude::IntView< + [[nodiscard]] typename ::emboss::prelude::IntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> one_byte() const; - ::emboss::support::Maybe has_one_byte() const; + [[nodiscard]] ::emboss::support::Maybe has_one_byte() const; public: - typename ::emboss::prelude::IntView< + [[nodiscard]] typename ::emboss::prelude::IntView< /**/ ::emboss::support::FixedSizeViewParameters<16, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 16>> two_byte() const; - ::emboss::support::Maybe has_two_byte() const; + [[nodiscard]] ::emboss::support::Maybe has_two_byte() const; public: - typename ::emboss::prelude::IntView< + [[nodiscard]] typename ::emboss::prelude::IntView< /**/ ::emboss::support::FixedSizeViewParameters<24, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 24>> three_byte() const; - ::emboss::support::Maybe has_three_byte() const; + [[nodiscard]] ::emboss::support::Maybe has_three_byte() const; public: - typename ::emboss::prelude::IntView< + [[nodiscard]] typename ::emboss::prelude::IntView< /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 32>> four_byte() const; - ::emboss::support::Maybe has_four_byte() const; + [[nodiscard]] ::emboss::support::Maybe has_four_byte() const; public: - typename ::emboss::prelude::IntView< + [[nodiscard]] typename ::emboss::prelude::IntView< /**/ ::emboss::support::FixedSizeViewParameters<40, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 40>> five_byte() const; - ::emboss::support::Maybe has_five_byte() const; + [[nodiscard]] ::emboss::support::Maybe has_five_byte() const; public: - typename ::emboss::prelude::IntView< + [[nodiscard]] typename ::emboss::prelude::IntView< /**/ ::emboss::support::FixedSizeViewParameters<48, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 48>> six_byte() const; - ::emboss::support::Maybe has_six_byte() const; + [[nodiscard]] ::emboss::support::Maybe has_six_byte() const; public: - typename ::emboss::prelude::IntView< + [[nodiscard]] typename ::emboss::prelude::IntView< /**/ ::emboss::support::FixedSizeViewParameters<56, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 56>> seven_byte() const; - ::emboss::support::Maybe has_seven_byte() const; + [[nodiscard]] ::emboss::support::Maybe has_seven_byte() const; public: - typename ::emboss::prelude::IntView< + [[nodiscard]] typename ::emboss::prelude::IntView< /**/ ::emboss::support::FixedSizeViewParameters<64, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 64>> eight_byte() const; - ::emboss::support::Maybe has_eight_byte() const; + [[nodiscard]] ::emboss::support::Maybe has_eight_byte() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -906,9 +846,9 @@ class GenericSizesView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -917,13 +857,13 @@ class GenericSizesView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -941,9 +881,9 @@ class GenericSizesView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -952,13 +892,13 @@ class GenericSizesView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -976,9 +916,9 @@ class GenericSizesView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -987,13 +927,13 @@ class GenericSizesView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -1024,7 +964,7 @@ struct EmbossReservedInternalIsGenericSizesView< }; template -inline GenericSizesView< +[[nodiscard]] inline GenericSizesView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -1039,7 +979,7 @@ MakeSizesView( T &&emboss_reserved_local_arg) { } template -inline GenericSizesView> +[[nodiscard]] inline GenericSizesView> MakeSizesView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericSizesView>( @@ -1048,7 +988,7 @@ MakeSizesView( T *emboss_reserved_local_data, } template -inline GenericSizesView< +[[nodiscard]] inline GenericSizesView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedSizesView( T *emboss_reserved_local_data, diff --git a/testdata/golden_cpp/large_array.emb.h b/testdata/golden_cpp/large_array.emb.h index 81048d8..9985afe 100644 --- a/testdata/golden_cpp/large_array.emb.h +++ b/testdata/golden_cpp/large_array.emb.h @@ -88,64 +88,40 @@ class GenericUIntArrayView final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !element_count().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !elements().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!element_count().Ok()) return false; + if (!elements().Ok()) return false; + if (!IntrinsicSizeInBytes().Ok()) return false; + if (!MaxSizeInBytes().Ok()) return false; + if (!MinSizeInBytes().Ok()) return false; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - ::std::size_t SizeInBytes() const { + [[nodiscard]] ::std::size_t SizeInBytes() const { return static_cast(IntrinsicSizeInBytes().Read()); } - bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + [[nodiscard]] bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericUIntArrayView emboss_reserved_local_other) const { if (!has_element_count().Known()) return false; @@ -183,7 +159,7 @@ class GenericUIntArrayView final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericUIntArrayView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_element_count().ValueOr(false) && @@ -230,7 +206,7 @@ class GenericUIntArrayView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericUIntArrayView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -363,18 +339,18 @@ class GenericUIntArrayView final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 32>> element_count() const; - ::emboss::support::Maybe has_element_count() const; + [[nodiscard]] ::emboss::support::Maybe has_element_count() const; public: - typename ::emboss::support::GenericArrayView< + [[nodiscard]] typename ::emboss::support::GenericArrayView< typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock::template OffsetStorageType>, 32>> @@ -383,7 +359,7 @@ class GenericUIntArrayView final { 8 > elements() const; - ::emboss::support::Maybe has_elements() const; + [[nodiscard]] ::emboss::support::Maybe has_elements() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -402,17 +378,17 @@ class GenericUIntArrayView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - ::std::int64_t Read() const { + [[nodiscard]] ::std::int64_t Read() const { EMBOSS_CHECK(view_.has_IntrinsicSizeInBytes().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - ::std::int64_t UncheckedRead() const { + [[nodiscard]] ::std::int64_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - bool Ok() const { + [[nodiscard]] bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -425,12 +401,12 @@ class GenericUIntArrayView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } private: - ::emboss::support::Maybe MaybeRead() const { + [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.element_count(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Product(::emboss::support::Maybe(static_cast(4LL)), emboss_reserved_local_subexpr_2); @@ -441,7 +417,7 @@ class GenericUIntArrayView final { return emboss_reserved_local_subexpr_6; } - static constexpr bool ValueIsOk( + [[nodiscard]] static constexpr bool ValueIsOk( ::std::int64_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -449,8 +425,8 @@ class GenericUIntArrayView final { const GenericUIntArrayView view_; }; - EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; - ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; + [[nodiscard]] EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + [[nodiscard]] ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; public: class EmbossReservedDollarVirtualMaxSizeInBytesView final { @@ -466,9 +442,9 @@ class GenericUIntArrayView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - static constexpr ::std::int64_t Read(); - static constexpr ::std::int64_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int64_t Read(); + [[nodiscard]] static constexpr ::std::int64_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -477,13 +453,13 @@ class GenericUIntArrayView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -501,9 +477,9 @@ class GenericUIntArrayView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -512,13 +488,13 @@ class GenericUIntArrayView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -549,7 +525,7 @@ struct EmbossReservedInternalIsGenericUIntArrayView< }; template -inline GenericUIntArrayView< +[[nodiscard]] inline GenericUIntArrayView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -564,7 +540,7 @@ MakeUIntArrayView( T &&emboss_reserved_local_arg) { } template -inline GenericUIntArrayView> +[[nodiscard]] inline GenericUIntArrayView> MakeUIntArrayView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericUIntArrayView>( @@ -573,7 +549,7 @@ MakeUIntArrayView( T *emboss_reserved_local_data, } template -inline GenericUIntArrayView< +[[nodiscard]] inline GenericUIntArrayView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedUIntArrayView( T *emboss_reserved_local_data, diff --git a/testdata/golden_cpp/nested_structure.emb.h b/testdata/golden_cpp/nested_structure.emb.h index 9da33ea..2b37ffd 100644 --- a/testdata/golden_cpp/nested_structure.emb.h +++ b/testdata/golden_cpp/nested_structure.emb.h @@ -105,72 +105,42 @@ class GenericContainerView final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !weight().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !important_box().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !other_box().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!weight().Ok()) return false; + if (!important_box().Ok()) return false; + if (!other_box().Ok()) return false; + if (!IntrinsicSizeInBytes().Ok()) return false; + if (!MaxSizeInBytes().Ok()) return false; + if (!MinSizeInBytes().Ok()) return false; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - static constexpr ::std::size_t SizeInBytes() { + [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - static constexpr bool SizeIsKnown() { + [[nodiscard]] static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericContainerView emboss_reserved_local_other) const { if (!has_weight().Known()) return false; @@ -225,7 +195,7 @@ class GenericContainerView final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericContainerView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_weight().ValueOr(false) && @@ -286,7 +256,7 @@ class GenericContainerView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericContainerView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -457,27 +427,27 @@ class GenericContainerView final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 32>> weight() const; - ::emboss::support::Maybe has_weight() const; + [[nodiscard]] ::emboss::support::Maybe has_weight() const; public: - typename ::emboss::test::GenericBoxView> + [[nodiscard]] typename ::emboss::test::GenericBoxView> important_box() const; - ::emboss::support::Maybe has_important_box() const; + [[nodiscard]] ::emboss::support::Maybe has_important_box() const; public: - typename ::emboss::test::GenericBoxView> + [[nodiscard]] typename ::emboss::test::GenericBoxView> other_box() const; - ::emboss::support::Maybe has_other_box() const; + [[nodiscard]] ::emboss::support::Maybe has_other_box() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -493,9 +463,9 @@ class GenericContainerView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -504,13 +474,13 @@ class GenericContainerView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -528,9 +498,9 @@ class GenericContainerView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -539,13 +509,13 @@ class GenericContainerView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -563,9 +533,9 @@ class GenericContainerView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -574,13 +544,13 @@ class GenericContainerView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -611,7 +581,7 @@ struct EmbossReservedInternalIsGenericContainerView< }; template -inline GenericContainerView< +[[nodiscard]] inline GenericContainerView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -626,7 +596,7 @@ MakeContainerView( T &&emboss_reserved_local_arg) { } template -inline GenericContainerView> +[[nodiscard]] inline GenericContainerView> MakeContainerView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericContainerView>( @@ -635,7 +605,7 @@ MakeContainerView( T *emboss_reserved_local_data, } template -inline GenericContainerView< +[[nodiscard]] inline GenericContainerView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedContainerView( T *emboss_reserved_local_data, @@ -701,65 +671,41 @@ class GenericBoxView final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !id().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !count().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!id().Ok()) return false; + if (!count().Ok()) return false; + if (!IntrinsicSizeInBytes().Ok()) return false; + if (!MaxSizeInBytes().Ok()) return false; + if (!MinSizeInBytes().Ok()) return false; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - static constexpr ::std::size_t SizeInBytes() { + [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - static constexpr bool SizeIsKnown() { + [[nodiscard]] static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericBoxView emboss_reserved_local_other) const { if (!has_id().Known()) return false; @@ -797,7 +743,7 @@ class GenericBoxView final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericBoxView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_id().ValueOr(false) && @@ -844,7 +790,7 @@ class GenericBoxView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericBoxView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -977,23 +923,23 @@ class GenericBoxView final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 32>> id() const; - ::emboss::support::Maybe has_id() const; + [[nodiscard]] ::emboss::support::Maybe has_id() const; public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 32>> count() const; - ::emboss::support::Maybe has_count() const; + [[nodiscard]] ::emboss::support::Maybe has_count() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -1009,9 +955,9 @@ class GenericBoxView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -1020,13 +966,13 @@ class GenericBoxView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -1044,9 +990,9 @@ class GenericBoxView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -1055,13 +1001,13 @@ class GenericBoxView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -1079,9 +1025,9 @@ class GenericBoxView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -1090,13 +1036,13 @@ class GenericBoxView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -1127,7 +1073,7 @@ struct EmbossReservedInternalIsGenericBoxView< }; template -inline GenericBoxView< +[[nodiscard]] inline GenericBoxView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -1142,7 +1088,7 @@ MakeBoxView( T &&emboss_reserved_local_arg) { } template -inline GenericBoxView> +[[nodiscard]] inline GenericBoxView> MakeBoxView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericBoxView>( @@ -1151,7 +1097,7 @@ MakeBoxView( T *emboss_reserved_local_data, } template -inline GenericBoxView< +[[nodiscard]] inline GenericBoxView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedBoxView( T *emboss_reserved_local_data, @@ -1217,65 +1163,41 @@ class GenericTruckView final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !id().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !cargo().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!id().Ok()) return false; + if (!cargo().Ok()) return false; + if (!IntrinsicSizeInBytes().Ok()) return false; + if (!MaxSizeInBytes().Ok()) return false; + if (!MinSizeInBytes().Ok()) return false; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - static constexpr ::std::size_t SizeInBytes() { + [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - static constexpr bool SizeIsKnown() { + [[nodiscard]] static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericTruckView emboss_reserved_local_other) const { if (!has_id().Known()) return false; @@ -1313,7 +1235,7 @@ class GenericTruckView final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericTruckView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_id().ValueOr(false) && @@ -1360,7 +1282,7 @@ class GenericTruckView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericTruckView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -1493,25 +1415,25 @@ class GenericTruckView final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 32>> id() const; - ::emboss::support::Maybe has_id() const; + [[nodiscard]] ::emboss::support::Maybe has_id() const; public: - typename ::emboss::support::GenericArrayView< + [[nodiscard]] typename ::emboss::support::GenericArrayView< typename ::emboss::test::GenericContainerView::template OffsetStorageType> , typename Storage::template OffsetStorageType, 20, 8 > cargo() const; - ::emboss::support::Maybe has_cargo() const; + [[nodiscard]] ::emboss::support::Maybe has_cargo() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -1527,9 +1449,9 @@ class GenericTruckView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -1538,13 +1460,13 @@ class GenericTruckView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -1562,9 +1484,9 @@ class GenericTruckView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -1573,13 +1495,13 @@ class GenericTruckView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -1597,9 +1519,9 @@ class GenericTruckView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -1608,13 +1530,13 @@ class GenericTruckView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -1645,7 +1567,7 @@ struct EmbossReservedInternalIsGenericTruckView< }; template -inline GenericTruckView< +[[nodiscard]] inline GenericTruckView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -1660,7 +1582,7 @@ MakeTruckView( T &&emboss_reserved_local_arg) { } template -inline GenericTruckView> +[[nodiscard]] inline GenericTruckView> MakeTruckView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericTruckView>( @@ -1669,7 +1591,7 @@ MakeTruckView( T *emboss_reserved_local_data, } template -inline GenericTruckView< +[[nodiscard]] inline GenericTruckView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedTruckView( T *emboss_reserved_local_data, diff --git a/testdata/golden_cpp/next_keyword.emb.h b/testdata/golden_cpp/next_keyword.emb.h index eb40049..a6988e3 100644 --- a/testdata/golden_cpp/next_keyword.emb.h +++ b/testdata/golden_cpp/next_keyword.emb.h @@ -90,79 +90,43 @@ class GenericNextKeywordView final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !value32().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !value16().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !value8().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !value8_offset().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!value32().Ok()) return false; + if (!value16().Ok()) return false; + if (!value8().Ok()) return false; + if (!value8_offset().Ok()) return false; + if (!IntrinsicSizeInBytes().Ok()) return false; + if (!MaxSizeInBytes().Ok()) return false; + if (!MinSizeInBytes().Ok()) return false; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - static constexpr ::std::size_t SizeInBytes() { + [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - static constexpr bool SizeIsKnown() { + [[nodiscard]] static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericNextKeywordView emboss_reserved_local_other) const { if (!has_value32().Known()) return false; @@ -234,7 +198,7 @@ class GenericNextKeywordView final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericNextKeywordView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_value32().ValueOr(false) && @@ -309,7 +273,7 @@ class GenericNextKeywordView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericNextKeywordView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -518,39 +482,39 @@ class GenericNextKeywordView final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 32>> value32() const; - ::emboss::support::Maybe has_value32() const; + [[nodiscard]] ::emboss::support::Maybe has_value32() const; public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<16, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 16>> value16() const; - ::emboss::support::Maybe has_value16() const; + [[nodiscard]] ::emboss::support::Maybe has_value16() const; public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> value8() const; - ::emboss::support::Maybe has_value8() const; + [[nodiscard]] ::emboss::support::Maybe has_value8() const; public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> value8_offset() const; - ::emboss::support::Maybe has_value8_offset() const; + [[nodiscard]] ::emboss::support::Maybe has_value8_offset() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -566,9 +530,9 @@ class GenericNextKeywordView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -577,13 +541,13 @@ class GenericNextKeywordView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -601,9 +565,9 @@ class GenericNextKeywordView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -612,13 +576,13 @@ class GenericNextKeywordView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -636,9 +600,9 @@ class GenericNextKeywordView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -647,13 +611,13 @@ class GenericNextKeywordView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -684,7 +648,7 @@ struct EmbossReservedInternalIsGenericNextKeywordView< }; template -inline GenericNextKeywordView< +[[nodiscard]] inline GenericNextKeywordView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -699,7 +663,7 @@ MakeNextKeywordView( T &&emboss_reserved_local_arg) { } template -inline GenericNextKeywordView> +[[nodiscard]] inline GenericNextKeywordView> MakeNextKeywordView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericNextKeywordView>( @@ -708,7 +672,7 @@ MakeNextKeywordView( T *emboss_reserved_local_data, } template -inline GenericNextKeywordView< +[[nodiscard]] inline GenericNextKeywordView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedNextKeywordView( T *emboss_reserved_local_data, diff --git a/testdata/golden_cpp/no_enum_traits.emb.h b/testdata/golden_cpp/no_enum_traits.emb.h index c0aaafa..0c3b29f 100644 --- a/testdata/golden_cpp/no_enum_traits.emb.h +++ b/testdata/golden_cpp/no_enum_traits.emb.h @@ -89,58 +89,40 @@ class GenericBarView final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !foo().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!foo().Ok()) return false; + if (!IntrinsicSizeInBytes().Ok()) return false; + if (!MaxSizeInBytes().Ok()) return false; + if (!MinSizeInBytes().Ok()) return false; + } } - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; - } - - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - static constexpr ::std::size_t SizeInBytes() { + [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - static constexpr bool SizeIsKnown() { + [[nodiscard]] static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericBarView emboss_reserved_local_other) const { if (!has_foo().Known()) return false; @@ -161,7 +143,7 @@ class GenericBarView final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericBarView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_foo().ValueOr(false) && @@ -194,7 +176,7 @@ class GenericBarView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericBarView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -203,16 +185,16 @@ class GenericBarView final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: - typename ::emboss::support::EnumView< + [[nodiscard]] typename ::emboss::support::EnumView< /**/ ::emboss::test::Foo, ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> foo() const; - ::emboss::support::Maybe has_foo() const; + [[nodiscard]] ::emboss::support::Maybe has_foo() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -228,9 +210,9 @@ class GenericBarView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -239,13 +221,13 @@ class GenericBarView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -263,9 +245,9 @@ class GenericBarView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -274,13 +256,13 @@ class GenericBarView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -298,9 +280,9 @@ class GenericBarView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -309,13 +291,13 @@ class GenericBarView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -346,7 +328,7 @@ struct EmbossReservedInternalIsGenericBarView< }; template -inline GenericBarView< +[[nodiscard]] inline GenericBarView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -361,7 +343,7 @@ MakeBarView( T &&emboss_reserved_local_arg) { } template -inline GenericBarView> +[[nodiscard]] inline GenericBarView> MakeBarView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericBarView>( @@ -370,7 +352,7 @@ MakeBarView( T *emboss_reserved_local_data, } template -inline GenericBarView< +[[nodiscard]] inline GenericBarView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedBarView( T *emboss_reserved_local_data, diff --git a/testdata/golden_cpp/parameters.emb.h b/testdata/golden_cpp/parameters.emb.h index b6c33ae..03e4169 100644 --- a/testdata/golden_cpp/parameters.emb.h +++ b/testdata/golden_cpp/parameters.emb.h @@ -385,79 +385,65 @@ class GenericMultiVersionView final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; if (!parameters_initialized_) return false; - const auto emboss_reserved_local_ok_subexpr_1 = message_id(); + const auto emboss_reserved_local_ok_subexpr_1 = message_id(); + const auto emboss_reserved_local_ok_subexpr_2 = (emboss_reserved_local_ok_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_ok_subexpr_3 = product(); + const auto emboss_reserved_local_ok_subexpr_4 = (emboss_reserved_local_ok_subexpr_3.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_3.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_ok_subexpr_5 = ::emboss::support::Equal(emboss_reserved_local_ok_subexpr_4, ::emboss::support::Maybe(static_cast(23))); + const auto emboss_reserved_local_ok_subexpr_6 = ::emboss::support::Equal(emboss_reserved_local_ok_subexpr_2, ::emboss::support::Maybe(static_cast(1))); + const auto emboss_reserved_local_ok_subexpr_7 = ::emboss::support::And(emboss_reserved_local_ok_subexpr_5, emboss_reserved_local_ok_subexpr_6); { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !message_id().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Equal((emboss_reserved_local_ok_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(0))); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !axes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Equal((emboss_reserved_local_ok_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(1))); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !config().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::And(::emboss::support::Equal((product().Ok() ? ::emboss::support::Maybe(static_cast(product().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(23))), ::emboss::support::Equal((emboss_reserved_local_ok_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(1)))); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !config_vx().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!message_id().Ok()) return false; + if (!IntrinsicSizeInBytes().Ok()) return false; + if (!MaxSizeInBytes().Ok()) return false; + if (!MinSizeInBytes().Ok()) return false; + } } - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + const auto emboss_reserved_switch_discrim = emboss_reserved_local_ok_subexpr_2; + if (!emboss_reserved_switch_discrim.Known()) return false; + switch (emboss_reserved_switch_discrim.ValueOrDefault()) { + case static_cast(0): + if (!axes().Ok()) return false; + break; + case static_cast(1): + if (!config().Ok()) return false; + break; + } } - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = emboss_reserved_local_ok_subexpr_7; + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!config_vx().Ok()) return false; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - ::std::size_t SizeInBytes() const { + [[nodiscard]] ::std::size_t SizeInBytes() const { return static_cast(IntrinsicSizeInBytes().Read()); } - bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + [[nodiscard]] bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericMultiVersionView emboss_reserved_local_other) const { if (!has_product().Known()) return false; @@ -546,7 +532,7 @@ if (!parameters_initialized_) return false; return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericMultiVersionView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_product().ValueOr(false) && @@ -635,7 +621,7 @@ if (!parameters_initialized_) return false; emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericMultiVersionView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -844,46 +830,46 @@ if (!parameters_initialized_) return false; - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } private: - constexpr ::emboss::support::MaybeConstantView + [[nodiscard]] constexpr ::emboss::support::MaybeConstantView product() const { return parameters_initialized_ ? ::emboss::support::MaybeConstantView( product_) : ::emboss::support::MaybeConstantView(); } - constexpr ::emboss::support::Maybe has_product() const { + [[nodiscard]] constexpr ::emboss::support::Maybe has_product() const { return ::emboss::support::Maybe(parameters_initialized_); } public: - typename ::emboss::support::EnumView< + [[nodiscard]] typename ::emboss::support::EnumView< /**/ ::emboss::test::MessageId, ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> message_id() const; - ::emboss::support::Maybe has_message_id() const; + [[nodiscard]] ::emboss::support::Maybe has_message_id() const; public: - typename ::emboss::test::GenericAxesView> + [[nodiscard]] typename ::emboss::test::GenericAxesView> axes() const; - ::emboss::support::Maybe has_axes() const; + [[nodiscard]] ::emboss::support::Maybe has_axes() const; public: - typename ::emboss::test::GenericConfigView>, 32>> + [[nodiscard]] typename ::emboss::test::GenericConfigView>, 32>> config() const; - ::emboss::support::Maybe has_config() const; + [[nodiscard]] ::emboss::support::Maybe has_config() const; public: - typename ::emboss::test::GenericConfigVXView> + [[nodiscard]] typename ::emboss::test::GenericConfigVXView> config_vx() const; - ::emboss::support::Maybe has_config_vx() const; + [[nodiscard]] ::emboss::support::Maybe has_config_vx() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -902,17 +888,17 @@ if (!parameters_initialized_) return false; default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - ::std::int32_t Read() const { + [[nodiscard]] ::std::int32_t Read() const { EMBOSS_CHECK(view_.has_IntrinsicSizeInBytes().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - ::std::int32_t UncheckedRead() const { + [[nodiscard]] ::std::int32_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - bool Ok() const { + [[nodiscard]] bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -925,12 +911,12 @@ if (!parameters_initialized_) return false; this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } private: - ::emboss::support::Maybe MaybeRead() const { + [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.message_id(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(0))); @@ -947,7 +933,7 @@ if (!parameters_initialized_) return false; return emboss_reserved_local_subexpr_12; } - static constexpr bool ValueIsOk( + [[nodiscard]] static constexpr bool ValueIsOk( ::std::int32_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -955,8 +941,8 @@ if (!parameters_initialized_) return false; const GenericMultiVersionView view_; }; - EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; - ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; + [[nodiscard]] EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + [[nodiscard]] ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; public: class EmbossReservedDollarVirtualMaxSizeInBytesView final { @@ -972,9 +958,9 @@ if (!parameters_initialized_) return false; default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -983,13 +969,13 @@ if (!parameters_initialized_) return false; this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -1007,9 +993,9 @@ if (!parameters_initialized_) return false; default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -1018,13 +1004,13 @@ if (!parameters_initialized_) return false; this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -1055,7 +1041,7 @@ struct EmbossReservedInternalIsGenericMultiVersionView< }; template -inline GenericMultiVersionView< +[[nodiscard]] inline GenericMultiVersionView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -1070,7 +1056,7 @@ MakeMultiVersionView(::emboss::test::Product product, T &&emboss_reserved_local } template -inline GenericMultiVersionView> +[[nodiscard]] inline GenericMultiVersionView> MakeMultiVersionView(::emboss::test::Product product, T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericMultiVersionView>( @@ -1079,7 +1065,7 @@ MakeMultiVersionView(::emboss::test::Product product, T *emboss_reserved_local_ } template -inline GenericMultiVersionView< +[[nodiscard]] inline GenericMultiVersionView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedMultiVersionView( ::emboss::test::Product product, T *emboss_reserved_local_data, @@ -1149,86 +1135,66 @@ class GenericAxesView final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; if (!parameters_initialized_) return false; - const auto emboss_reserved_local_ok_subexpr_1 = axes(); - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !values().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::GreaterThan((emboss_reserved_local_ok_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(0LL))); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !x().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::GreaterThan((emboss_reserved_local_ok_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(1LL))); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !y().Ok()) return false; - } - + const auto emboss_reserved_local_ok_subexpr_1 = axes(); + const auto emboss_reserved_local_ok_subexpr_2 = (emboss_reserved_local_ok_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_ok_subexpr_3 = ::emboss::support::GreaterThan(emboss_reserved_local_ok_subexpr_2, ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_ok_subexpr_4 = ::emboss::support::GreaterThan(emboss_reserved_local_ok_subexpr_2, ::emboss::support::Maybe(static_cast(1LL))); + const auto emboss_reserved_local_ok_subexpr_5 = ::emboss::support::GreaterThan(emboss_reserved_local_ok_subexpr_2, ::emboss::support::Maybe(static_cast(2LL))); { - const auto emboss_reserved_local_field_present = ::emboss::support::GreaterThan((emboss_reserved_local_ok_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(2LL))); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !z().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !axis_count_plus_one().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!values().Ok()) return false; + if (!axis_count_plus_one().Ok()) return false; + if (!IntrinsicSizeInBytes().Ok()) return false; + if (!MaxSizeInBytes().Ok()) return false; + if (!MinSizeInBytes().Ok()) return false; + } } - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = emboss_reserved_local_ok_subexpr_3; + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!x().Ok()) return false; + } } - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = emboss_reserved_local_ok_subexpr_4; + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!y().Ok()) return false; + } } - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = emboss_reserved_local_ok_subexpr_5; + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!z().Ok()) return false; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - ::std::size_t SizeInBytes() const { + [[nodiscard]] ::std::size_t SizeInBytes() const { return static_cast(IntrinsicSizeInBytes().Read()); } - bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + [[nodiscard]] bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericAxesView emboss_reserved_local_other) const { if (!has_axes().Known()) return false; @@ -1317,7 +1283,7 @@ if (!parameters_initialized_) return false; return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericAxesView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_axes().ValueOr(false) && @@ -1406,7 +1372,7 @@ if (!parameters_initialized_) return false; emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericAxesView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -1634,47 +1600,47 @@ if (!parameters_initialized_) return false; - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } private: - constexpr ::emboss::support::MaybeConstantView + [[nodiscard]] constexpr ::emboss::support::MaybeConstantView axes() const { return parameters_initialized_ ? ::emboss::support::MaybeConstantView( axes_) : ::emboss::support::MaybeConstantView(); } - constexpr ::emboss::support::Maybe has_axes() const { + [[nodiscard]] constexpr ::emboss::support::Maybe has_axes() const { return ::emboss::support::Maybe(parameters_initialized_); } public: - typename ::emboss::support::GenericArrayView< + [[nodiscard]] typename ::emboss::support::GenericArrayView< typename ::emboss::test::GenericAxisView::template OffsetStorageType> , typename Storage::template OffsetStorageType, 4, 8 , ::emboss::test::AxisType> values() const; - ::emboss::support::Maybe has_values() const; + [[nodiscard]] ::emboss::support::Maybe has_values() const; public: - typename ::emboss::test::GenericAxisView> + [[nodiscard]] typename ::emboss::test::GenericAxisView> x() const; - ::emboss::support::Maybe has_x() const; + [[nodiscard]] ::emboss::support::Maybe has_x() const; public: - typename ::emboss::test::GenericAxisView> + [[nodiscard]] typename ::emboss::test::GenericAxisView> y() const; - ::emboss::support::Maybe has_y() const; + [[nodiscard]] ::emboss::support::Maybe has_y() const; public: - typename ::emboss::test::GenericAxisView> + [[nodiscard]] typename ::emboss::test::GenericAxisView> z() const; - ::emboss::support::Maybe has_z() const; + [[nodiscard]] ::emboss::support::Maybe has_z() const; public: class EmbossReservedVirtualAxisCountPlusOneView final { @@ -1693,17 +1659,17 @@ if (!parameters_initialized_) return false; default; ~EmbossReservedVirtualAxisCountPlusOneView() = default; - ::std::int32_t Read() const { + [[nodiscard]] ::std::int32_t Read() const { EMBOSS_CHECK(view_.has_axis_count_plus_one().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - ::std::int32_t UncheckedRead() const { + [[nodiscard]] ::std::int32_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - bool Ok() const { + [[nodiscard]] bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -1716,12 +1682,12 @@ if (!parameters_initialized_) return false; this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } private: - ::emboss::support::Maybe MaybeRead() const { + [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.axes(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Sum(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(1LL))); @@ -1729,7 +1695,7 @@ if (!parameters_initialized_) return false; return emboss_reserved_local_subexpr_3; } - static constexpr bool ValueIsOk( + [[nodiscard]] static constexpr bool ValueIsOk( ::std::int32_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -1737,8 +1703,8 @@ if (!parameters_initialized_) return false; const GenericAxesView view_; }; - EmbossReservedVirtualAxisCountPlusOneView axis_count_plus_one() const; - ::emboss::support::Maybe has_axis_count_plus_one() const; + [[nodiscard]] EmbossReservedVirtualAxisCountPlusOneView axis_count_plus_one() const; + [[nodiscard]] ::emboss::support::Maybe has_axis_count_plus_one() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -1757,17 +1723,17 @@ if (!parameters_initialized_) return false; default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - ::std::int32_t Read() const { + [[nodiscard]] ::std::int32_t Read() const { EMBOSS_CHECK(view_.has_IntrinsicSizeInBytes().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - ::std::int32_t UncheckedRead() const { + [[nodiscard]] ::std::int32_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - bool Ok() const { + [[nodiscard]] bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -1780,12 +1746,12 @@ if (!parameters_initialized_) return false; this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } private: - ::emboss::support::Maybe MaybeRead() const { + [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.axes(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Product(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(4LL))); @@ -1802,7 +1768,7 @@ if (!parameters_initialized_) return false; return emboss_reserved_local_subexpr_12; } - static constexpr bool ValueIsOk( + [[nodiscard]] static constexpr bool ValueIsOk( ::std::int32_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -1810,8 +1776,8 @@ if (!parameters_initialized_) return false; const GenericAxesView view_; }; - EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; - ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; + [[nodiscard]] EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + [[nodiscard]] ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; public: class EmbossReservedDollarVirtualMaxSizeInBytesView final { @@ -1827,9 +1793,9 @@ if (!parameters_initialized_) return false; default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -1838,13 +1804,13 @@ if (!parameters_initialized_) return false; this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -1862,9 +1828,9 @@ if (!parameters_initialized_) return false; default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -1873,13 +1839,13 @@ if (!parameters_initialized_) return false; this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -1910,7 +1876,7 @@ struct EmbossReservedInternalIsGenericAxesView< }; template -inline GenericAxesView< +[[nodiscard]] inline GenericAxesView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -1925,7 +1891,7 @@ MakeAxesView(::std::int32_t axes, T &&emboss_reserved_local_arg) { } template -inline GenericAxesView> +[[nodiscard]] inline GenericAxesView> MakeAxesView(::std::int32_t axes, T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericAxesView>( @@ -1934,7 +1900,7 @@ MakeAxesView(::std::int32_t axes, T *emboss_reserved_local_data, } template -inline GenericAxesView< +[[nodiscard]] inline GenericAxesView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedAxesView( ::std::int32_t axes, T *emboss_reserved_local_data, @@ -2007,79 +1973,43 @@ class GenericAxisPairView final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; if (!parameters_initialized_) return false; { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !axis_type_a().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !axis_a().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !axis_type_b().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !axis_b().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!axis_type_a().Ok()) return false; + if (!axis_a().Ok()) return false; + if (!axis_type_b().Ok()) return false; + if (!axis_b().Ok()) return false; + if (!IntrinsicSizeInBytes().Ok()) return false; + if (!MaxSizeInBytes().Ok()) return false; + if (!MinSizeInBytes().Ok()) return false; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - static constexpr ::std::size_t SizeInBytes() { + [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - static constexpr bool SizeIsKnown() { + [[nodiscard]] static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericAxisPairView emboss_reserved_local_other) const { if (!has_axis_type_a_parameter().Known()) return false; @@ -2151,7 +2081,7 @@ if (!parameters_initialized_) return false; return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericAxisPairView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_axis_type_a_parameter().ValueOr(false) && @@ -2226,7 +2156,7 @@ if (!parameters_initialized_) return false; emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericAxisPairView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -2397,29 +2327,29 @@ if (!parameters_initialized_) return false; - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } private: - constexpr ::emboss::support::MaybeConstantView + [[nodiscard]] constexpr ::emboss::support::MaybeConstantView axis_type_a_parameter() const { return parameters_initialized_ ? ::emboss::support::MaybeConstantView( axis_type_a_parameter_) : ::emboss::support::MaybeConstantView(); } - constexpr ::emboss::support::Maybe has_axis_type_a_parameter() const { + [[nodiscard]] constexpr ::emboss::support::Maybe has_axis_type_a_parameter() const { return ::emboss::support::Maybe(parameters_initialized_); } private: - constexpr ::emboss::support::MaybeConstantView + [[nodiscard]] constexpr ::emboss::support::MaybeConstantView axis_type_b_parameter() const { return parameters_initialized_ ? ::emboss::support::MaybeConstantView( axis_type_b_parameter_) : ::emboss::support::MaybeConstantView(); } - constexpr ::emboss::support::Maybe has_axis_type_b_parameter() const { + [[nodiscard]] constexpr ::emboss::support::Maybe has_axis_type_b_parameter() const { return ::emboss::support::Maybe(parameters_initialized_); } @@ -2440,17 +2370,17 @@ if (!parameters_initialized_) return false; default; ~EmbossReservedVirtualAxisTypeAView() = default; - ::emboss::test::AxisType Read() const { + [[nodiscard]] ::emboss::test::AxisType Read() const { EMBOSS_CHECK(view_.has_axis_type_a().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - ::emboss::test::AxisType UncheckedRead() const { + [[nodiscard]] ::emboss::test::AxisType UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - bool Ok() const { + [[nodiscard]] bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -2463,19 +2393,19 @@ if (!parameters_initialized_) return false; this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } private: - ::emboss::support::Maybe MaybeRead() const { + [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.axis_type_a_parameter(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); return emboss_reserved_local_subexpr_2; } - static constexpr bool ValueIsOk( + [[nodiscard]] static constexpr bool ValueIsOk( ::emboss::test::AxisType emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -2483,14 +2413,14 @@ if (!parameters_initialized_) return false; const GenericAxisPairView view_; }; - EmbossReservedVirtualAxisTypeAView axis_type_a() const; - ::emboss::support::Maybe has_axis_type_a() const; + [[nodiscard]] EmbossReservedVirtualAxisTypeAView axis_type_a() const; + [[nodiscard]] ::emboss::support::Maybe has_axis_type_a() const; public: - typename ::emboss::test::GenericAxisView> + [[nodiscard]] typename ::emboss::test::GenericAxisView> axis_a() const; - ::emboss::support::Maybe has_axis_a() const; + [[nodiscard]] ::emboss::support::Maybe has_axis_a() const; public: class EmbossReservedVirtualAxisTypeBView final { @@ -2509,17 +2439,17 @@ if (!parameters_initialized_) return false; default; ~EmbossReservedVirtualAxisTypeBView() = default; - ::emboss::test::AxisType Read() const { + [[nodiscard]] ::emboss::test::AxisType Read() const { EMBOSS_CHECK(view_.has_axis_type_b().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - ::emboss::test::AxisType UncheckedRead() const { + [[nodiscard]] ::emboss::test::AxisType UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - bool Ok() const { + [[nodiscard]] bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -2532,19 +2462,19 @@ if (!parameters_initialized_) return false; this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } private: - ::emboss::support::Maybe MaybeRead() const { + [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.axis_type_b_parameter(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); return emboss_reserved_local_subexpr_2; } - static constexpr bool ValueIsOk( + [[nodiscard]] static constexpr bool ValueIsOk( ::emboss::test::AxisType emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -2552,14 +2482,14 @@ if (!parameters_initialized_) return false; const GenericAxisPairView view_; }; - EmbossReservedVirtualAxisTypeBView axis_type_b() const; - ::emboss::support::Maybe has_axis_type_b() const; + [[nodiscard]] EmbossReservedVirtualAxisTypeBView axis_type_b() const; + [[nodiscard]] ::emboss::support::Maybe has_axis_type_b() const; public: - typename ::emboss::test::GenericAxisView> + [[nodiscard]] typename ::emboss::test::GenericAxisView> axis_b() const; - ::emboss::support::Maybe has_axis_b() const; + [[nodiscard]] ::emboss::support::Maybe has_axis_b() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -2575,9 +2505,9 @@ if (!parameters_initialized_) return false; default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -2586,13 +2516,13 @@ if (!parameters_initialized_) return false; this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -2610,9 +2540,9 @@ if (!parameters_initialized_) return false; default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -2621,13 +2551,13 @@ if (!parameters_initialized_) return false; this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -2645,9 +2575,9 @@ if (!parameters_initialized_) return false; default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -2656,13 +2586,13 @@ if (!parameters_initialized_) return false; this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -2694,7 +2624,7 @@ struct EmbossReservedInternalIsGenericAxisPairView< }; template -inline GenericAxisPairView< +[[nodiscard]] inline GenericAxisPairView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -2709,7 +2639,7 @@ MakeAxisPairView(::emboss::test::AxisType axis_type_a_parameter, ::emboss::test: } template -inline GenericAxisPairView> +[[nodiscard]] inline GenericAxisPairView> MakeAxisPairView(::emboss::test::AxisType axis_type_a_parameter, ::emboss::test::AxisType axis_type_b_parameter, T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericAxisPairView>( @@ -2718,7 +2648,7 @@ MakeAxisPairView(::emboss::test::AxisType axis_type_a_parameter, ::emboss::test: } template -inline GenericAxisPairView< +[[nodiscard]] inline GenericAxisPairView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedAxisPairView( ::emboss::test::AxisType axis_type_a_parameter, ::emboss::test::AxisType axis_type_b_parameter, T *emboss_reserved_local_data, @@ -2784,64 +2714,40 @@ class GenericAxesEnvelopeView final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !axis_count().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !axes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!axis_count().Ok()) return false; + if (!axes().Ok()) return false; + if (!IntrinsicSizeInBytes().Ok()) return false; + if (!MaxSizeInBytes().Ok()) return false; + if (!MinSizeInBytes().Ok()) return false; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - ::std::size_t SizeInBytes() const { + [[nodiscard]] ::std::size_t SizeInBytes() const { return static_cast(IntrinsicSizeInBytes().Read()); } - bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + [[nodiscard]] bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericAxesEnvelopeView emboss_reserved_local_other) const { if (!has_axis_count().Known()) return false; @@ -2879,7 +2785,7 @@ class GenericAxesEnvelopeView final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericAxesEnvelopeView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_axis_count().ValueOr(false) && @@ -2926,7 +2832,7 @@ class GenericAxesEnvelopeView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericAxesEnvelopeView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -3059,21 +2965,21 @@ class GenericAxesEnvelopeView final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> axis_count() const; - ::emboss::support::Maybe has_axis_count() const; + [[nodiscard]] ::emboss::support::Maybe has_axis_count() const; public: - typename ::emboss::test::GenericAxesView> + [[nodiscard]] typename ::emboss::test::GenericAxesView> axes() const; - ::emboss::support::Maybe has_axes() const; + [[nodiscard]] ::emboss::support::Maybe has_axes() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -3092,17 +2998,17 @@ class GenericAxesEnvelopeView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - ::std::int32_t Read() const { + [[nodiscard]] ::std::int32_t Read() const { EMBOSS_CHECK(view_.has_IntrinsicSizeInBytes().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - ::std::int32_t UncheckedRead() const { + [[nodiscard]] ::std::int32_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - bool Ok() const { + [[nodiscard]] bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -3115,12 +3021,12 @@ class GenericAxesEnvelopeView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } private: - ::emboss::support::Maybe MaybeRead() const { + [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.axis_count(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Product(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(4LL))); @@ -3131,7 +3037,7 @@ class GenericAxesEnvelopeView final { return emboss_reserved_local_subexpr_6; } - static constexpr bool ValueIsOk( + [[nodiscard]] static constexpr bool ValueIsOk( ::std::int32_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -3139,8 +3045,8 @@ class GenericAxesEnvelopeView final { const GenericAxesEnvelopeView view_; }; - EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; - ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; + [[nodiscard]] EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + [[nodiscard]] ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; public: class EmbossReservedDollarVirtualMaxSizeInBytesView final { @@ -3156,9 +3062,9 @@ class GenericAxesEnvelopeView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -3167,13 +3073,13 @@ class GenericAxesEnvelopeView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -3191,9 +3097,9 @@ class GenericAxesEnvelopeView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -3202,13 +3108,13 @@ class GenericAxesEnvelopeView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -3239,7 +3145,7 @@ struct EmbossReservedInternalIsGenericAxesEnvelopeView< }; template -inline GenericAxesEnvelopeView< +[[nodiscard]] inline GenericAxesEnvelopeView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -3254,7 +3160,7 @@ MakeAxesEnvelopeView( T &&emboss_reserved_local_arg) { } template -inline GenericAxesEnvelopeView> +[[nodiscard]] inline GenericAxesEnvelopeView> MakeAxesEnvelopeView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericAxesEnvelopeView>( @@ -3263,7 +3169,7 @@ MakeAxesEnvelopeView( T *emboss_reserved_local_data, } template -inline GenericAxesEnvelopeView< +[[nodiscard]] inline GenericAxesEnvelopeView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedAxesEnvelopeView( T *emboss_reserved_local_data, @@ -3440,87 +3346,58 @@ class GenericAxisView final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; if (!parameters_initialized_) return false; - const auto emboss_reserved_local_ok_subexpr_1 = axis_type(); - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !value().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !axis_type().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Equal((emboss_reserved_local_ok_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(1))); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !x().Ok()) return false; - } - + const auto emboss_reserved_local_ok_subexpr_1 = axis_type(); + const auto emboss_reserved_local_ok_subexpr_2 = (emboss_reserved_local_ok_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); { - const auto emboss_reserved_local_field_present = ::emboss::support::Equal((emboss_reserved_local_ok_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(2))); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !y().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Equal((emboss_reserved_local_ok_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(3))); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !z().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!value().Ok()) return false; + if (!axis_type().Ok()) return false; + if (!IntrinsicSizeInBytes().Ok()) return false; + if (!MaxSizeInBytes().Ok()) return false; + if (!MinSizeInBytes().Ok()) return false; + } } - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + const auto emboss_reserved_switch_discrim = emboss_reserved_local_ok_subexpr_2; + if (!emboss_reserved_switch_discrim.Known()) return false; + switch (emboss_reserved_switch_discrim.ValueOrDefault()) { + case static_cast(1): + if (!x().Ok()) return false; + break; + case static_cast(2): + if (!y().Ok()) return false; + break; + case static_cast(3): + if (!z().Ok()) return false; + break; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - static constexpr ::std::size_t SizeInBytes() { + [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - static constexpr bool SizeIsKnown() { + [[nodiscard]] static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericAxisView emboss_reserved_local_other) const { if (!has_axis_type_parameter().Known()) return false; @@ -3609,7 +3486,7 @@ if (!parameters_initialized_) return false; return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericAxisView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_axis_type_parameter().ValueOr(false) && @@ -3698,7 +3575,7 @@ if (!parameters_initialized_) return false; emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericAxisView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -3926,27 +3803,27 @@ if (!parameters_initialized_) return false; - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } private: - constexpr ::emboss::support::MaybeConstantView + [[nodiscard]] constexpr ::emboss::support::MaybeConstantView axis_type_parameter() const { return parameters_initialized_ ? ::emboss::support::MaybeConstantView( axis_type_parameter_) : ::emboss::support::MaybeConstantView(); } - constexpr ::emboss::support::Maybe has_axis_type_parameter() const { + [[nodiscard]] constexpr ::emboss::support::Maybe has_axis_type_parameter() const { return ::emboss::support::Maybe(parameters_initialized_); } public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 32>> value() const; - ::emboss::support::Maybe has_value() const; + [[nodiscard]] ::emboss::support::Maybe has_value() const; public: class EmbossReservedVirtualAxisTypeView final { @@ -3965,17 +3842,17 @@ if (!parameters_initialized_) return false; default; ~EmbossReservedVirtualAxisTypeView() = default; - ::emboss::test::AxisType Read() const { + [[nodiscard]] ::emboss::test::AxisType Read() const { EMBOSS_CHECK(view_.has_axis_type().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - ::emboss::test::AxisType UncheckedRead() const { + [[nodiscard]] ::emboss::test::AxisType UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - bool Ok() const { + [[nodiscard]] bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -3988,19 +3865,19 @@ if (!parameters_initialized_) return false; this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } private: - ::emboss::support::Maybe MaybeRead() const { + [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.axis_type_parameter(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); return emboss_reserved_local_subexpr_2; } - static constexpr bool ValueIsOk( + [[nodiscard]] static constexpr bool ValueIsOk( ::emboss::test::AxisType emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -4008,32 +3885,32 @@ if (!parameters_initialized_) return false; const GenericAxisView view_; }; - EmbossReservedVirtualAxisTypeView axis_type() const; - ::emboss::support::Maybe has_axis_type() const; + [[nodiscard]] EmbossReservedVirtualAxisTypeView axis_type() const; + [[nodiscard]] ::emboss::support::Maybe has_axis_type() const; public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 32>> x() const; - ::emboss::support::Maybe has_x() const; + [[nodiscard]] ::emboss::support::Maybe has_x() const; public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 32>> y() const; - ::emboss::support::Maybe has_y() const; + [[nodiscard]] ::emboss::support::Maybe has_y() const; public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 32>> z() const; - ::emboss::support::Maybe has_z() const; + [[nodiscard]] ::emboss::support::Maybe has_z() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -4049,9 +3926,9 @@ if (!parameters_initialized_) return false; default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -4060,13 +3937,13 @@ if (!parameters_initialized_) return false; this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -4084,9 +3961,9 @@ if (!parameters_initialized_) return false; default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -4095,13 +3972,13 @@ if (!parameters_initialized_) return false; this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -4119,9 +3996,9 @@ if (!parameters_initialized_) return false; default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -4130,13 +4007,13 @@ if (!parameters_initialized_) return false; this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -4167,7 +4044,7 @@ struct EmbossReservedInternalIsGenericAxisView< }; template -inline GenericAxisView< +[[nodiscard]] inline GenericAxisView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -4182,7 +4059,7 @@ MakeAxisView(::emboss::test::AxisType axis_type_parameter, T &&emboss_reserved_ } template -inline GenericAxisView> +[[nodiscard]] inline GenericAxisView> MakeAxisView(::emboss::test::AxisType axis_type_parameter, T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericAxisView>( @@ -4191,7 +4068,7 @@ MakeAxisView(::emboss::test::AxisType axis_type_parameter, T *emboss_reserved_l } template -inline GenericAxisView< +[[nodiscard]] inline GenericAxisView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedAxisView( ::emboss::test::AxisType axis_type_parameter, T *emboss_reserved_local_data, @@ -4256,58 +4133,40 @@ class GenericConfigView final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !power().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBits().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBits().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBits().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!power().Ok()) return false; + if (!IntrinsicSizeInBits().Ok()) return false; + if (!MaxSizeInBits().Ok()) return false; + if (!MinSizeInBits().Ok()) return false; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBits().Ok() && backing_.SizeInBits() >= static_cast( IntrinsicSizeInBits().UncheckedRead()); } - static constexpr ::std::size_t SizeInBits() { + [[nodiscard]] static constexpr ::std::size_t SizeInBits() { return static_cast(IntrinsicSizeInBits().Read()); } - static constexpr bool SizeIsKnown() { + [[nodiscard]] static constexpr bool SizeIsKnown() { return IntrinsicSizeInBits().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericConfigView emboss_reserved_local_other) const { if (!has_power().Known()) return false; @@ -4328,7 +4187,7 @@ class GenericConfigView final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericConfigView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_power().ValueOr(false) && @@ -4361,7 +4220,7 @@ class GenericConfigView final { emboss_reserved_local_other.IntrinsicSizeInBits().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericConfigView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -4456,15 +4315,15 @@ class GenericConfigView final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: - typename ::emboss::prelude::FlagView< + [[nodiscard]] typename ::emboss::prelude::FlagView< /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, typename Storage::template OffsetStorageType> power() const; - ::emboss::support::Maybe has_power() const; + [[nodiscard]] ::emboss::support::Maybe has_power() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBitsView final { @@ -4480,9 +4339,9 @@ class GenericConfigView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBitsView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -4491,13 +4350,13 @@ class GenericConfigView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBitsView IntrinsicSizeInBits() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBitsView IntrinsicSizeInBits() { return EmbossReservedDollarVirtualIntrinsicSizeInBitsView(); } - static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBits() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBits() { return ::emboss::support::Maybe(true); } @@ -4515,9 +4374,9 @@ class GenericConfigView final { default; ~EmbossReservedDollarVirtualMaxSizeInBitsView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -4526,13 +4385,13 @@ class GenericConfigView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBitsView MaxSizeInBits() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBitsView MaxSizeInBits() { return EmbossReservedDollarVirtualMaxSizeInBitsView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBits() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBits() { return ::emboss::support::Maybe(true); } @@ -4550,9 +4409,9 @@ class GenericConfigView final { default; ~EmbossReservedDollarVirtualMinSizeInBitsView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -4561,13 +4420,13 @@ class GenericConfigView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBitsView MinSizeInBits() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBitsView MinSizeInBits() { return EmbossReservedDollarVirtualMinSizeInBitsView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBits() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBits() { return ::emboss::support::Maybe(true); } @@ -4598,7 +4457,7 @@ struct EmbossReservedInternalIsGenericConfigView< }; template -inline GenericConfigView< +[[nodiscard]] inline GenericConfigView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -4613,7 +4472,7 @@ MakeConfigView( T &&emboss_reserved_local_arg) { } template -inline GenericConfigView> +[[nodiscard]] inline GenericConfigView> MakeConfigView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericConfigView>( @@ -4622,7 +4481,7 @@ MakeConfigView( T *emboss_reserved_local_data, } template -inline GenericConfigView< +[[nodiscard]] inline GenericConfigView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedConfigView( T *emboss_reserved_local_data, @@ -4693,58 +4552,40 @@ class GenericEmbossReservedAnonymousField1View final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !power().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBits().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBits().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBits().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!power().Ok()) return false; + if (!IntrinsicSizeInBits().Ok()) return false; + if (!MaxSizeInBits().Ok()) return false; + if (!MinSizeInBits().Ok()) return false; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBits().Ok() && backing_.SizeInBits() >= static_cast( IntrinsicSizeInBits().UncheckedRead()); } - static constexpr ::std::size_t SizeInBits() { + [[nodiscard]] static constexpr ::std::size_t SizeInBits() { return static_cast(IntrinsicSizeInBits().Read()); } - static constexpr bool SizeIsKnown() { + [[nodiscard]] static constexpr bool SizeIsKnown() { return IntrinsicSizeInBits().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericEmbossReservedAnonymousField1View emboss_reserved_local_other) const { if (!has_power().Known()) return false; @@ -4765,7 +4606,7 @@ class GenericEmbossReservedAnonymousField1View final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericEmbossReservedAnonymousField1View emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_power().ValueOr(false) && @@ -4798,7 +4639,7 @@ class GenericEmbossReservedAnonymousField1View final { emboss_reserved_local_other.IntrinsicSizeInBits().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericEmbossReservedAnonymousField1View emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -4893,15 +4734,15 @@ class GenericEmbossReservedAnonymousField1View final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: - typename ::emboss::prelude::FlagView< + [[nodiscard]] typename ::emboss::prelude::FlagView< /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, typename Storage::template OffsetStorageType> power() const; - ::emboss::support::Maybe has_power() const; + [[nodiscard]] ::emboss::support::Maybe has_power() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBitsView final { @@ -4917,9 +4758,9 @@ class GenericEmbossReservedAnonymousField1View final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBitsView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -4928,13 +4769,13 @@ class GenericEmbossReservedAnonymousField1View final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBitsView IntrinsicSizeInBits() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBitsView IntrinsicSizeInBits() { return EmbossReservedDollarVirtualIntrinsicSizeInBitsView(); } - static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBits() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBits() { return ::emboss::support::Maybe(true); } @@ -4952,9 +4793,9 @@ class GenericEmbossReservedAnonymousField1View final { default; ~EmbossReservedDollarVirtualMaxSizeInBitsView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -4963,13 +4804,13 @@ class GenericEmbossReservedAnonymousField1View final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBitsView MaxSizeInBits() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBitsView MaxSizeInBits() { return EmbossReservedDollarVirtualMaxSizeInBitsView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBits() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBits() { return ::emboss::support::Maybe(true); } @@ -4987,9 +4828,9 @@ class GenericEmbossReservedAnonymousField1View final { default; ~EmbossReservedDollarVirtualMinSizeInBitsView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -4998,13 +4839,13 @@ class GenericEmbossReservedAnonymousField1View final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBitsView MinSizeInBits() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBitsView MinSizeInBits() { return EmbossReservedDollarVirtualMinSizeInBitsView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBits() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBits() { return ::emboss::support::Maybe(true); } @@ -5035,7 +4876,7 @@ struct EmbossReservedInternalIsGenericEmbossReservedAnonymousField1View< }; template -inline GenericEmbossReservedAnonymousField1View< +[[nodiscard]] inline GenericEmbossReservedAnonymousField1View< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -5050,7 +4891,7 @@ MakeEmbossReservedAnonymousField1View( T &&emboss_reserved_local_arg) { } template -inline GenericEmbossReservedAnonymousField1View> +[[nodiscard]] inline GenericEmbossReservedAnonymousField1View> MakeEmbossReservedAnonymousField1View( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericEmbossReservedAnonymousField1View>( @@ -5059,7 +4900,7 @@ MakeEmbossReservedAnonymousField1View( T *emboss_reserved_local_data, } template -inline GenericEmbossReservedAnonymousField1View< +[[nodiscard]] inline GenericEmbossReservedAnonymousField1View< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedEmbossReservedAnonymousField1View( T *emboss_reserved_local_data, @@ -5120,72 +4961,49 @@ class GenericConfigVXView final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; + const auto emboss_reserved_local_ok_subexpr_1 = ::emboss::support::And(::emboss::support::Maybe(true), ::emboss::support::Maybe(true)); { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !emboss_reserved_anonymous_field_1().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::And(::emboss::support::Maybe(true), ::emboss::support::Maybe(true)); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !power().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !gain().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!emboss_reserved_anonymous_field_1().Ok()) return false; + if (!gain().Ok()) return false; + if (!IntrinsicSizeInBytes().Ok()) return false; + if (!MaxSizeInBytes().Ok()) return false; + if (!MinSizeInBytes().Ok()) return false; + } } - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = emboss_reserved_local_ok_subexpr_1; + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!power().Ok()) return false; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - static constexpr ::std::size_t SizeInBytes() { + [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - static constexpr bool SizeIsKnown() { + [[nodiscard]] static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericConfigVXView emboss_reserved_local_other) const { if (!has_emboss_reserved_anonymous_field_1().Known()) return false; @@ -5223,7 +5041,7 @@ class GenericConfigVXView final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericConfigVXView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_emboss_reserved_anonymous_field_1().ValueOr(false) && @@ -5270,7 +5088,7 @@ class GenericConfigVXView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericConfigVXView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -5403,28 +5221,28 @@ class GenericConfigVXView final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } private: - typename ::emboss::test::ConfigVX::GenericEmbossReservedAnonymousField1View>, 32>> + [[nodiscard]] typename ::emboss::test::ConfigVX::GenericEmbossReservedAnonymousField1View>, 32>> emboss_reserved_anonymous_field_1() const; - ::emboss::support::Maybe has_emboss_reserved_anonymous_field_1() const; + [[nodiscard]] ::emboss::support::Maybe has_emboss_reserved_anonymous_field_1() const; public: - auto power() const -> decltype(this->emboss_reserved_anonymous_field_1().power()) { + [[nodiscard]] auto power() const -> decltype(this->emboss_reserved_anonymous_field_1().power()) { return has_power().ValueOrDefault() ? emboss_reserved_anonymous_field_1().power() : decltype(this->emboss_reserved_anonymous_field_1().power())(); } - ::emboss::support::Maybe has_power() const; + [[nodiscard]] ::emboss::support::Maybe has_power() const; public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 32>> gain() const; - ::emboss::support::Maybe has_gain() const; + [[nodiscard]] ::emboss::support::Maybe has_gain() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -5440,9 +5258,9 @@ class GenericConfigVXView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -5451,13 +5269,13 @@ class GenericConfigVXView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -5475,9 +5293,9 @@ class GenericConfigVXView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -5486,13 +5304,13 @@ class GenericConfigVXView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -5510,9 +5328,9 @@ class GenericConfigVXView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -5521,13 +5339,13 @@ class GenericConfigVXView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -5558,7 +5376,7 @@ struct EmbossReservedInternalIsGenericConfigVXView< }; template -inline GenericConfigVXView< +[[nodiscard]] inline GenericConfigVXView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -5573,7 +5391,7 @@ MakeConfigVXView( T &&emboss_reserved_local_arg) { } template -inline GenericConfigVXView> +[[nodiscard]] inline GenericConfigVXView> MakeConfigVXView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericConfigVXView>( @@ -5582,7 +5400,7 @@ MakeConfigVXView( T *emboss_reserved_local_data, } template -inline GenericConfigVXView< +[[nodiscard]] inline GenericConfigVXView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedConfigVXView( T *emboss_reserved_local_data, @@ -5648,58 +5466,40 @@ class GenericStructWithUnusedParameterView final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; if (!parameters_initialized_) return false; { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !y().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!y().Ok()) return false; + if (!IntrinsicSizeInBytes().Ok()) return false; + if (!MaxSizeInBytes().Ok()) return false; + if (!MinSizeInBytes().Ok()) return false; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - static constexpr ::std::size_t SizeInBytes() { + [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - static constexpr bool SizeIsKnown() { + [[nodiscard]] static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericStructWithUnusedParameterView emboss_reserved_local_other) const { if (!has_x().Known()) return false; @@ -5737,7 +5537,7 @@ if (!parameters_initialized_) return false; return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericStructWithUnusedParameterView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_x().ValueOr(false) && @@ -5784,7 +5584,7 @@ if (!parameters_initialized_) return false; emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericStructWithUnusedParameterView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -5879,27 +5679,27 @@ if (!parameters_initialized_) return false; - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } private: - constexpr ::emboss::support::MaybeConstantView + [[nodiscard]] constexpr ::emboss::support::MaybeConstantView x() const { return parameters_initialized_ ? ::emboss::support::MaybeConstantView( x_) : ::emboss::support::MaybeConstantView(); } - constexpr ::emboss::support::Maybe has_x() const { + [[nodiscard]] constexpr ::emboss::support::Maybe has_x() const { return ::emboss::support::Maybe(parameters_initialized_); } public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> y() const; - ::emboss::support::Maybe has_y() const; + [[nodiscard]] ::emboss::support::Maybe has_y() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -5915,9 +5715,9 @@ if (!parameters_initialized_) return false; default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -5926,13 +5726,13 @@ if (!parameters_initialized_) return false; this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -5950,9 +5750,9 @@ if (!parameters_initialized_) return false; default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -5961,13 +5761,13 @@ if (!parameters_initialized_) return false; this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -5985,9 +5785,9 @@ if (!parameters_initialized_) return false; default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -5996,13 +5796,13 @@ if (!parameters_initialized_) return false; this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -6033,7 +5833,7 @@ struct EmbossReservedInternalIsGenericStructWithUnusedParameterView< }; template -inline GenericStructWithUnusedParameterView< +[[nodiscard]] inline GenericStructWithUnusedParameterView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -6048,7 +5848,7 @@ MakeStructWithUnusedParameterView(::std::int32_t x, T &&emboss_reserved_local_a } template -inline GenericStructWithUnusedParameterView> +[[nodiscard]] inline GenericStructWithUnusedParameterView> MakeStructWithUnusedParameterView(::std::int32_t x, T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericStructWithUnusedParameterView>( @@ -6057,7 +5857,7 @@ MakeStructWithUnusedParameterView(::std::int32_t x, T *emboss_reserved_local_da } template -inline GenericStructWithUnusedParameterView< +[[nodiscard]] inline GenericStructWithUnusedParameterView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedStructWithUnusedParameterView( ::std::int32_t x, T *emboss_reserved_local_data, @@ -6123,65 +5923,41 @@ class GenericStructContainingStructWithUnusedParameterView final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !x().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !swup().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!x().Ok()) return false; + if (!swup().Ok()) return false; + if (!IntrinsicSizeInBytes().Ok()) return false; + if (!MaxSizeInBytes().Ok()) return false; + if (!MinSizeInBytes().Ok()) return false; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - static constexpr ::std::size_t SizeInBytes() { + [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - static constexpr bool SizeIsKnown() { + [[nodiscard]] static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericStructContainingStructWithUnusedParameterView emboss_reserved_local_other) const { if (!has_x().Known()) return false; @@ -6219,7 +5995,7 @@ class GenericStructContainingStructWithUnusedParameterView final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericStructContainingStructWithUnusedParameterView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_x().ValueOr(false) && @@ -6266,7 +6042,7 @@ class GenericStructContainingStructWithUnusedParameterView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericStructContainingStructWithUnusedParameterView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -6399,21 +6175,21 @@ class GenericStructContainingStructWithUnusedParameterView final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> x() const; - ::emboss::support::Maybe has_x() const; + [[nodiscard]] ::emboss::support::Maybe has_x() const; public: - typename ::emboss::test::GenericStructWithUnusedParameterView> + [[nodiscard]] typename ::emboss::test::GenericStructWithUnusedParameterView> swup() const; - ::emboss::support::Maybe has_swup() const; + [[nodiscard]] ::emboss::support::Maybe has_swup() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -6429,9 +6205,9 @@ class GenericStructContainingStructWithUnusedParameterView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -6440,13 +6216,13 @@ class GenericStructContainingStructWithUnusedParameterView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -6464,9 +6240,9 @@ class GenericStructContainingStructWithUnusedParameterView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -6475,13 +6251,13 @@ class GenericStructContainingStructWithUnusedParameterView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -6499,9 +6275,9 @@ class GenericStructContainingStructWithUnusedParameterView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -6510,13 +6286,13 @@ class GenericStructContainingStructWithUnusedParameterView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -6547,7 +6323,7 @@ struct EmbossReservedInternalIsGenericStructContainingStructWithUnusedParameterV }; template -inline GenericStructContainingStructWithUnusedParameterView< +[[nodiscard]] inline GenericStructContainingStructWithUnusedParameterView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -6562,7 +6338,7 @@ MakeStructContainingStructWithUnusedParameterView( T &&emboss_reserved_local_arg } template -inline GenericStructContainingStructWithUnusedParameterView> +[[nodiscard]] inline GenericStructContainingStructWithUnusedParameterView> MakeStructContainingStructWithUnusedParameterView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericStructContainingStructWithUnusedParameterView>( @@ -6571,7 +6347,7 @@ MakeStructContainingStructWithUnusedParameterView( T *emboss_reserved_local_data } template -inline GenericStructContainingStructWithUnusedParameterView< +[[nodiscard]] inline GenericStructContainingStructWithUnusedParameterView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedStructContainingStructWithUnusedParameterView( T *emboss_reserved_local_data, @@ -6638,65 +6414,41 @@ class GenericBiasedValueView final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; if (!parameters_initialized_) return false; { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !raw_value().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !value().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!raw_value().Ok()) return false; + if (!value().Ok()) return false; + if (!IntrinsicSizeInBytes().Ok()) return false; + if (!MaxSizeInBytes().Ok()) return false; + if (!MinSizeInBytes().Ok()) return false; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - static constexpr ::std::size_t SizeInBytes() { + [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - static constexpr bool SizeIsKnown() { + [[nodiscard]] static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericBiasedValueView emboss_reserved_local_other) const { if (!has_bias().Known()) return false; @@ -6734,7 +6486,7 @@ if (!parameters_initialized_) return false; return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericBiasedValueView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_bias().ValueOr(false) && @@ -6781,7 +6533,7 @@ if (!parameters_initialized_) return false; emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericBiasedValueView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -6895,27 +6647,27 @@ if (!parameters_initialized_) return false; - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } private: - constexpr ::emboss::support::MaybeConstantView + [[nodiscard]] constexpr ::emboss::support::MaybeConstantView bias() const { return parameters_initialized_ ? ::emboss::support::MaybeConstantView( bias_) : ::emboss::support::MaybeConstantView(); } - constexpr ::emboss::support::Maybe has_bias() const { + [[nodiscard]] constexpr ::emboss::support::Maybe has_bias() const { return ::emboss::support::Maybe(parameters_initialized_); } public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> raw_value() const; - ::emboss::support::Maybe has_raw_value() const; + [[nodiscard]] ::emboss::support::Maybe has_raw_value() const; public: class EmbossReservedVirtualValueView final { @@ -6934,17 +6686,17 @@ if (!parameters_initialized_) return false; default; ~EmbossReservedVirtualValueView() = default; - ::std::int32_t Read() const { + [[nodiscard]] ::std::int32_t Read() const { EMBOSS_CHECK(view_.has_value().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - ::std::int32_t UncheckedRead() const { + [[nodiscard]] ::std::int32_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - bool Ok() const { + [[nodiscard]] bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -6957,12 +6709,12 @@ if (!parameters_initialized_) return false; this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } private: - ::emboss::support::Maybe MaybeRead() const { + [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.raw_value(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = view_.bias(); @@ -6972,7 +6724,7 @@ if (!parameters_initialized_) return false; return emboss_reserved_local_subexpr_5; } - static constexpr bool ValueIsOk( + [[nodiscard]] static constexpr bool ValueIsOk( ::std::int32_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -6980,8 +6732,8 @@ if (!parameters_initialized_) return false; const GenericBiasedValueView view_; }; - EmbossReservedVirtualValueView value() const; - ::emboss::support::Maybe has_value() const; + [[nodiscard]] EmbossReservedVirtualValueView value() const; + [[nodiscard]] ::emboss::support::Maybe has_value() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -6997,9 +6749,9 @@ if (!parameters_initialized_) return false; default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -7008,13 +6760,13 @@ if (!parameters_initialized_) return false; this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -7032,9 +6784,9 @@ if (!parameters_initialized_) return false; default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -7043,13 +6795,13 @@ if (!parameters_initialized_) return false; this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -7067,9 +6819,9 @@ if (!parameters_initialized_) return false; default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -7078,13 +6830,13 @@ if (!parameters_initialized_) return false; this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -7115,7 +6867,7 @@ struct EmbossReservedInternalIsGenericBiasedValueView< }; template -inline GenericBiasedValueView< +[[nodiscard]] inline GenericBiasedValueView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -7130,7 +6882,7 @@ MakeBiasedValueView(::std::int32_t bias, T &&emboss_reserved_local_arg) { } template -inline GenericBiasedValueView> +[[nodiscard]] inline GenericBiasedValueView> MakeBiasedValueView(::std::int32_t bias, T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericBiasedValueView>( @@ -7139,7 +6891,7 @@ MakeBiasedValueView(::std::int32_t bias, T *emboss_reserved_local_data, } template -inline GenericBiasedValueView< +[[nodiscard]] inline GenericBiasedValueView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedBiasedValueView( ::std::int32_t bias, T *emboss_reserved_local_data, @@ -7206,65 +6958,41 @@ class GenericVirtualFirstFieldWithParamView final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; if (!parameters_initialized_) return false; { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !x().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !value().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!x().Ok()) return false; + if (!value().Ok()) return false; + if (!IntrinsicSizeInBytes().Ok()) return false; + if (!MaxSizeInBytes().Ok()) return false; + if (!MinSizeInBytes().Ok()) return false; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - static constexpr ::std::size_t SizeInBytes() { + [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - static constexpr bool SizeIsKnown() { + [[nodiscard]] static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericVirtualFirstFieldWithParamView emboss_reserved_local_other) const { if (!has_param().Known()) return false; @@ -7302,7 +7030,7 @@ if (!parameters_initialized_) return false; return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericVirtualFirstFieldWithParamView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_param().ValueOr(false) && @@ -7349,7 +7077,7 @@ if (!parameters_initialized_) return false; emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericVirtualFirstFieldWithParamView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -7482,34 +7210,34 @@ if (!parameters_initialized_) return false; - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } private: - constexpr ::emboss::support::MaybeConstantView + [[nodiscard]] constexpr ::emboss::support::MaybeConstantView param() const { return parameters_initialized_ ? ::emboss::support::MaybeConstantView( param_) : ::emboss::support::MaybeConstantView(); } - constexpr ::emboss::support::Maybe has_param() const { + [[nodiscard]] constexpr ::emboss::support::Maybe has_param() const { return ::emboss::support::Maybe(parameters_initialized_); } public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> x() const; - ::emboss::support::Maybe has_x() const; + [[nodiscard]] ::emboss::support::Maybe has_x() const; public: - auto value() const -> decltype(this->x()) { + [[nodiscard]] auto value() const -> decltype(this->x()) { return has_value().ValueOrDefault() ? x() : decltype(this->x())(); } - ::emboss::support::Maybe has_value() const; + [[nodiscard]] ::emboss::support::Maybe has_value() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -7525,9 +7253,9 @@ if (!parameters_initialized_) return false; default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -7536,13 +7264,13 @@ if (!parameters_initialized_) return false; this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -7560,9 +7288,9 @@ if (!parameters_initialized_) return false; default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -7571,13 +7299,13 @@ if (!parameters_initialized_) return false; this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -7595,9 +7323,9 @@ if (!parameters_initialized_) return false; default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -7606,13 +7334,13 @@ if (!parameters_initialized_) return false; this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -7643,7 +7371,7 @@ struct EmbossReservedInternalIsGenericVirtualFirstFieldWithParamView< }; template -inline GenericVirtualFirstFieldWithParamView< +[[nodiscard]] inline GenericVirtualFirstFieldWithParamView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -7658,7 +7386,7 @@ MakeVirtualFirstFieldWithParamView(::std::int32_t param, T &&emboss_reserved_lo } template -inline GenericVirtualFirstFieldWithParamView> +[[nodiscard]] inline GenericVirtualFirstFieldWithParamView> MakeVirtualFirstFieldWithParamView(::std::int32_t param, T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericVirtualFirstFieldWithParamView>( @@ -7667,7 +7395,7 @@ MakeVirtualFirstFieldWithParamView(::std::int32_t param, T *emboss_reserved_loc } template -inline GenericVirtualFirstFieldWithParamView< +[[nodiscard]] inline GenericVirtualFirstFieldWithParamView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedVirtualFirstFieldWithParamView( ::std::int32_t param, T *emboss_reserved_local_data, @@ -7734,65 +7462,41 @@ class GenericConstVirtualFirstFieldWithParamView final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; if (!parameters_initialized_) return false; { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !value().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !x().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!value().Ok()) return false; + if (!x().Ok()) return false; + if (!IntrinsicSizeInBytes().Ok()) return false; + if (!MaxSizeInBytes().Ok()) return false; + if (!MinSizeInBytes().Ok()) return false; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - static constexpr ::std::size_t SizeInBytes() { + [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - static constexpr bool SizeIsKnown() { + [[nodiscard]] static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericConstVirtualFirstFieldWithParamView emboss_reserved_local_other) const { if (!has_param().Known()) return false; @@ -7830,7 +7534,7 @@ if (!parameters_initialized_) return false; return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericConstVirtualFirstFieldWithParamView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_param().ValueOr(false) && @@ -7877,7 +7581,7 @@ if (!parameters_initialized_) return false; emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericConstVirtualFirstFieldWithParamView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -7991,17 +7695,17 @@ if (!parameters_initialized_) return false; - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } private: - constexpr ::emboss::support::MaybeConstantView + [[nodiscard]] constexpr ::emboss::support::MaybeConstantView param() const { return parameters_initialized_ ? ::emboss::support::MaybeConstantView( param_) : ::emboss::support::MaybeConstantView(); } - constexpr ::emboss::support::Maybe has_param() const { + [[nodiscard]] constexpr ::emboss::support::Maybe has_param() const { return ::emboss::support::Maybe(parameters_initialized_); } @@ -8019,9 +7723,9 @@ if (!parameters_initialized_) return false; default; ~EmbossReservedVirtualValueView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -8030,23 +7734,23 @@ if (!parameters_initialized_) return false; this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedVirtualValueView value() { + [[nodiscard]] static constexpr EmbossReservedVirtualValueView value() { return EmbossReservedVirtualValueView(); } - static constexpr ::emboss::support::Maybe has_value() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_value() { return ::emboss::support::Maybe(true); } public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> x() const; - ::emboss::support::Maybe has_x() const; + [[nodiscard]] ::emboss::support::Maybe has_x() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -8062,9 +7766,9 @@ if (!parameters_initialized_) return false; default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -8073,13 +7777,13 @@ if (!parameters_initialized_) return false; this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -8097,9 +7801,9 @@ if (!parameters_initialized_) return false; default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -8108,13 +7812,13 @@ if (!parameters_initialized_) return false; this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -8132,9 +7836,9 @@ if (!parameters_initialized_) return false; default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -8143,13 +7847,13 @@ if (!parameters_initialized_) return false; this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -8180,7 +7884,7 @@ struct EmbossReservedInternalIsGenericConstVirtualFirstFieldWithParamView< }; template -inline GenericConstVirtualFirstFieldWithParamView< +[[nodiscard]] inline GenericConstVirtualFirstFieldWithParamView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -8195,7 +7899,7 @@ MakeConstVirtualFirstFieldWithParamView(::std::int32_t param, T &&emboss_reserv } template -inline GenericConstVirtualFirstFieldWithParamView> +[[nodiscard]] inline GenericConstVirtualFirstFieldWithParamView> MakeConstVirtualFirstFieldWithParamView(::std::int32_t param, T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericConstVirtualFirstFieldWithParamView>( @@ -8204,7 +7908,7 @@ MakeConstVirtualFirstFieldWithParamView(::std::int32_t param, T *emboss_reserve } template -inline GenericConstVirtualFirstFieldWithParamView< +[[nodiscard]] inline GenericConstVirtualFirstFieldWithParamView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedConstVirtualFirstFieldWithParamView( ::std::int32_t param, T *emboss_reserved_local_data, @@ -8271,71 +7975,41 @@ class GenericSizedArrayOfBiasedValuesView final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !element_count().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !bias().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !values().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!element_count().Ok()) return false; + if (!bias().Ok()) return false; + if (!values().Ok()) return false; + if (!IntrinsicSizeInBytes().Ok()) return false; + if (!MaxSizeInBytes().Ok()) return false; + if (!MinSizeInBytes().Ok()) return false; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - ::std::size_t SizeInBytes() const { + [[nodiscard]] ::std::size_t SizeInBytes() const { return static_cast(IntrinsicSizeInBytes().Read()); } - bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + [[nodiscard]] bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericSizedArrayOfBiasedValuesView emboss_reserved_local_other) const { if (!has_element_count().Known()) return false; @@ -8390,7 +8064,7 @@ class GenericSizedArrayOfBiasedValuesView final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericSizedArrayOfBiasedValuesView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_element_count().ValueOr(false) && @@ -8451,7 +8125,7 @@ class GenericSizedArrayOfBiasedValuesView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericSizedArrayOfBiasedValuesView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -8622,33 +8296,33 @@ class GenericSizedArrayOfBiasedValuesView final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> element_count() const; - ::emboss::support::Maybe has_element_count() const; + [[nodiscard]] ::emboss::support::Maybe has_element_count() const; public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> bias() const; - ::emboss::support::Maybe has_bias() const; + [[nodiscard]] ::emboss::support::Maybe has_bias() const; public: - typename ::emboss::support::GenericArrayView< + [[nodiscard]] typename ::emboss::support::GenericArrayView< typename ::emboss::test::GenericBiasedValueView::template OffsetStorageType> , typename Storage::template OffsetStorageType, 1, 8 , ::std::int32_t> values() const; - ::emboss::support::Maybe has_values() const; + [[nodiscard]] ::emboss::support::Maybe has_values() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -8667,17 +8341,17 @@ class GenericSizedArrayOfBiasedValuesView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - ::std::int32_t Read() const { + [[nodiscard]] ::std::int32_t Read() const { EMBOSS_CHECK(view_.has_IntrinsicSizeInBytes().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - ::std::int32_t UncheckedRead() const { + [[nodiscard]] ::std::int32_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - bool Ok() const { + [[nodiscard]] bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -8690,12 +8364,12 @@ class GenericSizedArrayOfBiasedValuesView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } private: - ::emboss::support::Maybe MaybeRead() const { + [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.element_count(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Sum(::emboss::support::Maybe(static_cast(2LL)), emboss_reserved_local_subexpr_2); @@ -8705,7 +8379,7 @@ class GenericSizedArrayOfBiasedValuesView final { return emboss_reserved_local_subexpr_5; } - static constexpr bool ValueIsOk( + [[nodiscard]] static constexpr bool ValueIsOk( ::std::int32_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -8713,8 +8387,8 @@ class GenericSizedArrayOfBiasedValuesView final { const GenericSizedArrayOfBiasedValuesView view_; }; - EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; - ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; + [[nodiscard]] EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + [[nodiscard]] ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; public: class EmbossReservedDollarVirtualMaxSizeInBytesView final { @@ -8730,9 +8404,9 @@ class GenericSizedArrayOfBiasedValuesView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -8741,13 +8415,13 @@ class GenericSizedArrayOfBiasedValuesView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -8765,9 +8439,9 @@ class GenericSizedArrayOfBiasedValuesView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -8776,13 +8450,13 @@ class GenericSizedArrayOfBiasedValuesView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -8813,7 +8487,7 @@ struct EmbossReservedInternalIsGenericSizedArrayOfBiasedValuesView< }; template -inline GenericSizedArrayOfBiasedValuesView< +[[nodiscard]] inline GenericSizedArrayOfBiasedValuesView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -8828,7 +8502,7 @@ MakeSizedArrayOfBiasedValuesView( T &&emboss_reserved_local_arg) { } template -inline GenericSizedArrayOfBiasedValuesView> +[[nodiscard]] inline GenericSizedArrayOfBiasedValuesView> MakeSizedArrayOfBiasedValuesView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericSizedArrayOfBiasedValuesView>( @@ -8837,7 +8511,7 @@ MakeSizedArrayOfBiasedValuesView( T *emboss_reserved_local_data, } template -inline GenericSizedArrayOfBiasedValuesView< +[[nodiscard]] inline GenericSizedArrayOfBiasedValuesView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedSizedArrayOfBiasedValuesView( T *emboss_reserved_local_data, diff --git a/testdata/golden_cpp/requires.emb.h b/testdata/golden_cpp/requires.emb.h index 1d2c250..82e7515 100644 --- a/testdata/golden_cpp/requires.emb.h +++ b/testdata/golden_cpp/requires.emb.h @@ -189,94 +189,46 @@ class GenericRequiresIntegersView final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !zero_through_nine().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !ten_through_twenty().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !disjoint().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !ztn_plus_ttt().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !alias_of_zero_through_nine().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !zero_through_nine_plus_five().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!zero_through_nine().Ok()) return false; + if (!ten_through_twenty().Ok()) return false; + if (!disjoint().Ok()) return false; + if (!ztn_plus_ttt().Ok()) return false; + if (!alias_of_zero_through_nine().Ok()) return false; + if (!zero_through_nine_plus_five().Ok()) return false; + if (!IntrinsicSizeInBytes().Ok()) return false; + if (!MaxSizeInBytes().Ok()) return false; + if (!MinSizeInBytes().Ok()) return false; + } } - - if (!(::emboss::support::LessThanOrEqual((zero_through_nine().Ok() ? ::emboss::support::Maybe(static_cast(zero_through_nine().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Difference((ten_through_twenty().Ok() ? ::emboss::support::Maybe(static_cast(ten_through_twenty().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(10LL))))).ValueOr(false)) return false; return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - static constexpr ::std::size_t SizeInBytes() { + [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - static constexpr bool SizeIsKnown() { + [[nodiscard]] static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericRequiresIntegersView emboss_reserved_local_other) const { if (!has_zero_through_nine().Known()) return false; @@ -331,7 +283,7 @@ class GenericRequiresIntegersView final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericRequiresIntegersView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_zero_through_nine().ValueOr(false) && @@ -392,7 +344,7 @@ class GenericRequiresIntegersView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericRequiresIntegersView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -658,31 +610,31 @@ class GenericRequiresIntegersView final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, RequiresIntegers::EmbossReservedValidatorForZeroThroughNine>, typename ::emboss::support::BitBlock>, 8>> zero_through_nine() const; - ::emboss::support::Maybe has_zero_through_nine() const; + [[nodiscard]] ::emboss::support::Maybe has_zero_through_nine() const; public: - typename ::emboss::prelude::IntView< + [[nodiscard]] typename ::emboss::prelude::IntView< /**/ ::emboss::support::FixedSizeViewParameters<8, RequiresIntegers::EmbossReservedValidatorForTenThroughTwenty>, typename ::emboss::support::BitBlock>, 8>> ten_through_twenty() const; - ::emboss::support::Maybe has_ten_through_twenty() const; + [[nodiscard]] ::emboss::support::Maybe has_ten_through_twenty() const; public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, RequiresIntegers::EmbossReservedValidatorForDisjoint>, typename ::emboss::support::BitBlock>, 8>> disjoint() const; - ::emboss::support::Maybe has_disjoint() const; + [[nodiscard]] ::emboss::support::Maybe has_disjoint() const; public: class EmbossReservedVirtualZtnPlusTttView final { @@ -701,17 +653,17 @@ class GenericRequiresIntegersView final { default; ~EmbossReservedVirtualZtnPlusTttView() = default; - ::std::int32_t Read() const { + [[nodiscard]] ::std::int32_t Read() const { EMBOSS_CHECK(view_.has_ztn_plus_ttt().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - ::std::int32_t UncheckedRead() const { + [[nodiscard]] ::std::int32_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - bool Ok() const { + [[nodiscard]] bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -724,12 +676,12 @@ class GenericRequiresIntegersView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } private: - ::emboss::support::Maybe MaybeRead() const { + [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.zero_through_nine(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = view_.ten_through_twenty(); @@ -739,7 +691,7 @@ class GenericRequiresIntegersView final { return emboss_reserved_local_subexpr_5; } - static constexpr bool ValueIsOk( + [[nodiscard]] static constexpr bool ValueIsOk( ::std::int32_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::And(::emboss::support::LessThanOrEqual(::emboss::support::Maybe(static_cast(10LL)), ::emboss::support::Maybe(emboss_reserved_local_value)), ::emboss::support::LessThanOrEqual(::emboss::support::Maybe(emboss_reserved_local_value), ::emboss::support::Maybe(static_cast(19LL)))).ValueOr(false); @@ -747,8 +699,8 @@ class GenericRequiresIntegersView final { const GenericRequiresIntegersView view_; }; - EmbossReservedVirtualZtnPlusTttView ztn_plus_ttt() const; - ::emboss::support::Maybe has_ztn_plus_ttt() const; + [[nodiscard]] EmbossReservedVirtualZtnPlusTttView ztn_plus_ttt() const; + [[nodiscard]] ::emboss::support::Maybe has_ztn_plus_ttt() const; public: class EmbossReservedVirtualAliasOfZeroThroughNineView final { @@ -767,17 +719,17 @@ class GenericRequiresIntegersView final { default; ~EmbossReservedVirtualAliasOfZeroThroughNineView() = default; - ::std::int32_t Read() const { + [[nodiscard]] ::std::int32_t Read() const { EMBOSS_CHECK(view_.has_alias_of_zero_through_nine().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - ::std::int32_t UncheckedRead() const { + [[nodiscard]] ::std::int32_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - bool Ok() const { + [[nodiscard]] bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -790,9 +742,9 @@ class GenericRequiresIntegersView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } - bool TryToWrite(::std::int32_t emboss_reserved_local_value) { + [[nodiscard]] bool TryToWrite(::std::int32_t emboss_reserved_local_value) { const auto emboss_reserved_local_maybe_new_value = ::emboss::support::Maybe(emboss_reserved_local_value); if (!CouldWriteValue(emboss_reserved_local_value)) return false; return view_.zero_through_nine().TryToWrite( @@ -806,7 +758,7 @@ class GenericRequiresIntegersView final { void UncheckedWrite(::std::int32_t emboss_reserved_local_value) { view_.zero_through_nine().UncheckedWrite((::emboss::support::Maybe(emboss_reserved_local_value)).ValueOrDefault()); } - bool CouldWriteValue(::std::int32_t emboss_reserved_local_value) { + [[nodiscard]] bool CouldWriteValue(::std::int32_t emboss_reserved_local_value) { if (!ValueIsOk(emboss_reserved_local_value)) return false; const auto emboss_reserved_local_maybe_new_value = ::emboss::support::Maybe(emboss_reserved_local_value); if (!emboss_reserved_local_maybe_new_value.Known()) return false; @@ -822,14 +774,14 @@ class GenericRequiresIntegersView final { private: - ::emboss::support::Maybe MaybeRead() const { + [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.zero_through_nine(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); return emboss_reserved_local_subexpr_2; } - static constexpr bool ValueIsOk( + [[nodiscard]] static constexpr bool ValueIsOk( ::std::int32_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::And(::emboss::support::LessThanOrEqual(::emboss::support::Maybe(static_cast(2LL)), ::emboss::support::Maybe(emboss_reserved_local_value)), ::emboss::support::LessThanOrEqual(::emboss::support::Maybe(emboss_reserved_local_value), ::emboss::support::Maybe(static_cast(7LL)))).ValueOr(false); @@ -837,8 +789,8 @@ class GenericRequiresIntegersView final { const GenericRequiresIntegersView view_; }; - EmbossReservedVirtualAliasOfZeroThroughNineView alias_of_zero_through_nine() const; - ::emboss::support::Maybe has_alias_of_zero_through_nine() const; + [[nodiscard]] EmbossReservedVirtualAliasOfZeroThroughNineView alias_of_zero_through_nine() const; + [[nodiscard]] ::emboss::support::Maybe has_alias_of_zero_through_nine() const; public: class EmbossReservedVirtualZeroThroughNinePlusFiveView final { @@ -857,17 +809,17 @@ class GenericRequiresIntegersView final { default; ~EmbossReservedVirtualZeroThroughNinePlusFiveView() = default; - ::std::int32_t Read() const { + [[nodiscard]] ::std::int32_t Read() const { EMBOSS_CHECK(view_.has_zero_through_nine_plus_five().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - ::std::int32_t UncheckedRead() const { + [[nodiscard]] ::std::int32_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - bool Ok() const { + [[nodiscard]] bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -880,9 +832,9 @@ class GenericRequiresIntegersView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } - bool TryToWrite(::std::int32_t emboss_reserved_local_value) { + [[nodiscard]] bool TryToWrite(::std::int32_t emboss_reserved_local_value) { const auto emboss_reserved_local_maybe_new_value = ::emboss::support::Difference(::emboss::support::Maybe(emboss_reserved_local_value), ::emboss::support::Maybe(static_cast(5LL))); if (!CouldWriteValue(emboss_reserved_local_value)) return false; return view_.zero_through_nine().TryToWrite( @@ -896,7 +848,7 @@ class GenericRequiresIntegersView final { void UncheckedWrite(::std::int32_t emboss_reserved_local_value) { view_.zero_through_nine().UncheckedWrite((::emboss::support::Difference(::emboss::support::Maybe(emboss_reserved_local_value), ::emboss::support::Maybe(static_cast(5LL)))).ValueOrDefault()); } - bool CouldWriteValue(::std::int32_t emboss_reserved_local_value) { + [[nodiscard]] bool CouldWriteValue(::std::int32_t emboss_reserved_local_value) { if (!ValueIsOk(emboss_reserved_local_value)) return false; const auto emboss_reserved_local_maybe_new_value = ::emboss::support::Difference(::emboss::support::Maybe(emboss_reserved_local_value), ::emboss::support::Maybe(static_cast(5LL))); if (!emboss_reserved_local_maybe_new_value.Known()) return false; @@ -912,7 +864,7 @@ class GenericRequiresIntegersView final { private: - ::emboss::support::Maybe MaybeRead() const { + [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.zero_through_nine(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Sum(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(5LL))); @@ -920,7 +872,7 @@ class GenericRequiresIntegersView final { return emboss_reserved_local_subexpr_3; } - static constexpr bool ValueIsOk( + [[nodiscard]] static constexpr bool ValueIsOk( ::std::int32_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::And(::emboss::support::LessThanOrEqual(::emboss::support::Maybe(static_cast(5LL)), ::emboss::support::Maybe(emboss_reserved_local_value)), ::emboss::support::LessThanOrEqual(::emboss::support::Maybe(emboss_reserved_local_value), ::emboss::support::Maybe(static_cast(10LL)))).ValueOr(false); @@ -928,8 +880,8 @@ class GenericRequiresIntegersView final { const GenericRequiresIntegersView view_; }; - EmbossReservedVirtualZeroThroughNinePlusFiveView zero_through_nine_plus_five() const; - ::emboss::support::Maybe has_zero_through_nine_plus_five() const; + [[nodiscard]] EmbossReservedVirtualZeroThroughNinePlusFiveView zero_through_nine_plus_five() const; + [[nodiscard]] ::emboss::support::Maybe has_zero_through_nine_plus_five() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -945,9 +897,9 @@ class GenericRequiresIntegersView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -956,13 +908,13 @@ class GenericRequiresIntegersView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -980,9 +932,9 @@ class GenericRequiresIntegersView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -991,13 +943,13 @@ class GenericRequiresIntegersView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -1015,9 +967,9 @@ class GenericRequiresIntegersView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -1026,13 +978,13 @@ class GenericRequiresIntegersView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -1063,7 +1015,7 @@ struct EmbossReservedInternalIsGenericRequiresIntegersView< }; template -inline GenericRequiresIntegersView< +[[nodiscard]] inline GenericRequiresIntegersView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -1078,7 +1030,7 @@ MakeRequiresIntegersView( T &&emboss_reserved_local_arg) { } template -inline GenericRequiresIntegersView> +[[nodiscard]] inline GenericRequiresIntegersView> MakeRequiresIntegersView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericRequiresIntegersView>( @@ -1087,7 +1039,7 @@ MakeRequiresIntegersView( T *emboss_reserved_local_data, } template -inline GenericRequiresIntegersView< +[[nodiscard]] inline GenericRequiresIntegersView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedRequiresIntegersView( T *emboss_reserved_local_data, @@ -1191,79 +1143,43 @@ class GenericEmbossReservedAnonymousField2View final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !a().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !b().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !must_be_true().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !must_be_false().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBits().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBits().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBits().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!a().Ok()) return false; + if (!b().Ok()) return false; + if (!must_be_true().Ok()) return false; + if (!must_be_false().Ok()) return false; + if (!IntrinsicSizeInBits().Ok()) return false; + if (!MaxSizeInBits().Ok()) return false; + if (!MinSizeInBits().Ok()) return false; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBits().Ok() && backing_.SizeInBits() >= static_cast( IntrinsicSizeInBits().UncheckedRead()); } - static constexpr ::std::size_t SizeInBits() { + [[nodiscard]] static constexpr ::std::size_t SizeInBits() { return static_cast(IntrinsicSizeInBits().Read()); } - static constexpr bool SizeIsKnown() { + [[nodiscard]] static constexpr bool SizeIsKnown() { return IntrinsicSizeInBits().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericEmbossReservedAnonymousField2View emboss_reserved_local_other) const { if (!has_a().Known()) return false; @@ -1335,7 +1251,7 @@ class GenericEmbossReservedAnonymousField2View final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericEmbossReservedAnonymousField2View emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_a().ValueOr(false) && @@ -1410,7 +1326,7 @@ class GenericEmbossReservedAnonymousField2View final { emboss_reserved_local_other.IntrinsicSizeInBits().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericEmbossReservedAnonymousField2View emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -1619,39 +1535,39 @@ class GenericEmbossReservedAnonymousField2View final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: - typename ::emboss::prelude::FlagView< + [[nodiscard]] typename ::emboss::prelude::FlagView< /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, typename Storage::template OffsetStorageType> a() const; - ::emboss::support::Maybe has_a() const; + [[nodiscard]] ::emboss::support::Maybe has_a() const; public: - typename ::emboss::prelude::FlagView< + [[nodiscard]] typename ::emboss::prelude::FlagView< /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, typename Storage::template OffsetStorageType> b() const; - ::emboss::support::Maybe has_b() const; + [[nodiscard]] ::emboss::support::Maybe has_b() const; public: - typename ::emboss::prelude::FlagView< + [[nodiscard]] typename ::emboss::prelude::FlagView< /**/ ::emboss::support::FixedSizeViewParameters<1, EmbossReservedAnonymousField2::EmbossReservedValidatorForMustBeTrue>, typename Storage::template OffsetStorageType> must_be_true() const; - ::emboss::support::Maybe has_must_be_true() const; + [[nodiscard]] ::emboss::support::Maybe has_must_be_true() const; public: - typename ::emboss::prelude::FlagView< + [[nodiscard]] typename ::emboss::prelude::FlagView< /**/ ::emboss::support::FixedSizeViewParameters<1, EmbossReservedAnonymousField2::EmbossReservedValidatorForMustBeFalse>, typename Storage::template OffsetStorageType> must_be_false() const; - ::emboss::support::Maybe has_must_be_false() const; + [[nodiscard]] ::emboss::support::Maybe has_must_be_false() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBitsView final { @@ -1667,9 +1583,9 @@ class GenericEmbossReservedAnonymousField2View final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBitsView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -1678,13 +1594,13 @@ class GenericEmbossReservedAnonymousField2View final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBitsView IntrinsicSizeInBits() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBitsView IntrinsicSizeInBits() { return EmbossReservedDollarVirtualIntrinsicSizeInBitsView(); } - static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBits() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBits() { return ::emboss::support::Maybe(true); } @@ -1702,9 +1618,9 @@ class GenericEmbossReservedAnonymousField2View final { default; ~EmbossReservedDollarVirtualMaxSizeInBitsView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -1713,13 +1629,13 @@ class GenericEmbossReservedAnonymousField2View final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBitsView MaxSizeInBits() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBitsView MaxSizeInBits() { return EmbossReservedDollarVirtualMaxSizeInBitsView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBits() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBits() { return ::emboss::support::Maybe(true); } @@ -1737,9 +1653,9 @@ class GenericEmbossReservedAnonymousField2View final { default; ~EmbossReservedDollarVirtualMinSizeInBitsView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -1748,13 +1664,13 @@ class GenericEmbossReservedAnonymousField2View final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBitsView MinSizeInBits() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBitsView MinSizeInBits() { return EmbossReservedDollarVirtualMinSizeInBitsView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBits() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBits() { return ::emboss::support::Maybe(true); } @@ -1785,7 +1701,7 @@ struct EmbossReservedInternalIsGenericEmbossReservedAnonymousField2View< }; template -inline GenericEmbossReservedAnonymousField2View< +[[nodiscard]] inline GenericEmbossReservedAnonymousField2View< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -1800,7 +1716,7 @@ MakeEmbossReservedAnonymousField2View( T &&emboss_reserved_local_arg) { } template -inline GenericEmbossReservedAnonymousField2View> +[[nodiscard]] inline GenericEmbossReservedAnonymousField2View> MakeEmbossReservedAnonymousField2View( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericEmbossReservedAnonymousField2View>( @@ -1809,7 +1725,7 @@ MakeEmbossReservedAnonymousField2View( T *emboss_reserved_local_data, } template -inline GenericEmbossReservedAnonymousField2View< +[[nodiscard]] inline GenericEmbossReservedAnonymousField2View< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedEmbossReservedAnonymousField2View( T *emboss_reserved_local_data, @@ -1870,102 +1786,54 @@ class GenericRequiresBoolsView final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; - const auto emboss_reserved_local_ok_subexpr_1 = ::emboss::support::And(::emboss::support::Maybe(true), ::emboss::support::Maybe(true)); - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !emboss_reserved_anonymous_field_2().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = emboss_reserved_local_ok_subexpr_1; - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !a().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = emboss_reserved_local_ok_subexpr_1; - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !b().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = emboss_reserved_local_ok_subexpr_1; - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !must_be_true().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = emboss_reserved_local_ok_subexpr_1; - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !must_be_false().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !b_must_be_false().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !alias_of_a_must_be_true().Ok()) return false; - } - + const auto emboss_reserved_local_ok_subexpr_1 = ::emboss::support::And(::emboss::support::Maybe(true), ::emboss::support::Maybe(true)); { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!emboss_reserved_anonymous_field_2().Ok()) return false; + if (!b_must_be_false().Ok()) return false; + if (!alias_of_a_must_be_true().Ok()) return false; + if (!IntrinsicSizeInBytes().Ok()) return false; + if (!MaxSizeInBytes().Ok()) return false; + if (!MinSizeInBytes().Ok()) return false; + } } - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = emboss_reserved_local_ok_subexpr_1; + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!a().Ok()) return false; + if (!b().Ok()) return false; + if (!must_be_true().Ok()) return false; + if (!must_be_false().Ok()) return false; + } } - - if (!(::emboss::support::Or((a().Ok() ? ::emboss::support::Maybe(static_cast(a().UncheckedRead())) : ::emboss::support::Maybe()), (b().Ok() ? ::emboss::support::Maybe(static_cast(b().UncheckedRead())) : ::emboss::support::Maybe()))).ValueOr(false)) return false; return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - static constexpr ::std::size_t SizeInBytes() { + [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - static constexpr bool SizeIsKnown() { + [[nodiscard]] static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericRequiresBoolsView emboss_reserved_local_other) const { if (!has_emboss_reserved_anonymous_field_2().Known()) return false; @@ -1986,7 +1854,7 @@ class GenericRequiresBoolsView final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericRequiresBoolsView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_emboss_reserved_anonymous_field_2().ValueOr(false) && @@ -2019,7 +1887,7 @@ class GenericRequiresBoolsView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericRequiresBoolsView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -2285,41 +2153,41 @@ class GenericRequiresBoolsView final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } private: - typename ::emboss::test::RequiresBools::GenericEmbossReservedAnonymousField2View>, 8>> + [[nodiscard]] typename ::emboss::test::RequiresBools::GenericEmbossReservedAnonymousField2View>, 8>> emboss_reserved_anonymous_field_2() const; - ::emboss::support::Maybe has_emboss_reserved_anonymous_field_2() const; + [[nodiscard]] ::emboss::support::Maybe has_emboss_reserved_anonymous_field_2() const; public: - auto a() const -> decltype(this->emboss_reserved_anonymous_field_2().a()) { + [[nodiscard]] auto a() const -> decltype(this->emboss_reserved_anonymous_field_2().a()) { return has_a().ValueOrDefault() ? emboss_reserved_anonymous_field_2().a() : decltype(this->emboss_reserved_anonymous_field_2().a())(); } - ::emboss::support::Maybe has_a() const; + [[nodiscard]] ::emboss::support::Maybe has_a() const; public: - auto b() const -> decltype(this->emboss_reserved_anonymous_field_2().b()) { + [[nodiscard]] auto b() const -> decltype(this->emboss_reserved_anonymous_field_2().b()) { return has_b().ValueOrDefault() ? emboss_reserved_anonymous_field_2().b() : decltype(this->emboss_reserved_anonymous_field_2().b())(); } - ::emboss::support::Maybe has_b() const; + [[nodiscard]] ::emboss::support::Maybe has_b() const; public: - auto must_be_true() const -> decltype(this->emboss_reserved_anonymous_field_2().must_be_true()) { + [[nodiscard]] auto must_be_true() const -> decltype(this->emboss_reserved_anonymous_field_2().must_be_true()) { return has_must_be_true().ValueOrDefault() ? emboss_reserved_anonymous_field_2().must_be_true() : decltype(this->emboss_reserved_anonymous_field_2().must_be_true())(); } - ::emboss::support::Maybe has_must_be_true() const; + [[nodiscard]] ::emboss::support::Maybe has_must_be_true() const; public: - auto must_be_false() const -> decltype(this->emboss_reserved_anonymous_field_2().must_be_false()) { + [[nodiscard]] auto must_be_false() const -> decltype(this->emboss_reserved_anonymous_field_2().must_be_false()) { return has_must_be_false().ValueOrDefault() ? emboss_reserved_anonymous_field_2().must_be_false() : decltype(this->emboss_reserved_anonymous_field_2().must_be_false())(); } - ::emboss::support::Maybe has_must_be_false() const; + [[nodiscard]] ::emboss::support::Maybe has_must_be_false() const; public: class EmbossReservedVirtualBMustBeFalseView final { @@ -2338,17 +2206,17 @@ class GenericRequiresBoolsView final { default; ~EmbossReservedVirtualBMustBeFalseView() = default; - bool Read() const { + [[nodiscard]] bool Read() const { EMBOSS_CHECK(view_.has_b_must_be_false().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - bool UncheckedRead() const { + [[nodiscard]] bool UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - bool Ok() const { + [[nodiscard]] bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -2361,12 +2229,12 @@ class GenericRequiresBoolsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } private: - ::emboss::support::Maybe MaybeRead() const { + [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.b(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(false)); @@ -2374,7 +2242,7 @@ class GenericRequiresBoolsView final { return emboss_reserved_local_subexpr_3; } - static constexpr bool ValueIsOk( + [[nodiscard]] static constexpr bool ValueIsOk( bool emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(emboss_reserved_local_value).ValueOr(false); @@ -2382,8 +2250,8 @@ class GenericRequiresBoolsView final { const GenericRequiresBoolsView view_; }; - EmbossReservedVirtualBMustBeFalseView b_must_be_false() const; - ::emboss::support::Maybe has_b_must_be_false() const; + [[nodiscard]] EmbossReservedVirtualBMustBeFalseView b_must_be_false() const; + [[nodiscard]] ::emboss::support::Maybe has_b_must_be_false() const; public: class EmbossReservedVirtualAliasOfAMustBeTrueView final { @@ -2402,17 +2270,17 @@ class GenericRequiresBoolsView final { default; ~EmbossReservedVirtualAliasOfAMustBeTrueView() = default; - bool Read() const { + [[nodiscard]] bool Read() const { EMBOSS_CHECK(view_.has_alias_of_a_must_be_true().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - bool UncheckedRead() const { + [[nodiscard]] bool UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - bool Ok() const { + [[nodiscard]] bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -2425,9 +2293,9 @@ class GenericRequiresBoolsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } - bool TryToWrite(bool emboss_reserved_local_value) { + [[nodiscard]] bool TryToWrite(bool emboss_reserved_local_value) { const auto emboss_reserved_local_maybe_new_value = ::emboss::support::Maybe(emboss_reserved_local_value); if (!CouldWriteValue(emboss_reserved_local_value)) return false; return view_.a().TryToWrite( @@ -2441,7 +2309,7 @@ class GenericRequiresBoolsView final { void UncheckedWrite(bool emboss_reserved_local_value) { view_.a().UncheckedWrite((::emboss::support::Maybe(emboss_reserved_local_value)).ValueOrDefault()); } - bool CouldWriteValue(bool emboss_reserved_local_value) { + [[nodiscard]] bool CouldWriteValue(bool emboss_reserved_local_value) { if (!ValueIsOk(emboss_reserved_local_value)) return false; const auto emboss_reserved_local_maybe_new_value = ::emboss::support::Maybe(emboss_reserved_local_value); if (!emboss_reserved_local_maybe_new_value.Known()) return false; @@ -2457,14 +2325,14 @@ class GenericRequiresBoolsView final { private: - ::emboss::support::Maybe MaybeRead() const { + [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.a(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); return emboss_reserved_local_subexpr_2; } - static constexpr bool ValueIsOk( + [[nodiscard]] static constexpr bool ValueIsOk( bool emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(emboss_reserved_local_value).ValueOr(false); @@ -2472,8 +2340,8 @@ class GenericRequiresBoolsView final { const GenericRequiresBoolsView view_; }; - EmbossReservedVirtualAliasOfAMustBeTrueView alias_of_a_must_be_true() const; - ::emboss::support::Maybe has_alias_of_a_must_be_true() const; + [[nodiscard]] EmbossReservedVirtualAliasOfAMustBeTrueView alias_of_a_must_be_true() const; + [[nodiscard]] ::emboss::support::Maybe has_alias_of_a_must_be_true() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -2489,9 +2357,9 @@ class GenericRequiresBoolsView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -2500,13 +2368,13 @@ class GenericRequiresBoolsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -2524,9 +2392,9 @@ class GenericRequiresBoolsView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -2535,13 +2403,13 @@ class GenericRequiresBoolsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -2559,9 +2427,9 @@ class GenericRequiresBoolsView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -2570,13 +2438,13 @@ class GenericRequiresBoolsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -2607,7 +2475,7 @@ struct EmbossReservedInternalIsGenericRequiresBoolsView< }; template -inline GenericRequiresBoolsView< +[[nodiscard]] inline GenericRequiresBoolsView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -2622,7 +2490,7 @@ MakeRequiresBoolsView( T &&emboss_reserved_local_arg) { } template -inline GenericRequiresBoolsView> +[[nodiscard]] inline GenericRequiresBoolsView> MakeRequiresBoolsView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericRequiresBoolsView>( @@ -2631,7 +2499,7 @@ MakeRequiresBoolsView( T *emboss_reserved_local_data, } template -inline GenericRequiresBoolsView< +[[nodiscard]] inline GenericRequiresBoolsView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedRequiresBoolsView( T *emboss_reserved_local_data, @@ -2820,87 +2688,45 @@ class GenericRequiresEnumsView final { using Enum = ::emboss::test::RequiresEnums::Enum; - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !a().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !b().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !c().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !filtered_a().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !alias_of_a().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!a().Ok()) return false; + if (!b().Ok()) return false; + if (!c().Ok()) return false; + if (!filtered_a().Ok()) return false; + if (!alias_of_a().Ok()) return false; + if (!IntrinsicSizeInBytes().Ok()) return false; + if (!MaxSizeInBytes().Ok()) return false; + if (!MinSizeInBytes().Ok()) return false; + } } - - if (!(::emboss::support::Or(::emboss::support::Equal((a().Ok() ? ::emboss::support::Maybe(static_cast(a().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(0))), ::emboss::support::Equal((b().Ok() ? ::emboss::support::Maybe(static_cast(b().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(0))))).ValueOr(false)) return false; return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - static constexpr ::std::size_t SizeInBytes() { + [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - static constexpr bool SizeIsKnown() { + [[nodiscard]] static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericRequiresEnumsView emboss_reserved_local_other) const { if (!has_a().Known()) return false; @@ -2955,7 +2781,7 @@ class GenericRequiresEnumsView final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericRequiresEnumsView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_a().ValueOr(false) && @@ -3016,7 +2842,7 @@ class GenericRequiresEnumsView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericRequiresEnumsView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -3244,34 +3070,34 @@ class GenericRequiresEnumsView final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: - typename ::emboss::support::EnumView< + [[nodiscard]] typename ::emboss::support::EnumView< /**/ ::emboss::test::RequiresEnums::Enum, ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> a() const; - ::emboss::support::Maybe has_a() const; + [[nodiscard]] ::emboss::support::Maybe has_a() const; public: - typename ::emboss::support::EnumView< + [[nodiscard]] typename ::emboss::support::EnumView< /**/ ::emboss::test::RequiresEnums::Enum, ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> b() const; - ::emboss::support::Maybe has_b() const; + [[nodiscard]] ::emboss::support::Maybe has_b() const; public: - typename ::emboss::support::EnumView< + [[nodiscard]] typename ::emboss::support::EnumView< /**/ ::emboss::test::RequiresEnums::Enum, ::emboss::support::FixedSizeViewParameters<8, RequiresEnums::EmbossReservedValidatorForC>, typename ::emboss::support::BitBlock>, 8>> c() const; - ::emboss::support::Maybe has_c() const; + [[nodiscard]] ::emboss::support::Maybe has_c() const; public: class EmbossReservedVirtualFilteredAView final { @@ -3290,17 +3116,17 @@ class GenericRequiresEnumsView final { default; ~EmbossReservedVirtualFilteredAView() = default; - ::emboss::test::RequiresEnums::Enum Read() const { + [[nodiscard]] ::emboss::test::RequiresEnums::Enum Read() const { EMBOSS_CHECK(view_.has_filtered_a().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - ::emboss::test::RequiresEnums::Enum UncheckedRead() const { + [[nodiscard]] ::emboss::test::RequiresEnums::Enum UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - bool Ok() const { + [[nodiscard]] bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -3313,12 +3139,12 @@ class GenericRequiresEnumsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } private: - ::emboss::support::Maybe MaybeRead() const { + [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.a(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(0))); @@ -3327,7 +3153,7 @@ class GenericRequiresEnumsView final { return emboss_reserved_local_subexpr_4; } - static constexpr bool ValueIsOk( + [[nodiscard]] static constexpr bool ValueIsOk( ::emboss::test::RequiresEnums::Enum emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Equal(::emboss::support::Maybe(emboss_reserved_local_value), ::emboss::support::Maybe(static_cast(1))).ValueOr(false); @@ -3335,8 +3161,8 @@ class GenericRequiresEnumsView final { const GenericRequiresEnumsView view_; }; - EmbossReservedVirtualFilteredAView filtered_a() const; - ::emboss::support::Maybe has_filtered_a() const; + [[nodiscard]] EmbossReservedVirtualFilteredAView filtered_a() const; + [[nodiscard]] ::emboss::support::Maybe has_filtered_a() const; public: class EmbossReservedVirtualAliasOfAView final { @@ -3355,17 +3181,17 @@ class GenericRequiresEnumsView final { default; ~EmbossReservedVirtualAliasOfAView() = default; - ::emboss::test::RequiresEnums::Enum Read() const { + [[nodiscard]] ::emboss::test::RequiresEnums::Enum Read() const { EMBOSS_CHECK(view_.has_alias_of_a().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - ::emboss::test::RequiresEnums::Enum UncheckedRead() const { + [[nodiscard]] ::emboss::test::RequiresEnums::Enum UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - bool Ok() const { + [[nodiscard]] bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -3378,9 +3204,9 @@ class GenericRequiresEnumsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } - bool TryToWrite(::emboss::test::RequiresEnums::Enum emboss_reserved_local_value) { + [[nodiscard]] bool TryToWrite(::emboss::test::RequiresEnums::Enum emboss_reserved_local_value) { const auto emboss_reserved_local_maybe_new_value = ::emboss::support::Maybe(emboss_reserved_local_value); if (!CouldWriteValue(emboss_reserved_local_value)) return false; return view_.a().TryToWrite( @@ -3394,7 +3220,7 @@ class GenericRequiresEnumsView final { void UncheckedWrite(::emboss::test::RequiresEnums::Enum emboss_reserved_local_value) { view_.a().UncheckedWrite((::emboss::support::Maybe(emboss_reserved_local_value)).ValueOrDefault()); } - bool CouldWriteValue(::emboss::test::RequiresEnums::Enum emboss_reserved_local_value) { + [[nodiscard]] bool CouldWriteValue(::emboss::test::RequiresEnums::Enum emboss_reserved_local_value) { if (!ValueIsOk(emboss_reserved_local_value)) return false; const auto emboss_reserved_local_maybe_new_value = ::emboss::support::Maybe(emboss_reserved_local_value); if (!emboss_reserved_local_maybe_new_value.Known()) return false; @@ -3410,14 +3236,14 @@ class GenericRequiresEnumsView final { private: - ::emboss::support::Maybe MaybeRead() const { + [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.a(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); return emboss_reserved_local_subexpr_2; } - static constexpr bool ValueIsOk( + [[nodiscard]] static constexpr bool ValueIsOk( ::emboss::test::RequiresEnums::Enum emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Equal(::emboss::support::Maybe(emboss_reserved_local_value), ::emboss::support::Maybe(static_cast(1))).ValueOr(false); @@ -3425,8 +3251,8 @@ class GenericRequiresEnumsView final { const GenericRequiresEnumsView view_; }; - EmbossReservedVirtualAliasOfAView alias_of_a() const; - ::emboss::support::Maybe has_alias_of_a() const; + [[nodiscard]] EmbossReservedVirtualAliasOfAView alias_of_a() const; + [[nodiscard]] ::emboss::support::Maybe has_alias_of_a() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -3442,9 +3268,9 @@ class GenericRequiresEnumsView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -3453,13 +3279,13 @@ class GenericRequiresEnumsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -3477,9 +3303,9 @@ class GenericRequiresEnumsView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -3488,13 +3314,13 @@ class GenericRequiresEnumsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -3512,9 +3338,9 @@ class GenericRequiresEnumsView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -3523,13 +3349,13 @@ class GenericRequiresEnumsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -3560,7 +3386,7 @@ struct EmbossReservedInternalIsGenericRequiresEnumsView< }; template -inline GenericRequiresEnumsView< +[[nodiscard]] inline GenericRequiresEnumsView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -3575,7 +3401,7 @@ MakeRequiresEnumsView( T &&emboss_reserved_local_arg) { } template -inline GenericRequiresEnumsView> +[[nodiscard]] inline GenericRequiresEnumsView> MakeRequiresEnumsView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericRequiresEnumsView>( @@ -3584,7 +3410,7 @@ MakeRequiresEnumsView( T *emboss_reserved_local_data, } template -inline GenericRequiresEnumsView< +[[nodiscard]] inline GenericRequiresEnumsView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedRequiresEnumsView( T *emboss_reserved_local_data, @@ -3673,79 +3499,50 @@ class GenericEmbossReservedAnonymousField1View final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; - const auto emboss_reserved_local_ok_subexpr_1 = b_exists(); - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !a().Ok()) return false; - } - + const auto emboss_reserved_local_ok_subexpr_1 = b_exists(); + const auto emboss_reserved_local_ok_subexpr_2 = (emboss_reserved_local_ok_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !b_exists().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = (emboss_reserved_local_ok_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !b().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = (emboss_reserved_local_ok_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !b_true().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBits().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBits().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!a().Ok()) return false; + if (!b_exists().Ok()) return false; + if (!IntrinsicSizeInBits().Ok()) return false; + if (!MaxSizeInBits().Ok()) return false; + if (!MinSizeInBits().Ok()) return false; + } } - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBits().Ok()) return false; + const auto emboss_reserved_cond = emboss_reserved_local_ok_subexpr_2; + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!b().Ok()) return false; + if (!b_true().Ok()) return false; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBits().Ok() && backing_.SizeInBits() >= static_cast( IntrinsicSizeInBits().UncheckedRead()); } - ::std::size_t SizeInBits() const { + [[nodiscard]] ::std::size_t SizeInBits() const { return static_cast(IntrinsicSizeInBits().Read()); } - bool SizeIsKnown() const { return IntrinsicSizeInBits().Ok(); } + [[nodiscard]] bool SizeIsKnown() const { return IntrinsicSizeInBits().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericEmbossReservedAnonymousField1View emboss_reserved_local_other) const { if (!has_a().Known()) return false; @@ -3817,7 +3614,7 @@ class GenericEmbossReservedAnonymousField1View final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericEmbossReservedAnonymousField1View emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_a().ValueOr(false) && @@ -3892,7 +3689,7 @@ class GenericEmbossReservedAnonymousField1View final { emboss_reserved_local_other.IntrinsicSizeInBits().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericEmbossReservedAnonymousField1View emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -4101,39 +3898,39 @@ class GenericEmbossReservedAnonymousField1View final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: - typename ::emboss::prelude::FlagView< + [[nodiscard]] typename ::emboss::prelude::FlagView< /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, typename Storage::template OffsetStorageType> a() const; - ::emboss::support::Maybe has_a() const; + [[nodiscard]] ::emboss::support::Maybe has_a() const; public: - typename ::emboss::prelude::FlagView< + [[nodiscard]] typename ::emboss::prelude::FlagView< /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, typename Storage::template OffsetStorageType> b_exists() const; - ::emboss::support::Maybe has_b_exists() const; + [[nodiscard]] ::emboss::support::Maybe has_b_exists() const; public: - typename ::emboss::prelude::FlagView< + [[nodiscard]] typename ::emboss::prelude::FlagView< /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, typename Storage::template OffsetStorageType> b() const; - ::emboss::support::Maybe has_b() const; + [[nodiscard]] ::emboss::support::Maybe has_b() const; public: - typename ::emboss::prelude::FlagView< + [[nodiscard]] typename ::emboss::prelude::FlagView< /**/ ::emboss::support::FixedSizeViewParameters<1, EmbossReservedAnonymousField1::EmbossReservedValidatorForBTrue>, typename Storage::template OffsetStorageType> b_true() const; - ::emboss::support::Maybe has_b_true() const; + [[nodiscard]] ::emboss::support::Maybe has_b_true() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBitsView final { @@ -4152,17 +3949,17 @@ class GenericEmbossReservedAnonymousField1View final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBitsView() = default; - ::std::int32_t Read() const { + [[nodiscard]] ::std::int32_t Read() const { EMBOSS_CHECK(view_.has_IntrinsicSizeInBits().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - ::std::int32_t UncheckedRead() const { + [[nodiscard]] ::std::int32_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - bool Ok() const { + [[nodiscard]] bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -4175,12 +3972,12 @@ class GenericEmbossReservedAnonymousField1View final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } private: - ::emboss::support::Maybe MaybeRead() const { + [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.b_exists(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Choice(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(3LL)), ::emboss::support::Maybe(static_cast(0LL))); @@ -4189,7 +3986,7 @@ class GenericEmbossReservedAnonymousField1View final { return emboss_reserved_local_subexpr_4; } - static constexpr bool ValueIsOk( + [[nodiscard]] static constexpr bool ValueIsOk( ::std::int32_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -4197,8 +3994,8 @@ class GenericEmbossReservedAnonymousField1View final { const GenericEmbossReservedAnonymousField1View view_; }; - EmbossReservedDollarVirtualIntrinsicSizeInBitsView IntrinsicSizeInBits() const; - ::emboss::support::Maybe has_IntrinsicSizeInBits() const; + [[nodiscard]] EmbossReservedDollarVirtualIntrinsicSizeInBitsView IntrinsicSizeInBits() const; + [[nodiscard]] ::emboss::support::Maybe has_IntrinsicSizeInBits() const; public: class EmbossReservedDollarVirtualMaxSizeInBitsView final { @@ -4214,9 +4011,9 @@ class GenericEmbossReservedAnonymousField1View final { default; ~EmbossReservedDollarVirtualMaxSizeInBitsView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -4225,13 +4022,13 @@ class GenericEmbossReservedAnonymousField1View final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBitsView MaxSizeInBits() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBitsView MaxSizeInBits() { return EmbossReservedDollarVirtualMaxSizeInBitsView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBits() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBits() { return ::emboss::support::Maybe(true); } @@ -4249,9 +4046,9 @@ class GenericEmbossReservedAnonymousField1View final { default; ~EmbossReservedDollarVirtualMinSizeInBitsView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -4260,13 +4057,13 @@ class GenericEmbossReservedAnonymousField1View final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBitsView MinSizeInBits() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBitsView MinSizeInBits() { return EmbossReservedDollarVirtualMinSizeInBitsView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBits() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBits() { return ::emboss::support::Maybe(true); } @@ -4297,7 +4094,7 @@ struct EmbossReservedInternalIsGenericEmbossReservedAnonymousField1View< }; template -inline GenericEmbossReservedAnonymousField1View< +[[nodiscard]] inline GenericEmbossReservedAnonymousField1View< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -4312,7 +4109,7 @@ MakeEmbossReservedAnonymousField1View( T &&emboss_reserved_local_arg) { } template -inline GenericEmbossReservedAnonymousField1View> +[[nodiscard]] inline GenericEmbossReservedAnonymousField1View> MakeEmbossReservedAnonymousField1View( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericEmbossReservedAnonymousField1View>( @@ -4321,7 +4118,7 @@ MakeEmbossReservedAnonymousField1View( T *emboss_reserved_local_data, } template -inline GenericEmbossReservedAnonymousField1View< +[[nodiscard]] inline GenericEmbossReservedAnonymousField1View< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedEmbossReservedAnonymousField1View( T *emboss_reserved_local_data, @@ -4382,88 +4179,68 @@ class GenericRequiresWithOptionalFieldsView final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; - const auto emboss_reserved_local_ok_subexpr_1 = ::emboss::support::And(::emboss::support::Maybe(true), ::emboss::support::Maybe(true)); - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !emboss_reserved_anonymous_field_1().Ok()) return false; - } - + const auto emboss_reserved_local_ok_subexpr_1 = ::emboss::support::And(::emboss::support::Maybe(true), ::emboss::support::Maybe(true)); + const auto emboss_reserved_local_ok_subexpr_2 = emboss_reserved_anonymous_field_1().has_b(); + const auto emboss_reserved_local_ok_subexpr_3 = ::emboss::support::And(::emboss::support::Maybe(true), emboss_reserved_local_ok_subexpr_2); + const auto emboss_reserved_local_ok_subexpr_4 = emboss_reserved_anonymous_field_1().has_b_true(); + const auto emboss_reserved_local_ok_subexpr_5 = ::emboss::support::And(::emboss::support::Maybe(true), emboss_reserved_local_ok_subexpr_4); { - const auto emboss_reserved_local_field_present = emboss_reserved_local_ok_subexpr_1; - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !a().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = emboss_reserved_local_ok_subexpr_1; - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !b_exists().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::And(::emboss::support::Maybe(true), emboss_reserved_anonymous_field_1().has_b()); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !b().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::And(::emboss::support::Maybe(true), emboss_reserved_anonymous_field_1().has_b_true()); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !b_true().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!emboss_reserved_anonymous_field_1().Ok()) return false; + if (!IntrinsicSizeInBytes().Ok()) return false; + if (!MaxSizeInBytes().Ok()) return false; + if (!MinSizeInBytes().Ok()) return false; + } } - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = emboss_reserved_local_ok_subexpr_1; + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!a().Ok()) return false; + if (!b_exists().Ok()) return false; + } } - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = emboss_reserved_local_ok_subexpr_3; + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!b().Ok()) return false; + } } - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = emboss_reserved_local_ok_subexpr_5; + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!b_true().Ok()) return false; + } } - - if (!(::emboss::support::Or((a().Ok() ? ::emboss::support::Maybe(static_cast(a().UncheckedRead())) : ::emboss::support::Maybe()), (b().Ok() ? ::emboss::support::Maybe(static_cast(b().UncheckedRead())) : ::emboss::support::Maybe()))).ValueOr(false)) return false; return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - static constexpr ::std::size_t SizeInBytes() { + [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - static constexpr bool SizeIsKnown() { + [[nodiscard]] static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericRequiresWithOptionalFieldsView emboss_reserved_local_other) const { if (!has_emboss_reserved_anonymous_field_1().Known()) return false; @@ -4484,7 +4261,7 @@ class GenericRequiresWithOptionalFieldsView final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericRequiresWithOptionalFieldsView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_emboss_reserved_anonymous_field_1().ValueOr(false) && @@ -4517,7 +4294,7 @@ class GenericRequiresWithOptionalFieldsView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericRequiresWithOptionalFieldsView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -4726,41 +4503,41 @@ class GenericRequiresWithOptionalFieldsView final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } private: - typename ::emboss::test::RequiresWithOptionalFields::GenericEmbossReservedAnonymousField1View>, 8>> + [[nodiscard]] typename ::emboss::test::RequiresWithOptionalFields::GenericEmbossReservedAnonymousField1View>, 8>> emboss_reserved_anonymous_field_1() const; - ::emboss::support::Maybe has_emboss_reserved_anonymous_field_1() const; + [[nodiscard]] ::emboss::support::Maybe has_emboss_reserved_anonymous_field_1() const; public: - auto a() const -> decltype(this->emboss_reserved_anonymous_field_1().a()) { + [[nodiscard]] auto a() const -> decltype(this->emboss_reserved_anonymous_field_1().a()) { return has_a().ValueOrDefault() ? emboss_reserved_anonymous_field_1().a() : decltype(this->emboss_reserved_anonymous_field_1().a())(); } - ::emboss::support::Maybe has_a() const; + [[nodiscard]] ::emboss::support::Maybe has_a() const; public: - auto b_exists() const -> decltype(this->emboss_reserved_anonymous_field_1().b_exists()) { + [[nodiscard]] auto b_exists() const -> decltype(this->emboss_reserved_anonymous_field_1().b_exists()) { return has_b_exists().ValueOrDefault() ? emboss_reserved_anonymous_field_1().b_exists() : decltype(this->emboss_reserved_anonymous_field_1().b_exists())(); } - ::emboss::support::Maybe has_b_exists() const; + [[nodiscard]] ::emboss::support::Maybe has_b_exists() const; public: - auto b() const -> decltype(this->emboss_reserved_anonymous_field_1().b()) { + [[nodiscard]] auto b() const -> decltype(this->emboss_reserved_anonymous_field_1().b()) { return has_b().ValueOrDefault() ? emboss_reserved_anonymous_field_1().b() : decltype(this->emboss_reserved_anonymous_field_1().b())(); } - ::emboss::support::Maybe has_b() const; + [[nodiscard]] ::emboss::support::Maybe has_b() const; public: - auto b_true() const -> decltype(this->emboss_reserved_anonymous_field_1().b_true()) { + [[nodiscard]] auto b_true() const -> decltype(this->emboss_reserved_anonymous_field_1().b_true()) { return has_b_true().ValueOrDefault() ? emboss_reserved_anonymous_field_1().b_true() : decltype(this->emboss_reserved_anonymous_field_1().b_true())(); } - ::emboss::support::Maybe has_b_true() const; + [[nodiscard]] ::emboss::support::Maybe has_b_true() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -4776,9 +4553,9 @@ class GenericRequiresWithOptionalFieldsView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -4787,13 +4564,13 @@ class GenericRequiresWithOptionalFieldsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -4811,9 +4588,9 @@ class GenericRequiresWithOptionalFieldsView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -4822,13 +4599,13 @@ class GenericRequiresWithOptionalFieldsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -4846,9 +4623,9 @@ class GenericRequiresWithOptionalFieldsView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -4857,13 +4634,13 @@ class GenericRequiresWithOptionalFieldsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -4894,7 +4671,7 @@ struct EmbossReservedInternalIsGenericRequiresWithOptionalFieldsView< }; template -inline GenericRequiresWithOptionalFieldsView< +[[nodiscard]] inline GenericRequiresWithOptionalFieldsView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -4909,7 +4686,7 @@ MakeRequiresWithOptionalFieldsView( T &&emboss_reserved_local_arg) { } template -inline GenericRequiresWithOptionalFieldsView> +[[nodiscard]] inline GenericRequiresWithOptionalFieldsView> MakeRequiresWithOptionalFieldsView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericRequiresWithOptionalFieldsView>( @@ -4918,7 +4695,7 @@ MakeRequiresWithOptionalFieldsView( T *emboss_reserved_local_data, } template -inline GenericRequiresWithOptionalFieldsView< +[[nodiscard]] inline GenericRequiresWithOptionalFieldsView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedRequiresWithOptionalFieldsView( T *emboss_reserved_local_data, @@ -5000,58 +4777,40 @@ class GenericElementView final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !x().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!x().Ok()) return false; + if (!IntrinsicSizeInBytes().Ok()) return false; + if (!MaxSizeInBytes().Ok()) return false; + if (!MinSizeInBytes().Ok()) return false; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - static constexpr ::std::size_t SizeInBytes() { + [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - static constexpr bool SizeIsKnown() { + [[nodiscard]] static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericElementView emboss_reserved_local_other) const { if (!has_x().Known()) return false; @@ -5072,7 +4831,7 @@ class GenericElementView final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericElementView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_x().ValueOr(false) && @@ -5105,7 +4864,7 @@ class GenericElementView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericElementView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -5200,15 +4959,15 @@ class GenericElementView final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, Element::EmbossReservedValidatorForX>, typename ::emboss::support::BitBlock>, 8>> x() const; - ::emboss::support::Maybe has_x() const; + [[nodiscard]] ::emboss::support::Maybe has_x() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -5224,9 +4983,9 @@ class GenericElementView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -5235,13 +4994,13 @@ class GenericElementView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -5259,9 +5018,9 @@ class GenericElementView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -5270,13 +5029,13 @@ class GenericElementView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -5294,9 +5053,9 @@ class GenericElementView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -5305,13 +5064,13 @@ class GenericElementView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -5342,7 +5101,7 @@ struct EmbossReservedInternalIsGenericElementView< }; template -inline GenericElementView< +[[nodiscard]] inline GenericElementView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -5357,7 +5116,7 @@ MakeElementView( T &&emboss_reserved_local_arg) { } template -inline GenericElementView> +[[nodiscard]] inline GenericElementView> MakeElementView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericElementView>( @@ -5366,7 +5125,7 @@ MakeElementView( T *emboss_reserved_local_data, } template -inline GenericElementView< +[[nodiscard]] inline GenericElementView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedElementView( T *emboss_reserved_local_data, @@ -5427,58 +5186,40 @@ class GenericRequiresInArrayElementsView final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !xs().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!xs().Ok()) return false; + if (!IntrinsicSizeInBytes().Ok()) return false; + if (!MaxSizeInBytes().Ok()) return false; + if (!MinSizeInBytes().Ok()) return false; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - static constexpr ::std::size_t SizeInBytes() { + [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - static constexpr bool SizeIsKnown() { + [[nodiscard]] static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericRequiresInArrayElementsView emboss_reserved_local_other) const { if (!has_xs().Known()) return false; @@ -5499,7 +5240,7 @@ class GenericRequiresInArrayElementsView final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericRequiresInArrayElementsView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_xs().ValueOr(false) && @@ -5532,7 +5273,7 @@ class GenericRequiresInArrayElementsView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericRequiresInArrayElementsView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -5627,17 +5368,17 @@ class GenericRequiresInArrayElementsView final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: - typename ::emboss::support::GenericArrayView< + [[nodiscard]] typename ::emboss::support::GenericArrayView< typename ::emboss::test::RequiresInArrayElements::GenericElementView::template OffsetStorageType> , typename Storage::template OffsetStorageType, 1, 8 > xs() const; - ::emboss::support::Maybe has_xs() const; + [[nodiscard]] ::emboss::support::Maybe has_xs() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -5653,9 +5394,9 @@ class GenericRequiresInArrayElementsView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -5664,13 +5405,13 @@ class GenericRequiresInArrayElementsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -5688,9 +5429,9 @@ class GenericRequiresInArrayElementsView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -5699,13 +5440,13 @@ class GenericRequiresInArrayElementsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -5723,9 +5464,9 @@ class GenericRequiresInArrayElementsView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -5734,13 +5475,13 @@ class GenericRequiresInArrayElementsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -5771,7 +5512,7 @@ struct EmbossReservedInternalIsGenericRequiresInArrayElementsView< }; template -inline GenericRequiresInArrayElementsView< +[[nodiscard]] inline GenericRequiresInArrayElementsView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -5786,7 +5527,7 @@ MakeRequiresInArrayElementsView( T &&emboss_reserved_local_arg) { } template -inline GenericRequiresInArrayElementsView> +[[nodiscard]] inline GenericRequiresInArrayElementsView> MakeRequiresInArrayElementsView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericRequiresInArrayElementsView>( @@ -5795,7 +5536,7 @@ MakeRequiresInArrayElementsView( T *emboss_reserved_local_data, } template -inline GenericRequiresInArrayElementsView< +[[nodiscard]] inline GenericRequiresInArrayElementsView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedRequiresInArrayElementsView( T *emboss_reserved_local_data, diff --git a/testdata/golden_cpp/start_size_range.emb.h b/testdata/golden_cpp/start_size_range.emb.h index f4f3c71..34a58ab 100644 --- a/testdata/golden_cpp/start_size_range.emb.h +++ b/testdata/golden_cpp/start_size_range.emb.h @@ -90,78 +90,42 @@ class GenericStartSizeView final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !size().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !start_size_constants().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !payload().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !counter().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!size().Ok()) return false; + if (!start_size_constants().Ok()) return false; + if (!payload().Ok()) return false; + if (!counter().Ok()) return false; + if (!IntrinsicSizeInBytes().Ok()) return false; + if (!MaxSizeInBytes().Ok()) return false; + if (!MinSizeInBytes().Ok()) return false; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - ::std::size_t SizeInBytes() const { + [[nodiscard]] ::std::size_t SizeInBytes() const { return static_cast(IntrinsicSizeInBytes().Read()); } - bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + [[nodiscard]] bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericStartSizeView emboss_reserved_local_other) const { if (!has_size().Known()) return false; @@ -233,7 +197,7 @@ class GenericStartSizeView final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericStartSizeView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_size().ValueOr(false) && @@ -308,7 +272,7 @@ class GenericStartSizeView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericStartSizeView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -517,26 +481,26 @@ class GenericStartSizeView final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> size() const; - ::emboss::support::Maybe has_size() const; + [[nodiscard]] ::emboss::support::Maybe has_size() const; public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<16, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 16>> start_size_constants() const; - ::emboss::support::Maybe has_start_size_constants() const; + [[nodiscard]] ::emboss::support::Maybe has_start_size_constants() const; public: - typename ::emboss::support::GenericArrayView< + [[nodiscard]] typename ::emboss::support::GenericArrayView< typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock::template OffsetStorageType>, 8>> @@ -545,15 +509,15 @@ class GenericStartSizeView final { 8 > payload() const; - ::emboss::support::Maybe has_payload() const; + [[nodiscard]] ::emboss::support::Maybe has_payload() const; public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 32>> counter() const; - ::emboss::support::Maybe has_counter() const; + [[nodiscard]] ::emboss::support::Maybe has_counter() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -572,17 +536,17 @@ class GenericStartSizeView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - ::std::int32_t Read() const { + [[nodiscard]] ::std::int32_t Read() const { EMBOSS_CHECK(view_.has_IntrinsicSizeInBytes().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - ::std::int32_t UncheckedRead() const { + [[nodiscard]] ::std::int32_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - bool Ok() const { + [[nodiscard]] bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -595,12 +559,12 @@ class GenericStartSizeView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } private: - ::emboss::support::Maybe MaybeRead() const { + [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.size(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Sum(::emboss::support::Maybe(static_cast(3LL)), emboss_reserved_local_subexpr_2); @@ -612,7 +576,7 @@ class GenericStartSizeView final { return emboss_reserved_local_subexpr_7; } - static constexpr bool ValueIsOk( + [[nodiscard]] static constexpr bool ValueIsOk( ::std::int32_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -620,8 +584,8 @@ class GenericStartSizeView final { const GenericStartSizeView view_; }; - EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; - ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; + [[nodiscard]] EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + [[nodiscard]] ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; public: class EmbossReservedDollarVirtualMaxSizeInBytesView final { @@ -637,9 +601,9 @@ class GenericStartSizeView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -648,13 +612,13 @@ class GenericStartSizeView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -672,9 +636,9 @@ class GenericStartSizeView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -683,13 +647,13 @@ class GenericStartSizeView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -720,7 +684,7 @@ struct EmbossReservedInternalIsGenericStartSizeView< }; template -inline GenericStartSizeView< +[[nodiscard]] inline GenericStartSizeView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -735,7 +699,7 @@ MakeStartSizeView( T &&emboss_reserved_local_arg) { } template -inline GenericStartSizeView> +[[nodiscard]] inline GenericStartSizeView> MakeStartSizeView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericStartSizeView>( @@ -744,7 +708,7 @@ MakeStartSizeView( T *emboss_reserved_local_data, } template -inline GenericStartSizeView< +[[nodiscard]] inline GenericStartSizeView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedStartSizeView( T *emboss_reserved_local_data, diff --git a/testdata/golden_cpp/subtypes.emb.h b/testdata/golden_cpp/subtypes.emb.h index 5177de1..0987f5a 100644 --- a/testdata/golden_cpp/subtypes.emb.h +++ b/testdata/golden_cpp/subtypes.emb.h @@ -223,72 +223,42 @@ class GenericInInView final { using InInIn = ::emboss::test::Out::In::InIn::InInIn; - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !outer_offset().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !field_enum().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !in_2().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!outer_offset().Ok()) return false; + if (!field_enum().Ok()) return false; + if (!in_2().Ok()) return false; + if (!IntrinsicSizeInBytes().Ok()) return false; + if (!MaxSizeInBytes().Ok()) return false; + if (!MinSizeInBytes().Ok()) return false; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - static constexpr ::std::size_t SizeInBytes() { + [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - static constexpr bool SizeIsKnown() { + [[nodiscard]] static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericInInView emboss_reserved_local_other) const { if (!has_field_enum().Known()) return false; @@ -326,7 +296,7 @@ class GenericInInView final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericInInView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_field_enum().ValueOr(false) && @@ -373,7 +343,7 @@ class GenericInInView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericInInView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -525,7 +495,7 @@ class GenericInInView final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: class EmbossReservedVirtualOuterOffsetView final { @@ -541,9 +511,9 @@ class GenericInInView final { default; ~EmbossReservedVirtualOuterOffsetView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -552,30 +522,30 @@ class GenericInInView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedVirtualOuterOffsetView outer_offset() { + [[nodiscard]] static constexpr EmbossReservedVirtualOuterOffsetView outer_offset() { return EmbossReservedVirtualOuterOffsetView(); } - static constexpr ::emboss::support::Maybe has_outer_offset() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_outer_offset() { return ::emboss::support::Maybe(true); } public: - typename ::emboss::support::EnumView< + [[nodiscard]] typename ::emboss::support::EnumView< /**/ ::emboss::test::Out::In::InIn::InInIn, ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> field_enum() const; - ::emboss::support::Maybe has_field_enum() const; + [[nodiscard]] ::emboss::support::Maybe has_field_enum() const; public: - typename ::emboss::test::Out::GenericIn2View> + [[nodiscard]] typename ::emboss::test::Out::GenericIn2View> in_2() const; - ::emboss::support::Maybe has_in_2() const; + [[nodiscard]] ::emboss::support::Maybe has_in_2() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -591,9 +561,9 @@ class GenericInInView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -602,13 +572,13 @@ class GenericInInView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -626,9 +596,9 @@ class GenericInInView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -637,13 +607,13 @@ class GenericInInView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -661,9 +631,9 @@ class GenericInInView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -672,13 +642,13 @@ class GenericInInView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -709,7 +679,7 @@ struct EmbossReservedInternalIsGenericInInView< }; template -inline GenericInInView< +[[nodiscard]] inline GenericInInView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -724,7 +694,7 @@ MakeInInView( T &&emboss_reserved_local_arg) { } template -inline GenericInInView> +[[nodiscard]] inline GenericInInView> MakeInInView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericInInView>( @@ -733,7 +703,7 @@ MakeInInView( T *emboss_reserved_local_data, } template -inline GenericInInView< +[[nodiscard]] inline GenericInInView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedInInView( T *emboss_reserved_local_data, @@ -794,92 +764,44 @@ class GenericInView final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !in_in_1().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !in_in_2().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !in_in_in_1().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !in_2().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !name_collision().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !name_collision_check().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!in_in_1().Ok()) return false; + if (!in_in_2().Ok()) return false; + if (!in_in_in_1().Ok()) return false; + if (!in_2().Ok()) return false; + if (!name_collision().Ok()) return false; + if (!name_collision_check().Ok()) return false; + if (!IntrinsicSizeInBytes().Ok()) return false; + if (!MaxSizeInBytes().Ok()) return false; + if (!MinSizeInBytes().Ok()) return false; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - ::std::size_t SizeInBytes() const { + [[nodiscard]] ::std::size_t SizeInBytes() const { return static_cast(IntrinsicSizeInBytes().Read()); } - bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + [[nodiscard]] bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericInView emboss_reserved_local_other) const { if (!has_in_in_1().Known()) return false; @@ -985,7 +907,7 @@ class GenericInView final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericInView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_in_in_1().ValueOr(false) && @@ -1088,7 +1010,7 @@ class GenericInView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericInView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -1373,50 +1295,50 @@ class GenericInView final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: - typename ::emboss::test::Out::In::GenericInInView> + [[nodiscard]] typename ::emboss::test::Out::In::GenericInInView> in_in_1() const; - ::emboss::support::Maybe has_in_in_1() const; + [[nodiscard]] ::emboss::support::Maybe has_in_in_1() const; public: - typename ::emboss::test::Out::In::GenericInInView> + [[nodiscard]] typename ::emboss::test::Out::In::GenericInInView> in_in_2() const; - ::emboss::support::Maybe has_in_in_2() const; + [[nodiscard]] ::emboss::support::Maybe has_in_in_2() const; public: - typename ::emboss::support::EnumView< + [[nodiscard]] typename ::emboss::support::EnumView< /**/ ::emboss::test::Out::In::InIn::InInIn, ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> in_in_in_1() const; - ::emboss::support::Maybe has_in_in_in_1() const; + [[nodiscard]] ::emboss::support::Maybe has_in_in_in_1() const; public: - typename ::emboss::test::Out::GenericIn2View> + [[nodiscard]] typename ::emboss::test::Out::GenericIn2View> in_2() const; - ::emboss::support::Maybe has_in_2() const; + [[nodiscard]] ::emboss::support::Maybe has_in_2() const; public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> name_collision() const; - ::emboss::support::Maybe has_name_collision() const; + [[nodiscard]] ::emboss::support::Maybe has_name_collision() const; public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> name_collision_check() const; - ::emboss::support::Maybe has_name_collision_check() const; + [[nodiscard]] ::emboss::support::Maybe has_name_collision_check() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -1435,17 +1357,17 @@ class GenericInView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - ::std::int32_t Read() const { + [[nodiscard]] ::std::int32_t Read() const { EMBOSS_CHECK(view_.has_IntrinsicSizeInBytes().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - ::std::int32_t UncheckedRead() const { + [[nodiscard]] ::std::int32_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - bool Ok() const { + [[nodiscard]] bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -1458,12 +1380,12 @@ class GenericInView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } private: - ::emboss::support::Maybe MaybeRead() const { + [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.name_collision(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Sum(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(1LL))); @@ -1473,7 +1395,7 @@ class GenericInView final { return emboss_reserved_local_subexpr_5; } - static constexpr bool ValueIsOk( + [[nodiscard]] static constexpr bool ValueIsOk( ::std::int32_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -1481,8 +1403,8 @@ class GenericInView final { const GenericInView view_; }; - EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; - ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; + [[nodiscard]] EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + [[nodiscard]] ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; public: class EmbossReservedDollarVirtualMaxSizeInBytesView final { @@ -1498,9 +1420,9 @@ class GenericInView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -1509,13 +1431,13 @@ class GenericInView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -1533,9 +1455,9 @@ class GenericInView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -1544,13 +1466,13 @@ class GenericInView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -1581,7 +1503,7 @@ struct EmbossReservedInternalIsGenericInView< }; template -inline GenericInView< +[[nodiscard]] inline GenericInView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -1596,7 +1518,7 @@ MakeInView( T &&emboss_reserved_local_arg) { } template -inline GenericInView> +[[nodiscard]] inline GenericInView> MakeInView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericInView>( @@ -1605,7 +1527,7 @@ MakeInView( T *emboss_reserved_local_data, } template -inline GenericInView< +[[nodiscard]] inline GenericInView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedInView( T *emboss_reserved_local_data, @@ -1671,58 +1593,40 @@ class GenericIn2View final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !field_byte().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!field_byte().Ok()) return false; + if (!IntrinsicSizeInBytes().Ok()) return false; + if (!MaxSizeInBytes().Ok()) return false; + if (!MinSizeInBytes().Ok()) return false; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - static constexpr ::std::size_t SizeInBytes() { + [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - static constexpr bool SizeIsKnown() { + [[nodiscard]] static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericIn2View emboss_reserved_local_other) const { if (!has_field_byte().Known()) return false; @@ -1743,7 +1647,7 @@ class GenericIn2View final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericIn2View emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_field_byte().ValueOr(false) && @@ -1776,7 +1680,7 @@ class GenericIn2View final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericIn2View emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -1871,15 +1775,15 @@ class GenericIn2View final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> field_byte() const; - ::emboss::support::Maybe has_field_byte() const; + [[nodiscard]] ::emboss::support::Maybe has_field_byte() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -1895,9 +1799,9 @@ class GenericIn2View final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -1906,13 +1810,13 @@ class GenericIn2View final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -1930,9 +1834,9 @@ class GenericIn2View final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -1941,13 +1845,13 @@ class GenericIn2View final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -1965,9 +1869,9 @@ class GenericIn2View final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -1976,13 +1880,13 @@ class GenericIn2View final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -2013,7 +1917,7 @@ struct EmbossReservedInternalIsGenericIn2View< }; template -inline GenericIn2View< +[[nodiscard]] inline GenericIn2View< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -2028,7 +1932,7 @@ MakeIn2View( T &&emboss_reserved_local_arg) { } template -inline GenericIn2View> +[[nodiscard]] inline GenericIn2View> MakeIn2View( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericIn2View>( @@ -2037,7 +1941,7 @@ MakeIn2View( T *emboss_reserved_local_data, } template -inline GenericIn2View< +[[nodiscard]] inline GenericIn2View< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedIn2View( T *emboss_reserved_local_data, @@ -2098,107 +2002,47 @@ class GenericOutView final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !in_1().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !in_2().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !in_in_1().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !in_in_2().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !in_in_in_1().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !in_in_in_2().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !name_collision().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !nested_constant_check().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!in_1().Ok()) return false; + if (!in_2().Ok()) return false; + if (!in_in_1().Ok()) return false; + if (!in_in_2().Ok()) return false; + if (!in_in_in_1().Ok()) return false; + if (!in_in_in_2().Ok()) return false; + if (!name_collision().Ok()) return false; + if (!nested_constant_check().Ok()) return false; + if (!IntrinsicSizeInBytes().Ok()) return false; + if (!MaxSizeInBytes().Ok()) return false; + if (!MinSizeInBytes().Ok()) return false; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - static constexpr ::std::size_t SizeInBytes() { + [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - static constexpr bool SizeIsKnown() { + [[nodiscard]] static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericOutView emboss_reserved_local_other) const { if (!has_in_1().Known()) return false; @@ -2338,7 +2182,7 @@ class GenericOutView final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericOutView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_in_1().ValueOr(false) && @@ -2469,7 +2313,7 @@ class GenericOutView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericOutView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -2830,65 +2674,65 @@ class GenericOutView final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: - typename ::emboss::test::Out::GenericInView> + [[nodiscard]] typename ::emboss::test::Out::GenericInView> in_1() const; - ::emboss::support::Maybe has_in_1() const; + [[nodiscard]] ::emboss::support::Maybe has_in_1() const; public: - typename ::emboss::test::Out::GenericInView> + [[nodiscard]] typename ::emboss::test::Out::GenericInView> in_2() const; - ::emboss::support::Maybe has_in_2() const; + [[nodiscard]] ::emboss::support::Maybe has_in_2() const; public: - typename ::emboss::test::Out::In::GenericInInView> + [[nodiscard]] typename ::emboss::test::Out::In::GenericInInView> in_in_1() const; - ::emboss::support::Maybe has_in_in_1() const; + [[nodiscard]] ::emboss::support::Maybe has_in_in_1() const; public: - typename ::emboss::test::Out::In::GenericInInView> + [[nodiscard]] typename ::emboss::test::Out::In::GenericInInView> in_in_2() const; - ::emboss::support::Maybe has_in_in_2() const; + [[nodiscard]] ::emboss::support::Maybe has_in_in_2() const; public: - typename ::emboss::support::EnumView< + [[nodiscard]] typename ::emboss::support::EnumView< /**/ ::emboss::test::Out::In::InIn::InInIn, ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> in_in_in_1() const; - ::emboss::support::Maybe has_in_in_in_1() const; + [[nodiscard]] ::emboss::support::Maybe has_in_in_in_1() const; public: - typename ::emboss::support::EnumView< + [[nodiscard]] typename ::emboss::support::EnumView< /**/ ::emboss::test::Out::In::InIn::InInIn, ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> in_in_in_2() const; - ::emboss::support::Maybe has_in_in_in_2() const; + [[nodiscard]] ::emboss::support::Maybe has_in_in_in_2() const; public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<16, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 16>> name_collision() const; - ::emboss::support::Maybe has_name_collision() const; + [[nodiscard]] ::emboss::support::Maybe has_name_collision() const; public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> nested_constant_check() const; - ::emboss::support::Maybe has_nested_constant_check() const; + [[nodiscard]] ::emboss::support::Maybe has_nested_constant_check() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -2904,9 +2748,9 @@ class GenericOutView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -2915,13 +2759,13 @@ class GenericOutView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -2939,9 +2783,9 @@ class GenericOutView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -2950,13 +2794,13 @@ class GenericOutView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -2974,9 +2818,9 @@ class GenericOutView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -2985,13 +2829,13 @@ class GenericOutView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -3022,7 +2866,7 @@ struct EmbossReservedInternalIsGenericOutView< }; template -inline GenericOutView< +[[nodiscard]] inline GenericOutView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -3037,7 +2881,7 @@ MakeOutView( T &&emboss_reserved_local_arg) { } template -inline GenericOutView> +[[nodiscard]] inline GenericOutView> MakeOutView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericOutView>( @@ -3046,7 +2890,7 @@ MakeOutView( T *emboss_reserved_local_data, } template -inline GenericOutView< +[[nodiscard]] inline GenericOutView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedOutView( T *emboss_reserved_local_data, diff --git a/testdata/golden_cpp/text_format.emb.h b/testdata/golden_cpp/text_format.emb.h index 5103a11..b87a161 100644 --- a/testdata/golden_cpp/text_format.emb.h +++ b/testdata/golden_cpp/text_format.emb.h @@ -104,65 +104,41 @@ class GenericVanillaView final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !a().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !b().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!a().Ok()) return false; + if (!b().Ok()) return false; + if (!IntrinsicSizeInBytes().Ok()) return false; + if (!MaxSizeInBytes().Ok()) return false; + if (!MinSizeInBytes().Ok()) return false; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - static constexpr ::std::size_t SizeInBytes() { + [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - static constexpr bool SizeIsKnown() { + [[nodiscard]] static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericVanillaView emboss_reserved_local_other) const { if (!has_a().Known()) return false; @@ -200,7 +176,7 @@ class GenericVanillaView final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericVanillaView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_a().ValueOr(false) && @@ -247,7 +223,7 @@ class GenericVanillaView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericVanillaView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -380,23 +356,23 @@ class GenericVanillaView final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> a() const; - ::emboss::support::Maybe has_a() const; + [[nodiscard]] ::emboss::support::Maybe has_a() const; public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> b() const; - ::emboss::support::Maybe has_b() const; + [[nodiscard]] ::emboss::support::Maybe has_b() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -412,9 +388,9 @@ class GenericVanillaView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -423,13 +399,13 @@ class GenericVanillaView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -447,9 +423,9 @@ class GenericVanillaView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -458,13 +434,13 @@ class GenericVanillaView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -482,9 +458,9 @@ class GenericVanillaView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -493,13 +469,13 @@ class GenericVanillaView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -530,7 +506,7 @@ struct EmbossReservedInternalIsGenericVanillaView< }; template -inline GenericVanillaView< +[[nodiscard]] inline GenericVanillaView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -545,7 +521,7 @@ MakeVanillaView( T &&emboss_reserved_local_arg) { } template -inline GenericVanillaView> +[[nodiscard]] inline GenericVanillaView> MakeVanillaView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericVanillaView>( @@ -554,7 +530,7 @@ MakeVanillaView( T *emboss_reserved_local_data, } template -inline GenericVanillaView< +[[nodiscard]] inline GenericVanillaView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedVanillaView( T *emboss_reserved_local_data, @@ -621,72 +597,42 @@ class GenericStructWithSkippedFieldsView final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !a().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !b().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !c().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!a().Ok()) return false; + if (!b().Ok()) return false; + if (!c().Ok()) return false; + if (!IntrinsicSizeInBytes().Ok()) return false; + if (!MaxSizeInBytes().Ok()) return false; + if (!MinSizeInBytes().Ok()) return false; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - static constexpr ::std::size_t SizeInBytes() { + [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - static constexpr bool SizeIsKnown() { + [[nodiscard]] static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericStructWithSkippedFieldsView emboss_reserved_local_other) const { if (!has_a().Known()) return false; @@ -741,7 +687,7 @@ class GenericStructWithSkippedFieldsView final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericStructWithSkippedFieldsView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_a().ValueOr(false) && @@ -802,7 +748,7 @@ class GenericStructWithSkippedFieldsView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericStructWithSkippedFieldsView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -943,31 +889,31 @@ class GenericStructWithSkippedFieldsView final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> a() const; - ::emboss::support::Maybe has_a() const; + [[nodiscard]] ::emboss::support::Maybe has_a() const; public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> b() const; - ::emboss::support::Maybe has_b() const; + [[nodiscard]] ::emboss::support::Maybe has_b() const; public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> c() const; - ::emboss::support::Maybe has_c() const; + [[nodiscard]] ::emboss::support::Maybe has_c() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -983,9 +929,9 @@ class GenericStructWithSkippedFieldsView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -994,13 +940,13 @@ class GenericStructWithSkippedFieldsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -1018,9 +964,9 @@ class GenericStructWithSkippedFieldsView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -1029,13 +975,13 @@ class GenericStructWithSkippedFieldsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -1053,9 +999,9 @@ class GenericStructWithSkippedFieldsView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -1064,13 +1010,13 @@ class GenericStructWithSkippedFieldsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -1101,7 +1047,7 @@ struct EmbossReservedInternalIsGenericStructWithSkippedFieldsView< }; template -inline GenericStructWithSkippedFieldsView< +[[nodiscard]] inline GenericStructWithSkippedFieldsView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -1116,7 +1062,7 @@ MakeStructWithSkippedFieldsView( T &&emboss_reserved_local_arg) { } template -inline GenericStructWithSkippedFieldsView> +[[nodiscard]] inline GenericStructWithSkippedFieldsView> MakeStructWithSkippedFieldsView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericStructWithSkippedFieldsView>( @@ -1125,7 +1071,7 @@ MakeStructWithSkippedFieldsView( T *emboss_reserved_local_data, } template -inline GenericStructWithSkippedFieldsView< +[[nodiscard]] inline GenericStructWithSkippedFieldsView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedStructWithSkippedFieldsView( T *emboss_reserved_local_data, @@ -1192,72 +1138,42 @@ class GenericStructWithSkippedStructureFieldsView final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !a().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !b().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !c().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!a().Ok()) return false; + if (!b().Ok()) return false; + if (!c().Ok()) return false; + if (!IntrinsicSizeInBytes().Ok()) return false; + if (!MaxSizeInBytes().Ok()) return false; + if (!MinSizeInBytes().Ok()) return false; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - static constexpr ::std::size_t SizeInBytes() { + [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - static constexpr bool SizeIsKnown() { + [[nodiscard]] static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericStructWithSkippedStructureFieldsView emboss_reserved_local_other) const { if (!has_a().Known()) return false; @@ -1312,7 +1228,7 @@ class GenericStructWithSkippedStructureFieldsView final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericStructWithSkippedStructureFieldsView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_a().ValueOr(false) && @@ -1373,7 +1289,7 @@ class GenericStructWithSkippedStructureFieldsView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericStructWithSkippedStructureFieldsView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -1514,25 +1430,25 @@ class GenericStructWithSkippedStructureFieldsView final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: - typename ::emboss::test::GenericVanillaView> + [[nodiscard]] typename ::emboss::test::GenericVanillaView> a() const; - ::emboss::support::Maybe has_a() const; + [[nodiscard]] ::emboss::support::Maybe has_a() const; public: - typename ::emboss::test::GenericVanillaView> + [[nodiscard]] typename ::emboss::test::GenericVanillaView> b() const; - ::emboss::support::Maybe has_b() const; + [[nodiscard]] ::emboss::support::Maybe has_b() const; public: - typename ::emboss::test::GenericVanillaView> + [[nodiscard]] typename ::emboss::test::GenericVanillaView> c() const; - ::emboss::support::Maybe has_c() const; + [[nodiscard]] ::emboss::support::Maybe has_c() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -1548,9 +1464,9 @@ class GenericStructWithSkippedStructureFieldsView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -1559,13 +1475,13 @@ class GenericStructWithSkippedStructureFieldsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -1583,9 +1499,9 @@ class GenericStructWithSkippedStructureFieldsView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -1594,13 +1510,13 @@ class GenericStructWithSkippedStructureFieldsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -1618,9 +1534,9 @@ class GenericStructWithSkippedStructureFieldsView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -1629,13 +1545,13 @@ class GenericStructWithSkippedStructureFieldsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -1666,7 +1582,7 @@ struct EmbossReservedInternalIsGenericStructWithSkippedStructureFieldsView< }; template -inline GenericStructWithSkippedStructureFieldsView< +[[nodiscard]] inline GenericStructWithSkippedStructureFieldsView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -1681,7 +1597,7 @@ MakeStructWithSkippedStructureFieldsView( T &&emboss_reserved_local_arg) { } template -inline GenericStructWithSkippedStructureFieldsView> +[[nodiscard]] inline GenericStructWithSkippedStructureFieldsView> MakeStructWithSkippedStructureFieldsView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericStructWithSkippedStructureFieldsView>( @@ -1690,7 +1606,7 @@ MakeStructWithSkippedStructureFieldsView( T *emboss_reserved_local_data, } template -inline GenericStructWithSkippedStructureFieldsView< +[[nodiscard]] inline GenericStructWithSkippedStructureFieldsView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedStructWithSkippedStructureFieldsView( T *emboss_reserved_local_data, diff --git a/testdata/golden_cpp/uint_sizes.emb.h b/testdata/golden_cpp/uint_sizes.emb.h index 60c8780..e0c25d0 100644 --- a/testdata/golden_cpp/uint_sizes.emb.h +++ b/testdata/golden_cpp/uint_sizes.emb.h @@ -146,107 +146,47 @@ class GenericSizesView final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !one_byte().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !two_byte().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !three_byte().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !four_byte().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !five_byte().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !six_byte().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !seven_byte().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !eight_byte().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!one_byte().Ok()) return false; + if (!two_byte().Ok()) return false; + if (!three_byte().Ok()) return false; + if (!four_byte().Ok()) return false; + if (!five_byte().Ok()) return false; + if (!six_byte().Ok()) return false; + if (!seven_byte().Ok()) return false; + if (!eight_byte().Ok()) return false; + if (!IntrinsicSizeInBytes().Ok()) return false; + if (!MaxSizeInBytes().Ok()) return false; + if (!MinSizeInBytes().Ok()) return false; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - static constexpr ::std::size_t SizeInBytes() { + [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - static constexpr bool SizeIsKnown() { + [[nodiscard]] static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericSizesView emboss_reserved_local_other) const { if (!has_one_byte().Known()) return false; @@ -386,7 +326,7 @@ class GenericSizesView final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericSizesView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_one_byte().ValueOr(false) && @@ -517,7 +457,7 @@ class GenericSizesView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericSizesView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -878,71 +818,71 @@ class GenericSizesView final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> one_byte() const; - ::emboss::support::Maybe has_one_byte() const; + [[nodiscard]] ::emboss::support::Maybe has_one_byte() const; public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<16, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 16>> two_byte() const; - ::emboss::support::Maybe has_two_byte() const; + [[nodiscard]] ::emboss::support::Maybe has_two_byte() const; public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<24, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 24>> three_byte() const; - ::emboss::support::Maybe has_three_byte() const; + [[nodiscard]] ::emboss::support::Maybe has_three_byte() const; public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 32>> four_byte() const; - ::emboss::support::Maybe has_four_byte() const; + [[nodiscard]] ::emboss::support::Maybe has_four_byte() const; public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<40, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 40>> five_byte() const; - ::emboss::support::Maybe has_five_byte() const; + [[nodiscard]] ::emboss::support::Maybe has_five_byte() const; public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<48, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 48>> six_byte() const; - ::emboss::support::Maybe has_six_byte() const; + [[nodiscard]] ::emboss::support::Maybe has_six_byte() const; public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<56, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 56>> seven_byte() const; - ::emboss::support::Maybe has_seven_byte() const; + [[nodiscard]] ::emboss::support::Maybe has_seven_byte() const; public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<64, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 64>> eight_byte() const; - ::emboss::support::Maybe has_eight_byte() const; + [[nodiscard]] ::emboss::support::Maybe has_eight_byte() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -958,9 +898,9 @@ class GenericSizesView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -969,13 +909,13 @@ class GenericSizesView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -993,9 +933,9 @@ class GenericSizesView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -1004,13 +944,13 @@ class GenericSizesView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -1028,9 +968,9 @@ class GenericSizesView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -1039,13 +979,13 @@ class GenericSizesView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -1076,7 +1016,7 @@ struct EmbossReservedInternalIsGenericSizesView< }; template -inline GenericSizesView< +[[nodiscard]] inline GenericSizesView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -1091,7 +1031,7 @@ MakeSizesView( T &&emboss_reserved_local_arg) { } template -inline GenericSizesView> +[[nodiscard]] inline GenericSizesView> MakeSizesView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericSizesView>( @@ -1100,7 +1040,7 @@ MakeSizesView( T *emboss_reserved_local_data, } template -inline GenericSizesView< +[[nodiscard]] inline GenericSizesView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedSizesView( T *emboss_reserved_local_data, @@ -1172,107 +1112,47 @@ class GenericBigEndianSizesView final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !one_byte().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !two_byte().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !three_byte().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !four_byte().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !five_byte().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !six_byte().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !seven_byte().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !eight_byte().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!one_byte().Ok()) return false; + if (!two_byte().Ok()) return false; + if (!three_byte().Ok()) return false; + if (!four_byte().Ok()) return false; + if (!five_byte().Ok()) return false; + if (!six_byte().Ok()) return false; + if (!seven_byte().Ok()) return false; + if (!eight_byte().Ok()) return false; + if (!IntrinsicSizeInBytes().Ok()) return false; + if (!MaxSizeInBytes().Ok()) return false; + if (!MinSizeInBytes().Ok()) return false; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - static constexpr ::std::size_t SizeInBytes() { + [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - static constexpr bool SizeIsKnown() { + [[nodiscard]] static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericBigEndianSizesView emboss_reserved_local_other) const { if (!has_one_byte().Known()) return false; @@ -1412,7 +1292,7 @@ class GenericBigEndianSizesView final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericBigEndianSizesView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_one_byte().ValueOr(false) && @@ -1543,7 +1423,7 @@ class GenericBigEndianSizesView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericBigEndianSizesView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -1904,71 +1784,71 @@ class GenericBigEndianSizesView final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> one_byte() const; - ::emboss::support::Maybe has_one_byte() const; + [[nodiscard]] ::emboss::support::Maybe has_one_byte() const; public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<16, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 16>> two_byte() const; - ::emboss::support::Maybe has_two_byte() const; + [[nodiscard]] ::emboss::support::Maybe has_two_byte() const; public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<24, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 24>> three_byte() const; - ::emboss::support::Maybe has_three_byte() const; + [[nodiscard]] ::emboss::support::Maybe has_three_byte() const; public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 32>> four_byte() const; - ::emboss::support::Maybe has_four_byte() const; + [[nodiscard]] ::emboss::support::Maybe has_four_byte() const; public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<40, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 40>> five_byte() const; - ::emboss::support::Maybe has_five_byte() const; + [[nodiscard]] ::emboss::support::Maybe has_five_byte() const; public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<48, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 48>> six_byte() const; - ::emboss::support::Maybe has_six_byte() const; + [[nodiscard]] ::emboss::support::Maybe has_six_byte() const; public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<56, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 56>> seven_byte() const; - ::emboss::support::Maybe has_seven_byte() const; + [[nodiscard]] ::emboss::support::Maybe has_seven_byte() const; public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<64, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 64>> eight_byte() const; - ::emboss::support::Maybe has_eight_byte() const; + [[nodiscard]] ::emboss::support::Maybe has_eight_byte() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -1984,9 +1864,9 @@ class GenericBigEndianSizesView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -1995,13 +1875,13 @@ class GenericBigEndianSizesView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -2019,9 +1899,9 @@ class GenericBigEndianSizesView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -2030,13 +1910,13 @@ class GenericBigEndianSizesView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -2054,9 +1934,9 @@ class GenericBigEndianSizesView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -2065,13 +1945,13 @@ class GenericBigEndianSizesView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -2102,7 +1982,7 @@ struct EmbossReservedInternalIsGenericBigEndianSizesView< }; template -inline GenericBigEndianSizesView< +[[nodiscard]] inline GenericBigEndianSizesView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -2117,7 +1997,7 @@ MakeBigEndianSizesView( T &&emboss_reserved_local_arg) { } template -inline GenericBigEndianSizesView> +[[nodiscard]] inline GenericBigEndianSizesView> MakeBigEndianSizesView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericBigEndianSizesView>( @@ -2126,7 +2006,7 @@ MakeBigEndianSizesView( T *emboss_reserved_local_data, } template -inline GenericBigEndianSizesView< +[[nodiscard]] inline GenericBigEndianSizesView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedBigEndianSizesView( T *emboss_reserved_local_data, @@ -2198,107 +2078,47 @@ class GenericAlternatingEndianSizesView final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !one_byte().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !two_byte().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !three_byte().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !four_byte().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !five_byte().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !six_byte().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !seven_byte().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !eight_byte().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!one_byte().Ok()) return false; + if (!two_byte().Ok()) return false; + if (!three_byte().Ok()) return false; + if (!four_byte().Ok()) return false; + if (!five_byte().Ok()) return false; + if (!six_byte().Ok()) return false; + if (!seven_byte().Ok()) return false; + if (!eight_byte().Ok()) return false; + if (!IntrinsicSizeInBytes().Ok()) return false; + if (!MaxSizeInBytes().Ok()) return false; + if (!MinSizeInBytes().Ok()) return false; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - static constexpr ::std::size_t SizeInBytes() { + [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - static constexpr bool SizeIsKnown() { + [[nodiscard]] static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericAlternatingEndianSizesView emboss_reserved_local_other) const { if (!has_one_byte().Known()) return false; @@ -2438,7 +2258,7 @@ class GenericAlternatingEndianSizesView final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericAlternatingEndianSizesView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_one_byte().ValueOr(false) && @@ -2569,7 +2389,7 @@ class GenericAlternatingEndianSizesView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericAlternatingEndianSizesView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -2930,71 +2750,71 @@ class GenericAlternatingEndianSizesView final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> one_byte() const; - ::emboss::support::Maybe has_one_byte() const; + [[nodiscard]] ::emboss::support::Maybe has_one_byte() const; public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<16, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 16>> two_byte() const; - ::emboss::support::Maybe has_two_byte() const; + [[nodiscard]] ::emboss::support::Maybe has_two_byte() const; public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<24, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 24>> three_byte() const; - ::emboss::support::Maybe has_three_byte() const; + [[nodiscard]] ::emboss::support::Maybe has_three_byte() const; public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 32>> four_byte() const; - ::emboss::support::Maybe has_four_byte() const; + [[nodiscard]] ::emboss::support::Maybe has_four_byte() const; public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<40, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 40>> five_byte() const; - ::emboss::support::Maybe has_five_byte() const; + [[nodiscard]] ::emboss::support::Maybe has_five_byte() const; public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<48, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 48>> six_byte() const; - ::emboss::support::Maybe has_six_byte() const; + [[nodiscard]] ::emboss::support::Maybe has_six_byte() const; public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<56, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 56>> seven_byte() const; - ::emboss::support::Maybe has_seven_byte() const; + [[nodiscard]] ::emboss::support::Maybe has_seven_byte() const; public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<64, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 64>> eight_byte() const; - ::emboss::support::Maybe has_eight_byte() const; + [[nodiscard]] ::emboss::support::Maybe has_eight_byte() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -3010,9 +2830,9 @@ class GenericAlternatingEndianSizesView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -3021,13 +2841,13 @@ class GenericAlternatingEndianSizesView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -3045,9 +2865,9 @@ class GenericAlternatingEndianSizesView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -3056,13 +2876,13 @@ class GenericAlternatingEndianSizesView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -3080,9 +2900,9 @@ class GenericAlternatingEndianSizesView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -3091,13 +2911,13 @@ class GenericAlternatingEndianSizesView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -3128,7 +2948,7 @@ struct EmbossReservedInternalIsGenericAlternatingEndianSizesView< }; template -inline GenericAlternatingEndianSizesView< +[[nodiscard]] inline GenericAlternatingEndianSizesView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -3143,7 +2963,7 @@ MakeAlternatingEndianSizesView( T &&emboss_reserved_local_arg) { } template -inline GenericAlternatingEndianSizesView> +[[nodiscard]] inline GenericAlternatingEndianSizesView> MakeAlternatingEndianSizesView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericAlternatingEndianSizesView>( @@ -3152,7 +2972,7 @@ MakeAlternatingEndianSizesView( T *emboss_reserved_local_data, } template -inline GenericAlternatingEndianSizesView< +[[nodiscard]] inline GenericAlternatingEndianSizesView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedAlternatingEndianSizesView( T *emboss_reserved_local_data, @@ -3224,107 +3044,47 @@ class GenericEnumSizesView final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !one_byte().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !two_byte().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !three_byte().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !four_byte().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !five_byte().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !six_byte().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !seven_byte().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !eight_byte().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!one_byte().Ok()) return false; + if (!two_byte().Ok()) return false; + if (!three_byte().Ok()) return false; + if (!four_byte().Ok()) return false; + if (!five_byte().Ok()) return false; + if (!six_byte().Ok()) return false; + if (!seven_byte().Ok()) return false; + if (!eight_byte().Ok()) return false; + if (!IntrinsicSizeInBytes().Ok()) return false; + if (!MaxSizeInBytes().Ok()) return false; + if (!MinSizeInBytes().Ok()) return false; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - static constexpr ::std::size_t SizeInBytes() { + [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - static constexpr bool SizeIsKnown() { + [[nodiscard]] static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericEnumSizesView emboss_reserved_local_other) const { if (!has_one_byte().Known()) return false; @@ -3464,7 +3224,7 @@ class GenericEnumSizesView final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericEnumSizesView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_one_byte().ValueOr(false) && @@ -3595,7 +3355,7 @@ class GenericEnumSizesView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericEnumSizesView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -3956,79 +3716,79 @@ class GenericEnumSizesView final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: - typename ::emboss::support::EnumView< + [[nodiscard]] typename ::emboss::support::EnumView< /**/ ::emboss::test::Enum, ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> one_byte() const; - ::emboss::support::Maybe has_one_byte() const; + [[nodiscard]] ::emboss::support::Maybe has_one_byte() const; public: - typename ::emboss::support::EnumView< + [[nodiscard]] typename ::emboss::support::EnumView< /**/ ::emboss::test::Enum, ::emboss::support::FixedSizeViewParameters<16, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 16>> two_byte() const; - ::emboss::support::Maybe has_two_byte() const; + [[nodiscard]] ::emboss::support::Maybe has_two_byte() const; public: - typename ::emboss::support::EnumView< + [[nodiscard]] typename ::emboss::support::EnumView< /**/ ::emboss::test::Enum, ::emboss::support::FixedSizeViewParameters<24, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 24>> three_byte() const; - ::emboss::support::Maybe has_three_byte() const; + [[nodiscard]] ::emboss::support::Maybe has_three_byte() const; public: - typename ::emboss::support::EnumView< + [[nodiscard]] typename ::emboss::support::EnumView< /**/ ::emboss::test::Enum, ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 32>> four_byte() const; - ::emboss::support::Maybe has_four_byte() const; + [[nodiscard]] ::emboss::support::Maybe has_four_byte() const; public: - typename ::emboss::support::EnumView< + [[nodiscard]] typename ::emboss::support::EnumView< /**/ ::emboss::test::Enum, ::emboss::support::FixedSizeViewParameters<40, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 40>> five_byte() const; - ::emboss::support::Maybe has_five_byte() const; + [[nodiscard]] ::emboss::support::Maybe has_five_byte() const; public: - typename ::emboss::support::EnumView< + [[nodiscard]] typename ::emboss::support::EnumView< /**/ ::emboss::test::Enum, ::emboss::support::FixedSizeViewParameters<48, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 48>> six_byte() const; - ::emboss::support::Maybe has_six_byte() const; + [[nodiscard]] ::emboss::support::Maybe has_six_byte() const; public: - typename ::emboss::support::EnumView< + [[nodiscard]] typename ::emboss::support::EnumView< /**/ ::emboss::test::Enum, ::emboss::support::FixedSizeViewParameters<56, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 56>> seven_byte() const; - ::emboss::support::Maybe has_seven_byte() const; + [[nodiscard]] ::emboss::support::Maybe has_seven_byte() const; public: - typename ::emboss::support::EnumView< + [[nodiscard]] typename ::emboss::support::EnumView< /**/ ::emboss::test::Enum, ::emboss::support::FixedSizeViewParameters<64, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 64>> eight_byte() const; - ::emboss::support::Maybe has_eight_byte() const; + [[nodiscard]] ::emboss::support::Maybe has_eight_byte() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -4044,9 +3804,9 @@ class GenericEnumSizesView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -4055,13 +3815,13 @@ class GenericEnumSizesView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -4079,9 +3839,9 @@ class GenericEnumSizesView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -4090,13 +3850,13 @@ class GenericEnumSizesView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -4114,9 +3874,9 @@ class GenericEnumSizesView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -4125,13 +3885,13 @@ class GenericEnumSizesView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -4162,7 +3922,7 @@ struct EmbossReservedInternalIsGenericEnumSizesView< }; template -inline GenericEnumSizesView< +[[nodiscard]] inline GenericEnumSizesView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -4177,7 +3937,7 @@ MakeEnumSizesView( T &&emboss_reserved_local_arg) { } template -inline GenericEnumSizesView> +[[nodiscard]] inline GenericEnumSizesView> MakeEnumSizesView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericEnumSizesView>( @@ -4186,7 +3946,7 @@ MakeEnumSizesView( T *emboss_reserved_local_data, } template -inline GenericEnumSizesView< +[[nodiscard]] inline GenericEnumSizesView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedEnumSizesView( T *emboss_reserved_local_data, @@ -4259,58 +4019,40 @@ class GenericEmbossReservedAnonymousField1View final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !three_and_a_half_byte().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBits().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBits().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBits().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!three_and_a_half_byte().Ok()) return false; + if (!IntrinsicSizeInBits().Ok()) return false; + if (!MaxSizeInBits().Ok()) return false; + if (!MinSizeInBits().Ok()) return false; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBits().Ok() && backing_.SizeInBits() >= static_cast( IntrinsicSizeInBits().UncheckedRead()); } - static constexpr ::std::size_t SizeInBits() { + [[nodiscard]] static constexpr ::std::size_t SizeInBits() { return static_cast(IntrinsicSizeInBits().Read()); } - static constexpr bool SizeIsKnown() { + [[nodiscard]] static constexpr bool SizeIsKnown() { return IntrinsicSizeInBits().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericEmbossReservedAnonymousField1View emboss_reserved_local_other) const { if (!has_three_and_a_half_byte().Known()) return false; @@ -4331,7 +4073,7 @@ class GenericEmbossReservedAnonymousField1View final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericEmbossReservedAnonymousField1View emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_three_and_a_half_byte().ValueOr(false) && @@ -4364,7 +4106,7 @@ class GenericEmbossReservedAnonymousField1View final { emboss_reserved_local_other.IntrinsicSizeInBits().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericEmbossReservedAnonymousField1View emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -4459,16 +4201,16 @@ class GenericEmbossReservedAnonymousField1View final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: - typename ::emboss::support::EnumView< + [[nodiscard]] typename ::emboss::support::EnumView< /**/ ::emboss::test::ExplicitlySizedEnum, ::emboss::support::FixedSizeViewParameters<28, ::emboss::support::AllValuesAreOk>, typename Storage::template OffsetStorageType> three_and_a_half_byte() const; - ::emboss::support::Maybe has_three_and_a_half_byte() const; + [[nodiscard]] ::emboss::support::Maybe has_three_and_a_half_byte() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBitsView final { @@ -4484,9 +4226,9 @@ class GenericEmbossReservedAnonymousField1View final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBitsView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -4495,13 +4237,13 @@ class GenericEmbossReservedAnonymousField1View final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBitsView IntrinsicSizeInBits() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBitsView IntrinsicSizeInBits() { return EmbossReservedDollarVirtualIntrinsicSizeInBitsView(); } - static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBits() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBits() { return ::emboss::support::Maybe(true); } @@ -4519,9 +4261,9 @@ class GenericEmbossReservedAnonymousField1View final { default; ~EmbossReservedDollarVirtualMaxSizeInBitsView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -4530,13 +4272,13 @@ class GenericEmbossReservedAnonymousField1View final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBitsView MaxSizeInBits() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBitsView MaxSizeInBits() { return EmbossReservedDollarVirtualMaxSizeInBitsView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBits() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBits() { return ::emboss::support::Maybe(true); } @@ -4554,9 +4296,9 @@ class GenericEmbossReservedAnonymousField1View final { default; ~EmbossReservedDollarVirtualMinSizeInBitsView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -4565,13 +4307,13 @@ class GenericEmbossReservedAnonymousField1View final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBitsView MinSizeInBits() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBitsView MinSizeInBits() { return EmbossReservedDollarVirtualMinSizeInBitsView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBits() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBits() { return ::emboss::support::Maybe(true); } @@ -4602,7 +4344,7 @@ struct EmbossReservedInternalIsGenericEmbossReservedAnonymousField1View< }; template -inline GenericEmbossReservedAnonymousField1View< +[[nodiscard]] inline GenericEmbossReservedAnonymousField1View< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -4617,7 +4359,7 @@ MakeEmbossReservedAnonymousField1View( T &&emboss_reserved_local_arg) { } template -inline GenericEmbossReservedAnonymousField1View> +[[nodiscard]] inline GenericEmbossReservedAnonymousField1View> MakeEmbossReservedAnonymousField1View( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericEmbossReservedAnonymousField1View>( @@ -4626,7 +4368,7 @@ MakeEmbossReservedAnonymousField1View( T *emboss_reserved_local_data, } template -inline GenericEmbossReservedAnonymousField1View< +[[nodiscard]] inline GenericEmbossReservedAnonymousField1View< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedEmbossReservedAnonymousField1View( T *emboss_reserved_local_data, @@ -4687,86 +4429,51 @@ class GenericExplicitlySizedEnumSizesView final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; + const auto emboss_reserved_local_ok_subexpr_1 = ::emboss::support::And(::emboss::support::Maybe(true), ::emboss::support::Maybe(true)); { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !one_byte().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !two_byte().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !three_byte().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !emboss_reserved_anonymous_field_1().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::And(::emboss::support::Maybe(true), ::emboss::support::Maybe(true)); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !three_and_a_half_byte().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!one_byte().Ok()) return false; + if (!two_byte().Ok()) return false; + if (!three_byte().Ok()) return false; + if (!emboss_reserved_anonymous_field_1().Ok()) return false; + if (!IntrinsicSizeInBytes().Ok()) return false; + if (!MaxSizeInBytes().Ok()) return false; + if (!MinSizeInBytes().Ok()) return false; + } } - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = emboss_reserved_local_ok_subexpr_1; + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!three_and_a_half_byte().Ok()) return false; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - static constexpr ::std::size_t SizeInBytes() { + [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - static constexpr bool SizeIsKnown() { + [[nodiscard]] static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericExplicitlySizedEnumSizesView emboss_reserved_local_other) const { if (!has_one_byte().Known()) return false; @@ -4838,7 +4545,7 @@ class GenericExplicitlySizedEnumSizesView final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericExplicitlySizedEnumSizesView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_one_byte().ValueOr(false) && @@ -4913,7 +4620,7 @@ class GenericExplicitlySizedEnumSizesView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericExplicitlySizedEnumSizesView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -5122,47 +4829,47 @@ class GenericExplicitlySizedEnumSizesView final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: - typename ::emboss::support::EnumView< + [[nodiscard]] typename ::emboss::support::EnumView< /**/ ::emboss::test::ExplicitlySizedEnum, ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> one_byte() const; - ::emboss::support::Maybe has_one_byte() const; + [[nodiscard]] ::emboss::support::Maybe has_one_byte() const; public: - typename ::emboss::support::EnumView< + [[nodiscard]] typename ::emboss::support::EnumView< /**/ ::emboss::test::ExplicitlySizedEnum, ::emboss::support::FixedSizeViewParameters<16, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 16>> two_byte() const; - ::emboss::support::Maybe has_two_byte() const; + [[nodiscard]] ::emboss::support::Maybe has_two_byte() const; public: - typename ::emboss::support::EnumView< + [[nodiscard]] typename ::emboss::support::EnumView< /**/ ::emboss::test::ExplicitlySizedEnum, ::emboss::support::FixedSizeViewParameters<24, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 24>> three_byte() const; - ::emboss::support::Maybe has_three_byte() const; + [[nodiscard]] ::emboss::support::Maybe has_three_byte() const; private: - typename ::emboss::test::ExplicitlySizedEnumSizes::GenericEmbossReservedAnonymousField1View>, 32>> + [[nodiscard]] typename ::emboss::test::ExplicitlySizedEnumSizes::GenericEmbossReservedAnonymousField1View>, 32>> emboss_reserved_anonymous_field_1() const; - ::emboss::support::Maybe has_emboss_reserved_anonymous_field_1() const; + [[nodiscard]] ::emboss::support::Maybe has_emboss_reserved_anonymous_field_1() const; public: - auto three_and_a_half_byte() const -> decltype(this->emboss_reserved_anonymous_field_1().three_and_a_half_byte()) { + [[nodiscard]] auto three_and_a_half_byte() const -> decltype(this->emboss_reserved_anonymous_field_1().three_and_a_half_byte()) { return has_three_and_a_half_byte().ValueOrDefault() ? emboss_reserved_anonymous_field_1().three_and_a_half_byte() : decltype(this->emboss_reserved_anonymous_field_1().three_and_a_half_byte())(); } - ::emboss::support::Maybe has_three_and_a_half_byte() const; + [[nodiscard]] ::emboss::support::Maybe has_three_and_a_half_byte() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -5178,9 +4885,9 @@ class GenericExplicitlySizedEnumSizesView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -5189,13 +4896,13 @@ class GenericExplicitlySizedEnumSizesView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -5213,9 +4920,9 @@ class GenericExplicitlySizedEnumSizesView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -5224,13 +4931,13 @@ class GenericExplicitlySizedEnumSizesView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -5248,9 +4955,9 @@ class GenericExplicitlySizedEnumSizesView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -5259,13 +4966,13 @@ class GenericExplicitlySizedEnumSizesView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -5296,7 +5003,7 @@ struct EmbossReservedInternalIsGenericExplicitlySizedEnumSizesView< }; template -inline GenericExplicitlySizedEnumSizesView< +[[nodiscard]] inline GenericExplicitlySizedEnumSizesView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -5311,7 +5018,7 @@ MakeExplicitlySizedEnumSizesView( T &&emboss_reserved_local_arg) { } template -inline GenericExplicitlySizedEnumSizesView> +[[nodiscard]] inline GenericExplicitlySizedEnumSizesView> MakeExplicitlySizedEnumSizesView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericExplicitlySizedEnumSizesView>( @@ -5320,7 +5027,7 @@ MakeExplicitlySizedEnumSizesView( T *emboss_reserved_local_data, } template -inline GenericExplicitlySizedEnumSizesView< +[[nodiscard]] inline GenericExplicitlySizedEnumSizesView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedExplicitlySizedEnumSizesView( T *emboss_reserved_local_data, @@ -5686,107 +5393,47 @@ class GenericArraySizesView final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !one_byte().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !two_byte().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !three_byte().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !four_byte().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !five_byte().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !six_byte().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !seven_byte().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !eight_byte().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!one_byte().Ok()) return false; + if (!two_byte().Ok()) return false; + if (!three_byte().Ok()) return false; + if (!four_byte().Ok()) return false; + if (!five_byte().Ok()) return false; + if (!six_byte().Ok()) return false; + if (!seven_byte().Ok()) return false; + if (!eight_byte().Ok()) return false; + if (!IntrinsicSizeInBytes().Ok()) return false; + if (!MaxSizeInBytes().Ok()) return false; + if (!MinSizeInBytes().Ok()) return false; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - static constexpr ::std::size_t SizeInBytes() { + [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - static constexpr bool SizeIsKnown() { + [[nodiscard]] static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericArraySizesView emboss_reserved_local_other) const { if (!has_one_byte().Known()) return false; @@ -5926,7 +5573,7 @@ class GenericArraySizesView final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericArraySizesView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_one_byte().ValueOr(false) && @@ -6057,7 +5704,7 @@ class GenericArraySizesView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericArraySizesView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -6418,10 +6065,10 @@ class GenericArraySizesView final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: - typename ::emboss::support::GenericArrayView< + [[nodiscard]] typename ::emboss::support::GenericArrayView< typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock::template OffsetStorageType>, 8>> @@ -6430,10 +6077,10 @@ class GenericArraySizesView final { 8 > one_byte() const; - ::emboss::support::Maybe has_one_byte() const; + [[nodiscard]] ::emboss::support::Maybe has_one_byte() const; public: - typename ::emboss::support::GenericArrayView< + [[nodiscard]] typename ::emboss::support::GenericArrayView< typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<16, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock::template OffsetStorageType>, 16>> @@ -6442,10 +6089,10 @@ class GenericArraySizesView final { 8 > two_byte() const; - ::emboss::support::Maybe has_two_byte() const; + [[nodiscard]] ::emboss::support::Maybe has_two_byte() const; public: - typename ::emboss::support::GenericArrayView< + [[nodiscard]] typename ::emboss::support::GenericArrayView< typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<24, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock::template OffsetStorageType>, 24>> @@ -6454,10 +6101,10 @@ class GenericArraySizesView final { 8 > three_byte() const; - ::emboss::support::Maybe has_three_byte() const; + [[nodiscard]] ::emboss::support::Maybe has_three_byte() const; public: - typename ::emboss::support::GenericArrayView< + [[nodiscard]] typename ::emboss::support::GenericArrayView< typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock::template OffsetStorageType>, 32>> @@ -6466,10 +6113,10 @@ class GenericArraySizesView final { 8 > four_byte() const; - ::emboss::support::Maybe has_four_byte() const; + [[nodiscard]] ::emboss::support::Maybe has_four_byte() const; public: - typename ::emboss::support::GenericArrayView< + [[nodiscard]] typename ::emboss::support::GenericArrayView< typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<40, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock::template OffsetStorageType>, 40>> @@ -6478,10 +6125,10 @@ class GenericArraySizesView final { 8 > five_byte() const; - ::emboss::support::Maybe has_five_byte() const; + [[nodiscard]] ::emboss::support::Maybe has_five_byte() const; public: - typename ::emboss::support::GenericArrayView< + [[nodiscard]] typename ::emboss::support::GenericArrayView< typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<48, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock::template OffsetStorageType>, 48>> @@ -6490,10 +6137,10 @@ class GenericArraySizesView final { 8 > six_byte() const; - ::emboss::support::Maybe has_six_byte() const; + [[nodiscard]] ::emboss::support::Maybe has_six_byte() const; public: - typename ::emboss::support::GenericArrayView< + [[nodiscard]] typename ::emboss::support::GenericArrayView< typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<56, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock::template OffsetStorageType>, 56>> @@ -6502,10 +6149,10 @@ class GenericArraySizesView final { 8 > seven_byte() const; - ::emboss::support::Maybe has_seven_byte() const; + [[nodiscard]] ::emboss::support::Maybe has_seven_byte() const; public: - typename ::emboss::support::GenericArrayView< + [[nodiscard]] typename ::emboss::support::GenericArrayView< typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<64, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock::template OffsetStorageType>, 64>> @@ -6514,7 +6161,7 @@ class GenericArraySizesView final { 8 > eight_byte() const; - ::emboss::support::Maybe has_eight_byte() const; + [[nodiscard]] ::emboss::support::Maybe has_eight_byte() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -6530,9 +6177,9 @@ class GenericArraySizesView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -6541,13 +6188,13 @@ class GenericArraySizesView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -6565,9 +6212,9 @@ class GenericArraySizesView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -6576,13 +6223,13 @@ class GenericArraySizesView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -6600,9 +6247,9 @@ class GenericArraySizesView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -6611,13 +6258,13 @@ class GenericArraySizesView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -6648,7 +6295,7 @@ struct EmbossReservedInternalIsGenericArraySizesView< }; template -inline GenericArraySizesView< +[[nodiscard]] inline GenericArraySizesView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -6663,7 +6310,7 @@ MakeArraySizesView( T &&emboss_reserved_local_arg) { } template -inline GenericArraySizesView> +[[nodiscard]] inline GenericArraySizesView> MakeArraySizesView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericArraySizesView>( @@ -6672,7 +6319,7 @@ MakeArraySizesView( T *emboss_reserved_local_data, } template -inline GenericArraySizesView< +[[nodiscard]] inline GenericArraySizesView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedArraySizesView( T *emboss_reserved_local_data, diff --git a/testdata/golden_cpp/virtual_field.emb.h b/testdata/golden_cpp/virtual_field.emb.h index d2544ed..81804fd 100644 --- a/testdata/golden_cpp/virtual_field.emb.h +++ b/testdata/golden_cpp/virtual_field.emb.h @@ -250,121 +250,49 @@ class GenericStructureWithConstantsView final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !ten().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !twenty().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !four_billion().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !ten_billion().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !minus_ten_billion().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !value().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !alias_of_value().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !alias_of_alias_of_value().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !alias_of_ten().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !alias_of_alias_of_ten().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!ten().Ok()) return false; + if (!twenty().Ok()) return false; + if (!four_billion().Ok()) return false; + if (!ten_billion().Ok()) return false; + if (!minus_ten_billion().Ok()) return false; + if (!value().Ok()) return false; + if (!alias_of_value().Ok()) return false; + if (!alias_of_alias_of_value().Ok()) return false; + if (!alias_of_ten().Ok()) return false; + if (!alias_of_alias_of_ten().Ok()) return false; + if (!IntrinsicSizeInBytes().Ok()) return false; + if (!MaxSizeInBytes().Ok()) return false; + if (!MinSizeInBytes().Ok()) return false; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - static constexpr ::std::size_t SizeInBytes() { + [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - static constexpr bool SizeIsKnown() { + [[nodiscard]] static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericStructureWithConstantsView emboss_reserved_local_other) const { if (!has_value().Known()) return false; @@ -385,7 +313,7 @@ class GenericStructureWithConstantsView final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericStructureWithConstantsView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_value().ValueOr(false) && @@ -418,7 +346,7 @@ class GenericStructureWithConstantsView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericStructureWithConstantsView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -722,7 +650,7 @@ class GenericStructureWithConstantsView final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: class EmbossReservedVirtualTenView final { @@ -738,9 +666,9 @@ class GenericStructureWithConstantsView final { default; ~EmbossReservedVirtualTenView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -749,13 +677,13 @@ class GenericStructureWithConstantsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedVirtualTenView ten() { + [[nodiscard]] static constexpr EmbossReservedVirtualTenView ten() { return EmbossReservedVirtualTenView(); } - static constexpr ::emboss::support::Maybe has_ten() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_ten() { return ::emboss::support::Maybe(true); } @@ -773,9 +701,9 @@ class GenericStructureWithConstantsView final { default; ~EmbossReservedVirtualTwentyView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -784,13 +712,13 @@ class GenericStructureWithConstantsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedVirtualTwentyView twenty() { + [[nodiscard]] static constexpr EmbossReservedVirtualTwentyView twenty() { return EmbossReservedVirtualTwentyView(); } - static constexpr ::emboss::support::Maybe has_twenty() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_twenty() { return ::emboss::support::Maybe(true); } @@ -808,9 +736,9 @@ class GenericStructureWithConstantsView final { default; ~EmbossReservedVirtualFourBillionView() = default; - static constexpr ::std::uint32_t Read(); - static constexpr ::std::uint32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::uint32_t Read(); + [[nodiscard]] static constexpr ::std::uint32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -819,13 +747,13 @@ class GenericStructureWithConstantsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedVirtualFourBillionView four_billion() { + [[nodiscard]] static constexpr EmbossReservedVirtualFourBillionView four_billion() { return EmbossReservedVirtualFourBillionView(); } - static constexpr ::emboss::support::Maybe has_four_billion() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_four_billion() { return ::emboss::support::Maybe(true); } @@ -843,9 +771,9 @@ class GenericStructureWithConstantsView final { default; ~EmbossReservedVirtualTenBillionView() = default; - static constexpr ::std::int64_t Read(); - static constexpr ::std::int64_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int64_t Read(); + [[nodiscard]] static constexpr ::std::int64_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -854,13 +782,13 @@ class GenericStructureWithConstantsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedVirtualTenBillionView ten_billion() { + [[nodiscard]] static constexpr EmbossReservedVirtualTenBillionView ten_billion() { return EmbossReservedVirtualTenBillionView(); } - static constexpr ::emboss::support::Maybe has_ten_billion() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_ten_billion() { return ::emboss::support::Maybe(true); } @@ -878,9 +806,9 @@ class GenericStructureWithConstantsView final { default; ~EmbossReservedVirtualMinusTenBillionView() = default; - static constexpr ::std::int64_t Read(); - static constexpr ::std::int64_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int64_t Read(); + [[nodiscard]] static constexpr ::std::int64_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -889,37 +817,37 @@ class GenericStructureWithConstantsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedVirtualMinusTenBillionView minus_ten_billion() { + [[nodiscard]] static constexpr EmbossReservedVirtualMinusTenBillionView minus_ten_billion() { return EmbossReservedVirtualMinusTenBillionView(); } - static constexpr ::emboss::support::Maybe has_minus_ten_billion() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_minus_ten_billion() { return ::emboss::support::Maybe(true); } public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 32>> value() const; - ::emboss::support::Maybe has_value() const; + [[nodiscard]] ::emboss::support::Maybe has_value() const; public: - auto alias_of_value() const -> decltype(this->value()) { + [[nodiscard]] auto alias_of_value() const -> decltype(this->value()) { return has_alias_of_value().ValueOrDefault() ? value() : decltype(this->value())(); } - ::emboss::support::Maybe has_alias_of_value() const; + [[nodiscard]] ::emboss::support::Maybe has_alias_of_value() const; public: - auto alias_of_alias_of_value() const -> decltype(this->alias_of_value()) { + [[nodiscard]] auto alias_of_alias_of_value() const -> decltype(this->alias_of_value()) { return has_alias_of_alias_of_value().ValueOrDefault() ? alias_of_value() : decltype(this->alias_of_value())(); } - ::emboss::support::Maybe has_alias_of_alias_of_value() const; + [[nodiscard]] ::emboss::support::Maybe has_alias_of_alias_of_value() const; public: class EmbossReservedVirtualAliasOfTenView final { @@ -935,9 +863,9 @@ class GenericStructureWithConstantsView final { default; ~EmbossReservedVirtualAliasOfTenView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -946,13 +874,13 @@ class GenericStructureWithConstantsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedVirtualAliasOfTenView alias_of_ten() { + [[nodiscard]] static constexpr EmbossReservedVirtualAliasOfTenView alias_of_ten() { return EmbossReservedVirtualAliasOfTenView(); } - static constexpr ::emboss::support::Maybe has_alias_of_ten() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_alias_of_ten() { return ::emboss::support::Maybe(true); } @@ -970,9 +898,9 @@ class GenericStructureWithConstantsView final { default; ~EmbossReservedVirtualAliasOfAliasOfTenView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -981,13 +909,13 @@ class GenericStructureWithConstantsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedVirtualAliasOfAliasOfTenView alias_of_alias_of_ten() { + [[nodiscard]] static constexpr EmbossReservedVirtualAliasOfAliasOfTenView alias_of_alias_of_ten() { return EmbossReservedVirtualAliasOfAliasOfTenView(); } - static constexpr ::emboss::support::Maybe has_alias_of_alias_of_ten() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_alias_of_alias_of_ten() { return ::emboss::support::Maybe(true); } @@ -1005,9 +933,9 @@ class GenericStructureWithConstantsView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -1016,13 +944,13 @@ class GenericStructureWithConstantsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -1040,9 +968,9 @@ class GenericStructureWithConstantsView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -1051,13 +979,13 @@ class GenericStructureWithConstantsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -1075,9 +1003,9 @@ class GenericStructureWithConstantsView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -1086,13 +1014,13 @@ class GenericStructureWithConstantsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -1123,7 +1051,7 @@ struct EmbossReservedInternalIsGenericStructureWithConstantsView< }; template -inline GenericStructureWithConstantsView< +[[nodiscard]] inline GenericStructureWithConstantsView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -1138,7 +1066,7 @@ MakeStructureWithConstantsView( T &&emboss_reserved_local_arg) { } template -inline GenericStructureWithConstantsView> +[[nodiscard]] inline GenericStructureWithConstantsView> MakeStructureWithConstantsView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericStructureWithConstantsView>( @@ -1147,7 +1075,7 @@ MakeStructureWithConstantsView( T *emboss_reserved_local_data, } template -inline GenericStructureWithConstantsView< +[[nodiscard]] inline GenericStructureWithConstantsView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedStructureWithConstantsView( T *emboss_reserved_local_data, @@ -1218,100 +1146,46 @@ class GenericStructureWithComputedValuesView final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !value().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !doubled().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !plus_ten().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !value2().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !signed_doubled().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !signed_plus_ten().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !product().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!value().Ok()) return false; + if (!doubled().Ok()) return false; + if (!plus_ten().Ok()) return false; + if (!value2().Ok()) return false; + if (!signed_doubled().Ok()) return false; + if (!signed_plus_ten().Ok()) return false; + if (!product().Ok()) return false; + if (!IntrinsicSizeInBytes().Ok()) return false; + if (!MaxSizeInBytes().Ok()) return false; + if (!MinSizeInBytes().Ok()) return false; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - static constexpr ::std::size_t SizeInBytes() { + [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - static constexpr bool SizeIsKnown() { + [[nodiscard]] static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericStructureWithComputedValuesView emboss_reserved_local_other) const { if (!has_value().Known()) return false; @@ -1349,7 +1223,7 @@ class GenericStructureWithComputedValuesView final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericStructureWithComputedValuesView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_value().ValueOr(false) && @@ -1396,7 +1270,7 @@ class GenericStructureWithComputedValuesView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericStructureWithComputedValuesView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -1662,15 +1536,15 @@ class GenericStructureWithComputedValuesView final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 32>> value() const; - ::emboss::support::Maybe has_value() const; + [[nodiscard]] ::emboss::support::Maybe has_value() const; public: class EmbossReservedVirtualDoubledView final { @@ -1689,17 +1563,17 @@ class GenericStructureWithComputedValuesView final { default; ~EmbossReservedVirtualDoubledView() = default; - ::std::int64_t Read() const { + [[nodiscard]] ::std::int64_t Read() const { EMBOSS_CHECK(view_.has_doubled().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - ::std::int64_t UncheckedRead() const { + [[nodiscard]] ::std::int64_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - bool Ok() const { + [[nodiscard]] bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -1712,12 +1586,12 @@ class GenericStructureWithComputedValuesView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } private: - ::emboss::support::Maybe MaybeRead() const { + [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.value(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Product(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(2LL))); @@ -1725,7 +1599,7 @@ class GenericStructureWithComputedValuesView final { return emboss_reserved_local_subexpr_3; } - static constexpr bool ValueIsOk( + [[nodiscard]] static constexpr bool ValueIsOk( ::std::int64_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -1733,8 +1607,8 @@ class GenericStructureWithComputedValuesView final { const GenericStructureWithComputedValuesView view_; }; - EmbossReservedVirtualDoubledView doubled() const; - ::emboss::support::Maybe has_doubled() const; + [[nodiscard]] EmbossReservedVirtualDoubledView doubled() const; + [[nodiscard]] ::emboss::support::Maybe has_doubled() const; public: class EmbossReservedVirtualPlusTenView final { @@ -1753,17 +1627,17 @@ class GenericStructureWithComputedValuesView final { default; ~EmbossReservedVirtualPlusTenView() = default; - ::std::int64_t Read() const { + [[nodiscard]] ::std::int64_t Read() const { EMBOSS_CHECK(view_.has_plus_ten().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - ::std::int64_t UncheckedRead() const { + [[nodiscard]] ::std::int64_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - bool Ok() const { + [[nodiscard]] bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -1776,9 +1650,9 @@ class GenericStructureWithComputedValuesView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } - bool TryToWrite(::std::int64_t emboss_reserved_local_value) { + [[nodiscard]] bool TryToWrite(::std::int64_t emboss_reserved_local_value) { const auto emboss_reserved_local_maybe_new_value = ::emboss::support::Difference(::emboss::support::Maybe(emboss_reserved_local_value), ::emboss::support::Maybe(static_cast(10LL))); if (!CouldWriteValue(emboss_reserved_local_value)) return false; return view_.value().TryToWrite( @@ -1792,7 +1666,7 @@ class GenericStructureWithComputedValuesView final { void UncheckedWrite(::std::int64_t emboss_reserved_local_value) { view_.value().UncheckedWrite((::emboss::support::Difference(::emboss::support::Maybe(emboss_reserved_local_value), ::emboss::support::Maybe(static_cast(10LL)))).ValueOrDefault()); } - bool CouldWriteValue(::std::int64_t emboss_reserved_local_value) { + [[nodiscard]] bool CouldWriteValue(::std::int64_t emboss_reserved_local_value) { if (!ValueIsOk(emboss_reserved_local_value)) return false; const auto emboss_reserved_local_maybe_new_value = ::emboss::support::Difference(::emboss::support::Maybe(emboss_reserved_local_value), ::emboss::support::Maybe(static_cast(10LL))); if (!emboss_reserved_local_maybe_new_value.Known()) return false; @@ -1808,7 +1682,7 @@ class GenericStructureWithComputedValuesView final { private: - ::emboss::support::Maybe MaybeRead() const { + [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.value(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Sum(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(10LL))); @@ -1816,7 +1690,7 @@ class GenericStructureWithComputedValuesView final { return emboss_reserved_local_subexpr_3; } - static constexpr bool ValueIsOk( + [[nodiscard]] static constexpr bool ValueIsOk( ::std::int64_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -1824,16 +1698,16 @@ class GenericStructureWithComputedValuesView final { const GenericStructureWithComputedValuesView view_; }; - EmbossReservedVirtualPlusTenView plus_ten() const; - ::emboss::support::Maybe has_plus_ten() const; + [[nodiscard]] EmbossReservedVirtualPlusTenView plus_ten() const; + [[nodiscard]] ::emboss::support::Maybe has_plus_ten() const; public: - typename ::emboss::prelude::IntView< + [[nodiscard]] typename ::emboss::prelude::IntView< /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 32>> value2() const; - ::emboss::support::Maybe has_value2() const; + [[nodiscard]] ::emboss::support::Maybe has_value2() const; public: class EmbossReservedVirtualSignedDoubledView final { @@ -1852,17 +1726,17 @@ class GenericStructureWithComputedValuesView final { default; ~EmbossReservedVirtualSignedDoubledView() = default; - ::std::int64_t Read() const { + [[nodiscard]] ::std::int64_t Read() const { EMBOSS_CHECK(view_.has_signed_doubled().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - ::std::int64_t UncheckedRead() const { + [[nodiscard]] ::std::int64_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - bool Ok() const { + [[nodiscard]] bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -1875,12 +1749,12 @@ class GenericStructureWithComputedValuesView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } private: - ::emboss::support::Maybe MaybeRead() const { + [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.value2(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Product(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(2LL))); @@ -1888,7 +1762,7 @@ class GenericStructureWithComputedValuesView final { return emboss_reserved_local_subexpr_3; } - static constexpr bool ValueIsOk( + [[nodiscard]] static constexpr bool ValueIsOk( ::std::int64_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -1896,8 +1770,8 @@ class GenericStructureWithComputedValuesView final { const GenericStructureWithComputedValuesView view_; }; - EmbossReservedVirtualSignedDoubledView signed_doubled() const; - ::emboss::support::Maybe has_signed_doubled() const; + [[nodiscard]] EmbossReservedVirtualSignedDoubledView signed_doubled() const; + [[nodiscard]] ::emboss::support::Maybe has_signed_doubled() const; public: class EmbossReservedVirtualSignedPlusTenView final { @@ -1916,17 +1790,17 @@ class GenericStructureWithComputedValuesView final { default; ~EmbossReservedVirtualSignedPlusTenView() = default; - ::std::int64_t Read() const { + [[nodiscard]] ::std::int64_t Read() const { EMBOSS_CHECK(view_.has_signed_plus_ten().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - ::std::int64_t UncheckedRead() const { + [[nodiscard]] ::std::int64_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - bool Ok() const { + [[nodiscard]] bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -1939,9 +1813,9 @@ class GenericStructureWithComputedValuesView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } - bool TryToWrite(::std::int64_t emboss_reserved_local_value) { + [[nodiscard]] bool TryToWrite(::std::int64_t emboss_reserved_local_value) { const auto emboss_reserved_local_maybe_new_value = ::emboss::support::Difference(::emboss::support::Maybe(emboss_reserved_local_value), ::emboss::support::Maybe(static_cast(10LL))); if (!CouldWriteValue(emboss_reserved_local_value)) return false; return view_.value2().TryToWrite( @@ -1955,7 +1829,7 @@ class GenericStructureWithComputedValuesView final { void UncheckedWrite(::std::int64_t emboss_reserved_local_value) { view_.value2().UncheckedWrite((::emboss::support::Difference(::emboss::support::Maybe(emboss_reserved_local_value), ::emboss::support::Maybe(static_cast(10LL)))).ValueOrDefault()); } - bool CouldWriteValue(::std::int64_t emboss_reserved_local_value) { + [[nodiscard]] bool CouldWriteValue(::std::int64_t emboss_reserved_local_value) { if (!ValueIsOk(emboss_reserved_local_value)) return false; const auto emboss_reserved_local_maybe_new_value = ::emboss::support::Difference(::emboss::support::Maybe(emboss_reserved_local_value), ::emboss::support::Maybe(static_cast(10LL))); if (!emboss_reserved_local_maybe_new_value.Known()) return false; @@ -1971,7 +1845,7 @@ class GenericStructureWithComputedValuesView final { private: - ::emboss::support::Maybe MaybeRead() const { + [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.value2(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Sum(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(10LL))); @@ -1979,7 +1853,7 @@ class GenericStructureWithComputedValuesView final { return emboss_reserved_local_subexpr_3; } - static constexpr bool ValueIsOk( + [[nodiscard]] static constexpr bool ValueIsOk( ::std::int64_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -1987,8 +1861,8 @@ class GenericStructureWithComputedValuesView final { const GenericStructureWithComputedValuesView view_; }; - EmbossReservedVirtualSignedPlusTenView signed_plus_ten() const; - ::emboss::support::Maybe has_signed_plus_ten() const; + [[nodiscard]] EmbossReservedVirtualSignedPlusTenView signed_plus_ten() const; + [[nodiscard]] ::emboss::support::Maybe has_signed_plus_ten() const; public: class EmbossReservedVirtualProductView final { @@ -2007,17 +1881,17 @@ class GenericStructureWithComputedValuesView final { default; ~EmbossReservedVirtualProductView() = default; - ::std::int64_t Read() const { + [[nodiscard]] ::std::int64_t Read() const { EMBOSS_CHECK(view_.has_product().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - ::std::int64_t UncheckedRead() const { + [[nodiscard]] ::std::int64_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - bool Ok() const { + [[nodiscard]] bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -2030,12 +1904,12 @@ class GenericStructureWithComputedValuesView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } private: - ::emboss::support::Maybe MaybeRead() const { + [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.value(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = view_.value2(); @@ -2045,7 +1919,7 @@ class GenericStructureWithComputedValuesView final { return emboss_reserved_local_subexpr_5; } - static constexpr bool ValueIsOk( + [[nodiscard]] static constexpr bool ValueIsOk( ::std::int64_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -2053,8 +1927,8 @@ class GenericStructureWithComputedValuesView final { const GenericStructureWithComputedValuesView view_; }; - EmbossReservedVirtualProductView product() const; - ::emboss::support::Maybe has_product() const; + [[nodiscard]] EmbossReservedVirtualProductView product() const; + [[nodiscard]] ::emboss::support::Maybe has_product() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -2070,9 +1944,9 @@ class GenericStructureWithComputedValuesView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -2081,13 +1955,13 @@ class GenericStructureWithComputedValuesView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -2105,9 +1979,9 @@ class GenericStructureWithComputedValuesView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -2116,13 +1990,13 @@ class GenericStructureWithComputedValuesView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -2140,9 +2014,9 @@ class GenericStructureWithComputedValuesView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -2151,13 +2025,13 @@ class GenericStructureWithComputedValuesView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -2188,7 +2062,7 @@ struct EmbossReservedInternalIsGenericStructureWithComputedValuesView< }; template -inline GenericStructureWithComputedValuesView< +[[nodiscard]] inline GenericStructureWithComputedValuesView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -2203,7 +2077,7 @@ MakeStructureWithComputedValuesView( T &&emboss_reserved_local_arg) { } template -inline GenericStructureWithComputedValuesView> +[[nodiscard]] inline GenericStructureWithComputedValuesView> MakeStructureWithComputedValuesView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericStructureWithComputedValuesView>( @@ -2212,7 +2086,7 @@ MakeStructureWithComputedValuesView( T *emboss_reserved_local_data, } template -inline GenericStructureWithComputedValuesView< +[[nodiscard]] inline GenericStructureWithComputedValuesView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedStructureWithComputedValuesView( T *emboss_reserved_local_data, @@ -2279,72 +2153,51 @@ class GenericStructureWithConditionalValueView final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; + const auto emboss_reserved_local_ok_subexpr_1 = x(); + const auto emboss_reserved_local_ok_subexpr_2 = (emboss_reserved_local_ok_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_ok_subexpr_3 = ::emboss::support::LessThan(emboss_reserved_local_ok_subexpr_2, ::emboss::support::Maybe(static_cast(2147483648ULL))); { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !x().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::LessThan((x().Ok() ? ::emboss::support::Maybe(static_cast(x().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(2147483648ULL))); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !two_x().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !x_plus_one().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!x().Ok()) return false; + if (!x_plus_one().Ok()) return false; + if (!IntrinsicSizeInBytes().Ok()) return false; + if (!MaxSizeInBytes().Ok()) return false; + if (!MinSizeInBytes().Ok()) return false; + } } - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = emboss_reserved_local_ok_subexpr_3; + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!two_x().Ok()) return false; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - static constexpr ::std::size_t SizeInBytes() { + [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - static constexpr bool SizeIsKnown() { + [[nodiscard]] static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericStructureWithConditionalValueView emboss_reserved_local_other) const { if (!has_x().Known()) return false; @@ -2365,7 +2218,7 @@ class GenericStructureWithConditionalValueView final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericStructureWithConditionalValueView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_x().ValueOr(false) && @@ -2398,7 +2251,7 @@ class GenericStructureWithConditionalValueView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericStructureWithConditionalValueView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -2550,15 +2403,15 @@ class GenericStructureWithConditionalValueView final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 32>> x() const; - ::emboss::support::Maybe has_x() const; + [[nodiscard]] ::emboss::support::Maybe has_x() const; public: class EmbossReservedVirtualTwoXView final { @@ -2577,17 +2430,17 @@ class GenericStructureWithConditionalValueView final { default; ~EmbossReservedVirtualTwoXView() = default; - ::std::int64_t Read() const { + [[nodiscard]] ::std::int64_t Read() const { EMBOSS_CHECK(view_.has_two_x().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - ::std::int64_t UncheckedRead() const { + [[nodiscard]] ::std::int64_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - bool Ok() const { + [[nodiscard]] bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -2600,12 +2453,12 @@ class GenericStructureWithConditionalValueView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } private: - ::emboss::support::Maybe MaybeRead() const { + [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.x(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Product(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(2LL))); @@ -2613,7 +2466,7 @@ class GenericStructureWithConditionalValueView final { return emboss_reserved_local_subexpr_3; } - static constexpr bool ValueIsOk( + [[nodiscard]] static constexpr bool ValueIsOk( ::std::int64_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -2621,8 +2474,8 @@ class GenericStructureWithConditionalValueView final { const GenericStructureWithConditionalValueView view_; }; - EmbossReservedVirtualTwoXView two_x() const; - ::emboss::support::Maybe has_two_x() const; + [[nodiscard]] EmbossReservedVirtualTwoXView two_x() const; + [[nodiscard]] ::emboss::support::Maybe has_two_x() const; public: class EmbossReservedVirtualXPlusOneView final { @@ -2641,17 +2494,17 @@ class GenericStructureWithConditionalValueView final { default; ~EmbossReservedVirtualXPlusOneView() = default; - ::std::int64_t Read() const { + [[nodiscard]] ::std::int64_t Read() const { EMBOSS_CHECK(view_.has_x_plus_one().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - ::std::int64_t UncheckedRead() const { + [[nodiscard]] ::std::int64_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - bool Ok() const { + [[nodiscard]] bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -2664,9 +2517,9 @@ class GenericStructureWithConditionalValueView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } - bool TryToWrite(::std::int64_t emboss_reserved_local_value) { + [[nodiscard]] bool TryToWrite(::std::int64_t emboss_reserved_local_value) { const auto emboss_reserved_local_maybe_new_value = ::emboss::support::Difference(::emboss::support::Maybe(emboss_reserved_local_value), ::emboss::support::Maybe(static_cast(1LL))); if (!CouldWriteValue(emboss_reserved_local_value)) return false; return view_.x().TryToWrite( @@ -2680,7 +2533,7 @@ class GenericStructureWithConditionalValueView final { void UncheckedWrite(::std::int64_t emboss_reserved_local_value) { view_.x().UncheckedWrite((::emboss::support::Difference(::emboss::support::Maybe(emboss_reserved_local_value), ::emboss::support::Maybe(static_cast(1LL)))).ValueOrDefault()); } - bool CouldWriteValue(::std::int64_t emboss_reserved_local_value) { + [[nodiscard]] bool CouldWriteValue(::std::int64_t emboss_reserved_local_value) { if (!ValueIsOk(emboss_reserved_local_value)) return false; const auto emboss_reserved_local_maybe_new_value = ::emboss::support::Difference(::emboss::support::Maybe(emboss_reserved_local_value), ::emboss::support::Maybe(static_cast(1LL))); if (!emboss_reserved_local_maybe_new_value.Known()) return false; @@ -2696,7 +2549,7 @@ class GenericStructureWithConditionalValueView final { private: - ::emboss::support::Maybe MaybeRead() const { + [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.x(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Sum(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(1LL))); @@ -2704,7 +2557,7 @@ class GenericStructureWithConditionalValueView final { return emboss_reserved_local_subexpr_3; } - static constexpr bool ValueIsOk( + [[nodiscard]] static constexpr bool ValueIsOk( ::std::int64_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -2712,8 +2565,8 @@ class GenericStructureWithConditionalValueView final { const GenericStructureWithConditionalValueView view_; }; - EmbossReservedVirtualXPlusOneView x_plus_one() const; - ::emboss::support::Maybe has_x_plus_one() const; + [[nodiscard]] EmbossReservedVirtualXPlusOneView x_plus_one() const; + [[nodiscard]] ::emboss::support::Maybe has_x_plus_one() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -2729,9 +2582,9 @@ class GenericStructureWithConditionalValueView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -2740,13 +2593,13 @@ class GenericStructureWithConditionalValueView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -2764,9 +2617,9 @@ class GenericStructureWithConditionalValueView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -2775,13 +2628,13 @@ class GenericStructureWithConditionalValueView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -2799,9 +2652,9 @@ class GenericStructureWithConditionalValueView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -2810,13 +2663,13 @@ class GenericStructureWithConditionalValueView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -2847,7 +2700,7 @@ struct EmbossReservedInternalIsGenericStructureWithConditionalValueView< }; template -inline GenericStructureWithConditionalValueView< +[[nodiscard]] inline GenericStructureWithConditionalValueView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -2862,7 +2715,7 @@ MakeStructureWithConditionalValueView( T &&emboss_reserved_local_arg) { } template -inline GenericStructureWithConditionalValueView> +[[nodiscard]] inline GenericStructureWithConditionalValueView> MakeStructureWithConditionalValueView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericStructureWithConditionalValueView>( @@ -2871,7 +2724,7 @@ MakeStructureWithConditionalValueView( T *emboss_reserved_local_data, } template -inline GenericStructureWithConditionalValueView< +[[nodiscard]] inline GenericStructureWithConditionalValueView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedStructureWithConditionalValueView( T *emboss_reserved_local_data, @@ -2938,71 +2791,50 @@ class GenericStructureWithValueInConditionView final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; + const auto emboss_reserved_local_ok_subexpr_1 = two_x(); + const auto emboss_reserved_local_ok_subexpr_2 = (emboss_reserved_local_ok_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_ok_subexpr_3 = ::emboss::support::LessThan(emboss_reserved_local_ok_subexpr_2, ::emboss::support::Maybe(static_cast(100LL))); { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !x().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !two_x().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::LessThan((two_x().Ok() ? ::emboss::support::Maybe(static_cast(two_x().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(100LL))); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !if_two_x_lt_100().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!x().Ok()) return false; + if (!two_x().Ok()) return false; + if (!IntrinsicSizeInBytes().Ok()) return false; + if (!MaxSizeInBytes().Ok()) return false; + if (!MinSizeInBytes().Ok()) return false; + } } - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = emboss_reserved_local_ok_subexpr_3; + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!if_two_x_lt_100().Ok()) return false; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - ::std::size_t SizeInBytes() const { + [[nodiscard]] ::std::size_t SizeInBytes() const { return static_cast(IntrinsicSizeInBytes().Read()); } - bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + [[nodiscard]] bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericStructureWithValueInConditionView emboss_reserved_local_other) const { if (!has_x().Known()) return false; @@ -3040,7 +2872,7 @@ class GenericStructureWithValueInConditionView final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericStructureWithValueInConditionView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_x().ValueOr(false) && @@ -3087,7 +2919,7 @@ class GenericStructureWithValueInConditionView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericStructureWithValueInConditionView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -3239,15 +3071,15 @@ class GenericStructureWithValueInConditionView final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 32>> x() const; - ::emboss::support::Maybe has_x() const; + [[nodiscard]] ::emboss::support::Maybe has_x() const; public: class EmbossReservedVirtualTwoXView final { @@ -3266,17 +3098,17 @@ class GenericStructureWithValueInConditionView final { default; ~EmbossReservedVirtualTwoXView() = default; - ::std::int64_t Read() const { + [[nodiscard]] ::std::int64_t Read() const { EMBOSS_CHECK(view_.has_two_x().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - ::std::int64_t UncheckedRead() const { + [[nodiscard]] ::std::int64_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - bool Ok() const { + [[nodiscard]] bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -3289,12 +3121,12 @@ class GenericStructureWithValueInConditionView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } private: - ::emboss::support::Maybe MaybeRead() const { + [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.x(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Product(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(2LL))); @@ -3302,7 +3134,7 @@ class GenericStructureWithValueInConditionView final { return emboss_reserved_local_subexpr_3; } - static constexpr bool ValueIsOk( + [[nodiscard]] static constexpr bool ValueIsOk( ::std::int64_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -3310,16 +3142,16 @@ class GenericStructureWithValueInConditionView final { const GenericStructureWithValueInConditionView view_; }; - EmbossReservedVirtualTwoXView two_x() const; - ::emboss::support::Maybe has_two_x() const; + [[nodiscard]] EmbossReservedVirtualTwoXView two_x() const; + [[nodiscard]] ::emboss::support::Maybe has_two_x() const; public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 32>> if_two_x_lt_100() const; - ::emboss::support::Maybe has_if_two_x_lt_100() const; + [[nodiscard]] ::emboss::support::Maybe has_if_two_x_lt_100() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -3338,17 +3170,17 @@ class GenericStructureWithValueInConditionView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - ::std::int32_t Read() const { + [[nodiscard]] ::std::int32_t Read() const { EMBOSS_CHECK(view_.has_IntrinsicSizeInBytes().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - ::std::int32_t UncheckedRead() const { + [[nodiscard]] ::std::int32_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - bool Ok() const { + [[nodiscard]] bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -3361,12 +3193,12 @@ class GenericStructureWithValueInConditionView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } private: - ::emboss::support::Maybe MaybeRead() const { + [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.two_x(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::LessThan(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(100LL))); @@ -3376,7 +3208,7 @@ class GenericStructureWithValueInConditionView final { return emboss_reserved_local_subexpr_5; } - static constexpr bool ValueIsOk( + [[nodiscard]] static constexpr bool ValueIsOk( ::std::int32_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -3384,8 +3216,8 @@ class GenericStructureWithValueInConditionView final { const GenericStructureWithValueInConditionView view_; }; - EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; - ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; + [[nodiscard]] EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + [[nodiscard]] ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; public: class EmbossReservedDollarVirtualMaxSizeInBytesView final { @@ -3401,9 +3233,9 @@ class GenericStructureWithValueInConditionView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -3412,13 +3244,13 @@ class GenericStructureWithValueInConditionView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -3436,9 +3268,9 @@ class GenericStructureWithValueInConditionView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -3447,13 +3279,13 @@ class GenericStructureWithValueInConditionView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -3484,7 +3316,7 @@ struct EmbossReservedInternalIsGenericStructureWithValueInConditionView< }; template -inline GenericStructureWithValueInConditionView< +[[nodiscard]] inline GenericStructureWithValueInConditionView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -3499,7 +3331,7 @@ MakeStructureWithValueInConditionView( T &&emboss_reserved_local_arg) { } template -inline GenericStructureWithValueInConditionView> +[[nodiscard]] inline GenericStructureWithValueInConditionView> MakeStructureWithValueInConditionView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericStructureWithValueInConditionView>( @@ -3508,7 +3340,7 @@ MakeStructureWithValueInConditionView( T *emboss_reserved_local_data, } template -inline GenericStructureWithValueInConditionView< +[[nodiscard]] inline GenericStructureWithValueInConditionView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedStructureWithValueInConditionView( T *emboss_reserved_local_data, @@ -3576,78 +3408,42 @@ class GenericStructureWithValuesInLocationView final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !x().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !two_x().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !offset_two_x().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !size_two_x().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!x().Ok()) return false; + if (!two_x().Ok()) return false; + if (!offset_two_x().Ok()) return false; + if (!size_two_x().Ok()) return false; + if (!IntrinsicSizeInBytes().Ok()) return false; + if (!MaxSizeInBytes().Ok()) return false; + if (!MinSizeInBytes().Ok()) return false; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - ::std::size_t SizeInBytes() const { + [[nodiscard]] ::std::size_t SizeInBytes() const { return static_cast(IntrinsicSizeInBytes().Read()); } - bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + [[nodiscard]] bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericStructureWithValuesInLocationView emboss_reserved_local_other) const { if (!has_x().Known()) return false; @@ -3702,7 +3498,7 @@ class GenericStructureWithValuesInLocationView final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericStructureWithValuesInLocationView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_x().ValueOr(false) && @@ -3763,7 +3559,7 @@ class GenericStructureWithValuesInLocationView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericStructureWithValuesInLocationView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -3953,15 +3749,15 @@ class GenericStructureWithValuesInLocationView final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 32>> x() const; - ::emboss::support::Maybe has_x() const; + [[nodiscard]] ::emboss::support::Maybe has_x() const; public: class EmbossReservedVirtualTwoXView final { @@ -3980,17 +3776,17 @@ class GenericStructureWithValuesInLocationView final { default; ~EmbossReservedVirtualTwoXView() = default; - ::std::int64_t Read() const { + [[nodiscard]] ::std::int64_t Read() const { EMBOSS_CHECK(view_.has_two_x().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - ::std::int64_t UncheckedRead() const { + [[nodiscard]] ::std::int64_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - bool Ok() const { + [[nodiscard]] bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -4003,12 +3799,12 @@ class GenericStructureWithValuesInLocationView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } private: - ::emboss::support::Maybe MaybeRead() const { + [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.x(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Product(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(2LL))); @@ -4016,7 +3812,7 @@ class GenericStructureWithValuesInLocationView final { return emboss_reserved_local_subexpr_3; } - static constexpr bool ValueIsOk( + [[nodiscard]] static constexpr bool ValueIsOk( ::std::int64_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -4024,24 +3820,24 @@ class GenericStructureWithValuesInLocationView final { const GenericStructureWithValuesInLocationView view_; }; - EmbossReservedVirtualTwoXView two_x() const; - ::emboss::support::Maybe has_two_x() const; + [[nodiscard]] EmbossReservedVirtualTwoXView two_x() const; + [[nodiscard]] ::emboss::support::Maybe has_two_x() const; public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 32>> offset_two_x() const; - ::emboss::support::Maybe has_offset_two_x() const; + [[nodiscard]] ::emboss::support::Maybe has_offset_two_x() const; public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 32>> size_two_x() const; - ::emboss::support::Maybe has_size_two_x() const; + [[nodiscard]] ::emboss::support::Maybe has_size_two_x() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -4060,17 +3856,17 @@ class GenericStructureWithValuesInLocationView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - ::std::int64_t Read() const { + [[nodiscard]] ::std::int64_t Read() const { EMBOSS_CHECK(view_.has_IntrinsicSizeInBytes().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - ::std::int64_t UncheckedRead() const { + [[nodiscard]] ::std::int64_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - bool Ok() const { + [[nodiscard]] bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -4083,12 +3879,12 @@ class GenericStructureWithValuesInLocationView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } private: - ::emboss::support::Maybe MaybeRead() const { + [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.two_x(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Sum(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(4LL))); @@ -4100,7 +3896,7 @@ class GenericStructureWithValuesInLocationView final { return emboss_reserved_local_subexpr_7; } - static constexpr bool ValueIsOk( + [[nodiscard]] static constexpr bool ValueIsOk( ::std::int64_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -4108,8 +3904,8 @@ class GenericStructureWithValuesInLocationView final { const GenericStructureWithValuesInLocationView view_; }; - EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; - ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; + [[nodiscard]] EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + [[nodiscard]] ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; public: class EmbossReservedDollarVirtualMaxSizeInBytesView final { @@ -4125,9 +3921,9 @@ class GenericStructureWithValuesInLocationView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - static constexpr ::std::int64_t Read(); - static constexpr ::std::int64_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int64_t Read(); + [[nodiscard]] static constexpr ::std::int64_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -4136,13 +3932,13 @@ class GenericStructureWithValuesInLocationView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -4160,9 +3956,9 @@ class GenericStructureWithValuesInLocationView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -4171,13 +3967,13 @@ class GenericStructureWithValuesInLocationView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -4208,7 +4004,7 @@ struct EmbossReservedInternalIsGenericStructureWithValuesInLocationView< }; template -inline GenericStructureWithValuesInLocationView< +[[nodiscard]] inline GenericStructureWithValuesInLocationView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -4223,7 +4019,7 @@ MakeStructureWithValuesInLocationView( T &&emboss_reserved_local_arg) { } template -inline GenericStructureWithValuesInLocationView> +[[nodiscard]] inline GenericStructureWithValuesInLocationView> MakeStructureWithValuesInLocationView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericStructureWithValuesInLocationView>( @@ -4232,7 +4028,7 @@ MakeStructureWithValuesInLocationView( T *emboss_reserved_local_data, } template -inline GenericStructureWithValuesInLocationView< +[[nodiscard]] inline GenericStructureWithValuesInLocationView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedStructureWithValuesInLocationView( T *emboss_reserved_local_data, @@ -4298,65 +4094,41 @@ class GenericStructureWithBoolValueView final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !x().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !x_is_ten().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!x().Ok()) return false; + if (!x_is_ten().Ok()) return false; + if (!IntrinsicSizeInBytes().Ok()) return false; + if (!MaxSizeInBytes().Ok()) return false; + if (!MinSizeInBytes().Ok()) return false; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - static constexpr ::std::size_t SizeInBytes() { + [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - static constexpr bool SizeIsKnown() { + [[nodiscard]] static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericStructureWithBoolValueView emboss_reserved_local_other) const { if (!has_x().Known()) return false; @@ -4377,7 +4149,7 @@ class GenericStructureWithBoolValueView final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericStructureWithBoolValueView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_x().ValueOr(false) && @@ -4410,7 +4182,7 @@ class GenericStructureWithBoolValueView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericStructureWithBoolValueView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -4524,15 +4296,15 @@ class GenericStructureWithBoolValueView final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 32>> x() const; - ::emboss::support::Maybe has_x() const; + [[nodiscard]] ::emboss::support::Maybe has_x() const; public: class EmbossReservedVirtualXIsTenView final { @@ -4551,17 +4323,17 @@ class GenericStructureWithBoolValueView final { default; ~EmbossReservedVirtualXIsTenView() = default; - bool Read() const { + [[nodiscard]] bool Read() const { EMBOSS_CHECK(view_.has_x_is_ten().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - bool UncheckedRead() const { + [[nodiscard]] bool UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - bool Ok() const { + [[nodiscard]] bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -4574,12 +4346,12 @@ class GenericStructureWithBoolValueView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } private: - ::emboss::support::Maybe MaybeRead() const { + [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.x(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(10LL))); @@ -4587,7 +4359,7 @@ class GenericStructureWithBoolValueView final { return emboss_reserved_local_subexpr_3; } - static constexpr bool ValueIsOk( + [[nodiscard]] static constexpr bool ValueIsOk( bool emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -4595,8 +4367,8 @@ class GenericStructureWithBoolValueView final { const GenericStructureWithBoolValueView view_; }; - EmbossReservedVirtualXIsTenView x_is_ten() const; - ::emboss::support::Maybe has_x_is_ten() const; + [[nodiscard]] EmbossReservedVirtualXIsTenView x_is_ten() const; + [[nodiscard]] ::emboss::support::Maybe has_x_is_ten() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -4612,9 +4384,9 @@ class GenericStructureWithBoolValueView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -4623,13 +4395,13 @@ class GenericStructureWithBoolValueView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -4647,9 +4419,9 @@ class GenericStructureWithBoolValueView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -4658,13 +4430,13 @@ class GenericStructureWithBoolValueView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -4682,9 +4454,9 @@ class GenericStructureWithBoolValueView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -4693,13 +4465,13 @@ class GenericStructureWithBoolValueView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -4730,7 +4502,7 @@ struct EmbossReservedInternalIsGenericStructureWithBoolValueView< }; template -inline GenericStructureWithBoolValueView< +[[nodiscard]] inline GenericStructureWithBoolValueView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -4745,7 +4517,7 @@ MakeStructureWithBoolValueView( T &&emboss_reserved_local_arg) { } template -inline GenericStructureWithBoolValueView> +[[nodiscard]] inline GenericStructureWithBoolValueView> MakeStructureWithBoolValueView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericStructureWithBoolValueView>( @@ -4754,7 +4526,7 @@ MakeStructureWithBoolValueView( T *emboss_reserved_local_data, } template -inline GenericStructureWithBoolValueView< +[[nodiscard]] inline GenericStructureWithBoolValueView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedStructureWithBoolValueView( T *emboss_reserved_local_data, @@ -4907,65 +4679,41 @@ class GenericStructureWithEnumValueView final { using Category = ::emboss::test::StructureWithEnumValue::Category; - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !x().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !x_size().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!x().Ok()) return false; + if (!x_size().Ok()) return false; + if (!IntrinsicSizeInBytes().Ok()) return false; + if (!MaxSizeInBytes().Ok()) return false; + if (!MinSizeInBytes().Ok()) return false; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - static constexpr ::std::size_t SizeInBytes() { + [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - static constexpr bool SizeIsKnown() { + [[nodiscard]] static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericStructureWithEnumValueView emboss_reserved_local_other) const { if (!has_x().Known()) return false; @@ -4986,7 +4734,7 @@ class GenericStructureWithEnumValueView final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericStructureWithEnumValueView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_x().ValueOr(false) && @@ -5019,7 +4767,7 @@ class GenericStructureWithEnumValueView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericStructureWithEnumValueView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -5133,15 +4881,15 @@ class GenericStructureWithEnumValueView final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 32>> x() const; - ::emboss::support::Maybe has_x() const; + [[nodiscard]] ::emboss::support::Maybe has_x() const; public: class EmbossReservedVirtualXSizeView final { @@ -5160,17 +4908,17 @@ class GenericStructureWithEnumValueView final { default; ~EmbossReservedVirtualXSizeView() = default; - ::emboss::test::StructureWithEnumValue::Category Read() const { + [[nodiscard]] ::emboss::test::StructureWithEnumValue::Category Read() const { EMBOSS_CHECK(view_.has_x_size().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - ::emboss::test::StructureWithEnumValue::Category UncheckedRead() const { + [[nodiscard]] ::emboss::test::StructureWithEnumValue::Category UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - bool Ok() const { + [[nodiscard]] bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -5183,12 +4931,12 @@ class GenericStructureWithEnumValueView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } private: - ::emboss::support::Maybe MaybeRead() const { + [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.x(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::LessThan(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(100LL))); @@ -5197,7 +4945,7 @@ class GenericStructureWithEnumValueView final { return emboss_reserved_local_subexpr_4; } - static constexpr bool ValueIsOk( + [[nodiscard]] static constexpr bool ValueIsOk( ::emboss::test::StructureWithEnumValue::Category emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -5205,8 +4953,8 @@ class GenericStructureWithEnumValueView final { const GenericStructureWithEnumValueView view_; }; - EmbossReservedVirtualXSizeView x_size() const; - ::emboss::support::Maybe has_x_size() const; + [[nodiscard]] EmbossReservedVirtualXSizeView x_size() const; + [[nodiscard]] ::emboss::support::Maybe has_x_size() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -5222,9 +4970,9 @@ class GenericStructureWithEnumValueView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -5233,13 +4981,13 @@ class GenericStructureWithEnumValueView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -5257,9 +5005,9 @@ class GenericStructureWithEnumValueView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -5268,13 +5016,13 @@ class GenericStructureWithEnumValueView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -5292,9 +5040,9 @@ class GenericStructureWithEnumValueView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -5303,13 +5051,13 @@ class GenericStructureWithEnumValueView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -5340,7 +5088,7 @@ struct EmbossReservedInternalIsGenericStructureWithEnumValueView< }; template -inline GenericStructureWithEnumValueView< +[[nodiscard]] inline GenericStructureWithEnumValueView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -5355,7 +5103,7 @@ MakeStructureWithEnumValueView( T &&emboss_reserved_local_arg) { } template -inline GenericStructureWithEnumValueView> +[[nodiscard]] inline GenericStructureWithEnumValueView> MakeStructureWithEnumValueView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericStructureWithEnumValueView>( @@ -5364,7 +5112,7 @@ MakeStructureWithEnumValueView( T *emboss_reserved_local_data, } template -inline GenericStructureWithEnumValueView< +[[nodiscard]] inline GenericStructureWithEnumValueView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedStructureWithEnumValueView( T *emboss_reserved_local_data, @@ -5431,72 +5179,42 @@ class GenericStructureWithBitsWithValueView final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !b().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !alias_of_b_sum().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !alias_of_b_a().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!b().Ok()) return false; + if (!alias_of_b_sum().Ok()) return false; + if (!alias_of_b_a().Ok()) return false; + if (!IntrinsicSizeInBytes().Ok()) return false; + if (!MaxSizeInBytes().Ok()) return false; + if (!MinSizeInBytes().Ok()) return false; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - static constexpr ::std::size_t SizeInBytes() { + [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - static constexpr bool SizeIsKnown() { + [[nodiscard]] static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericStructureWithBitsWithValueView emboss_reserved_local_other) const { if (!has_b().Known()) return false; @@ -5517,7 +5235,7 @@ class GenericStructureWithBitsWithValueView final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericStructureWithBitsWithValueView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_b().ValueOr(false) && @@ -5550,7 +5268,7 @@ class GenericStructureWithBitsWithValueView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericStructureWithBitsWithValueView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -5702,13 +5420,13 @@ class GenericStructureWithBitsWithValueView final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: - typename ::emboss::test::GenericBitsWithValueView>, 32>> + [[nodiscard]] typename ::emboss::test::GenericBitsWithValueView>, 32>> b() const; - ::emboss::support::Maybe has_b() const; + [[nodiscard]] ::emboss::support::Maybe has_b() const; public: class EmbossReservedVirtualAliasOfBSumView final { @@ -5727,17 +5445,17 @@ class GenericStructureWithBitsWithValueView final { default; ~EmbossReservedVirtualAliasOfBSumView() = default; - ::std::int32_t Read() const { + [[nodiscard]] ::std::int32_t Read() const { EMBOSS_CHECK(view_.has_alias_of_b_sum().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - ::std::int32_t UncheckedRead() const { + [[nodiscard]] ::std::int32_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - bool Ok() const { + [[nodiscard]] bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -5750,19 +5468,19 @@ class GenericStructureWithBitsWithValueView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } private: - ::emboss::support::Maybe MaybeRead() const { + [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.b().sum(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); return emboss_reserved_local_subexpr_2; } - static constexpr bool ValueIsOk( + [[nodiscard]] static constexpr bool ValueIsOk( ::std::int32_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -5770,15 +5488,15 @@ class GenericStructureWithBitsWithValueView final { const GenericStructureWithBitsWithValueView view_; }; - EmbossReservedVirtualAliasOfBSumView alias_of_b_sum() const; - ::emboss::support::Maybe has_alias_of_b_sum() const; + [[nodiscard]] EmbossReservedVirtualAliasOfBSumView alias_of_b_sum() const; + [[nodiscard]] ::emboss::support::Maybe has_alias_of_b_sum() const; public: - auto alias_of_b_a() const -> decltype(this->b().a()) { + [[nodiscard]] auto alias_of_b_a() const -> decltype(this->b().a()) { return has_alias_of_b_a().ValueOrDefault() ? b().a() : decltype(this->b().a())(); } - ::emboss::support::Maybe has_alias_of_b_a() const; + [[nodiscard]] ::emboss::support::Maybe has_alias_of_b_a() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -5794,9 +5512,9 @@ class GenericStructureWithBitsWithValueView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -5805,13 +5523,13 @@ class GenericStructureWithBitsWithValueView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -5829,9 +5547,9 @@ class GenericStructureWithBitsWithValueView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -5840,13 +5558,13 @@ class GenericStructureWithBitsWithValueView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -5864,9 +5582,9 @@ class GenericStructureWithBitsWithValueView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -5875,13 +5593,13 @@ class GenericStructureWithBitsWithValueView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -5912,7 +5630,7 @@ struct EmbossReservedInternalIsGenericStructureWithBitsWithValueView< }; template -inline GenericStructureWithBitsWithValueView< +[[nodiscard]] inline GenericStructureWithBitsWithValueView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -5927,7 +5645,7 @@ MakeStructureWithBitsWithValueView( T &&emboss_reserved_local_arg) { } template -inline GenericStructureWithBitsWithValueView> +[[nodiscard]] inline GenericStructureWithBitsWithValueView> MakeStructureWithBitsWithValueView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericStructureWithBitsWithValueView>( @@ -5936,7 +5654,7 @@ MakeStructureWithBitsWithValueView( T *emboss_reserved_local_data, } template -inline GenericStructureWithBitsWithValueView< +[[nodiscard]] inline GenericStructureWithBitsWithValueView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedStructureWithBitsWithValueView( T *emboss_reserved_local_data, @@ -6003,72 +5721,42 @@ class GenericBitsWithValueView final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !a().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !b().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !sum().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBits().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBits().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBits().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!a().Ok()) return false; + if (!b().Ok()) return false; + if (!sum().Ok()) return false; + if (!IntrinsicSizeInBits().Ok()) return false; + if (!MaxSizeInBits().Ok()) return false; + if (!MinSizeInBits().Ok()) return false; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBits().Ok() && backing_.SizeInBits() >= static_cast( IntrinsicSizeInBits().UncheckedRead()); } - static constexpr ::std::size_t SizeInBits() { + [[nodiscard]] static constexpr ::std::size_t SizeInBits() { return static_cast(IntrinsicSizeInBits().Read()); } - static constexpr bool SizeIsKnown() { + [[nodiscard]] static constexpr bool SizeIsKnown() { return IntrinsicSizeInBits().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericBitsWithValueView emboss_reserved_local_other) const { if (!has_a().Known()) return false; @@ -6106,7 +5794,7 @@ class GenericBitsWithValueView final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericBitsWithValueView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_a().ValueOr(false) && @@ -6153,7 +5841,7 @@ class GenericBitsWithValueView final { emboss_reserved_local_other.IntrinsicSizeInBits().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericBitsWithValueView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -6305,23 +5993,23 @@ class GenericBitsWithValueView final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<16, ::emboss::support::AllValuesAreOk>, typename Storage::template OffsetStorageType> a() const; - ::emboss::support::Maybe has_a() const; + [[nodiscard]] ::emboss::support::Maybe has_a() const; public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<16, ::emboss::support::AllValuesAreOk>, typename Storage::template OffsetStorageType> b() const; - ::emboss::support::Maybe has_b() const; + [[nodiscard]] ::emboss::support::Maybe has_b() const; public: class EmbossReservedVirtualSumView final { @@ -6340,17 +6028,17 @@ class GenericBitsWithValueView final { default; ~EmbossReservedVirtualSumView() = default; - ::std::int32_t Read() const { + [[nodiscard]] ::std::int32_t Read() const { EMBOSS_CHECK(view_.has_sum().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - ::std::int32_t UncheckedRead() const { + [[nodiscard]] ::std::int32_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - bool Ok() const { + [[nodiscard]] bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -6363,12 +6051,12 @@ class GenericBitsWithValueView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } private: - ::emboss::support::Maybe MaybeRead() const { + [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.a(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = view_.b(); @@ -6378,7 +6066,7 @@ class GenericBitsWithValueView final { return emboss_reserved_local_subexpr_5; } - static constexpr bool ValueIsOk( + [[nodiscard]] static constexpr bool ValueIsOk( ::std::int32_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -6386,8 +6074,8 @@ class GenericBitsWithValueView final { const GenericBitsWithValueView view_; }; - EmbossReservedVirtualSumView sum() const; - ::emboss::support::Maybe has_sum() const; + [[nodiscard]] EmbossReservedVirtualSumView sum() const; + [[nodiscard]] ::emboss::support::Maybe has_sum() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBitsView final { @@ -6403,9 +6091,9 @@ class GenericBitsWithValueView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBitsView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -6414,13 +6102,13 @@ class GenericBitsWithValueView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBitsView IntrinsicSizeInBits() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBitsView IntrinsicSizeInBits() { return EmbossReservedDollarVirtualIntrinsicSizeInBitsView(); } - static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBits() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBits() { return ::emboss::support::Maybe(true); } @@ -6438,9 +6126,9 @@ class GenericBitsWithValueView final { default; ~EmbossReservedDollarVirtualMaxSizeInBitsView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -6449,13 +6137,13 @@ class GenericBitsWithValueView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBitsView MaxSizeInBits() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBitsView MaxSizeInBits() { return EmbossReservedDollarVirtualMaxSizeInBitsView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBits() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBits() { return ::emboss::support::Maybe(true); } @@ -6473,9 +6161,9 @@ class GenericBitsWithValueView final { default; ~EmbossReservedDollarVirtualMinSizeInBitsView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -6484,13 +6172,13 @@ class GenericBitsWithValueView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBitsView MinSizeInBits() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBitsView MinSizeInBits() { return EmbossReservedDollarVirtualMinSizeInBitsView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBits() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBits() { return ::emboss::support::Maybe(true); } @@ -6521,7 +6209,7 @@ struct EmbossReservedInternalIsGenericBitsWithValueView< }; template -inline GenericBitsWithValueView< +[[nodiscard]] inline GenericBitsWithValueView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -6536,7 +6224,7 @@ MakeBitsWithValueView( T &&emboss_reserved_local_arg) { } template -inline GenericBitsWithValueView> +[[nodiscard]] inline GenericBitsWithValueView> MakeBitsWithValueView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericBitsWithValueView>( @@ -6545,7 +6233,7 @@ MakeBitsWithValueView( T *emboss_reserved_local_data, } template -inline GenericBitsWithValueView< +[[nodiscard]] inline GenericBitsWithValueView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedBitsWithValueView( T *emboss_reserved_local_data, @@ -6611,65 +6299,41 @@ class GenericStructureUsingForeignConstantsView final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !x().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !one_hundred().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!x().Ok()) return false; + if (!one_hundred().Ok()) return false; + if (!IntrinsicSizeInBytes().Ok()) return false; + if (!MaxSizeInBytes().Ok()) return false; + if (!MinSizeInBytes().Ok()) return false; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - static constexpr ::std::size_t SizeInBytes() { + [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - static constexpr bool SizeIsKnown() { + [[nodiscard]] static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericStructureUsingForeignConstantsView emboss_reserved_local_other) const { if (!has_x().Known()) return false; @@ -6690,7 +6354,7 @@ class GenericStructureUsingForeignConstantsView final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericStructureUsingForeignConstantsView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_x().ValueOr(false) && @@ -6723,7 +6387,7 @@ class GenericStructureUsingForeignConstantsView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericStructureUsingForeignConstantsView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -6837,15 +6501,15 @@ class GenericStructureUsingForeignConstantsView final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 32>> x() const; - ::emboss::support::Maybe has_x() const; + [[nodiscard]] ::emboss::support::Maybe has_x() const; public: class EmbossReservedVirtualOneHundredView final { @@ -6861,9 +6525,9 @@ class GenericStructureUsingForeignConstantsView final { default; ~EmbossReservedVirtualOneHundredView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -6872,13 +6536,13 @@ class GenericStructureUsingForeignConstantsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedVirtualOneHundredView one_hundred() { + [[nodiscard]] static constexpr EmbossReservedVirtualOneHundredView one_hundred() { return EmbossReservedVirtualOneHundredView(); } - static constexpr ::emboss::support::Maybe has_one_hundred() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_one_hundred() { return ::emboss::support::Maybe(true); } @@ -6896,9 +6560,9 @@ class GenericStructureUsingForeignConstantsView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -6907,13 +6571,13 @@ class GenericStructureUsingForeignConstantsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -6931,9 +6595,9 @@ class GenericStructureUsingForeignConstantsView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -6942,13 +6606,13 @@ class GenericStructureUsingForeignConstantsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -6966,9 +6630,9 @@ class GenericStructureUsingForeignConstantsView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -6977,13 +6641,13 @@ class GenericStructureUsingForeignConstantsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -7014,7 +6678,7 @@ struct EmbossReservedInternalIsGenericStructureUsingForeignConstantsView< }; template -inline GenericStructureUsingForeignConstantsView< +[[nodiscard]] inline GenericStructureUsingForeignConstantsView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -7029,7 +6693,7 @@ MakeStructureUsingForeignConstantsView( T &&emboss_reserved_local_arg) { } template -inline GenericStructureUsingForeignConstantsView> +[[nodiscard]] inline GenericStructureUsingForeignConstantsView> MakeStructureUsingForeignConstantsView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericStructureUsingForeignConstantsView>( @@ -7038,7 +6702,7 @@ MakeStructureUsingForeignConstantsView( T *emboss_reserved_local_data, } template -inline GenericStructureUsingForeignConstantsView< +[[nodiscard]] inline GenericStructureUsingForeignConstantsView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedStructureUsingForeignConstantsView( T *emboss_reserved_local_data, @@ -7110,65 +6774,41 @@ class GenericHeaderView final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !size().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !message_id().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!size().Ok()) return false; + if (!message_id().Ok()) return false; + if (!IntrinsicSizeInBytes().Ok()) return false; + if (!MaxSizeInBytes().Ok()) return false; + if (!MinSizeInBytes().Ok()) return false; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - static constexpr ::std::size_t SizeInBytes() { + [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - static constexpr bool SizeIsKnown() { + [[nodiscard]] static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericHeaderView emboss_reserved_local_other) const { if (!has_size().Known()) return false; @@ -7206,7 +6846,7 @@ class GenericHeaderView final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericHeaderView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_size().ValueOr(false) && @@ -7253,7 +6893,7 @@ class GenericHeaderView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericHeaderView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -7386,23 +7026,23 @@ class GenericHeaderView final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<16, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 16>> size() const; - ::emboss::support::Maybe has_size() const; + [[nodiscard]] ::emboss::support::Maybe has_size() const; public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<16, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 16>> message_id() const; - ::emboss::support::Maybe has_message_id() const; + [[nodiscard]] ::emboss::support::Maybe has_message_id() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -7418,9 +7058,9 @@ class GenericHeaderView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -7429,13 +7069,13 @@ class GenericHeaderView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -7453,9 +7093,9 @@ class GenericHeaderView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -7464,13 +7104,13 @@ class GenericHeaderView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -7488,9 +7128,9 @@ class GenericHeaderView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -7499,13 +7139,13 @@ class GenericHeaderView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -7536,7 +7176,7 @@ struct EmbossReservedInternalIsGenericHeaderView< }; template -inline GenericHeaderView< +[[nodiscard]] inline GenericHeaderView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -7551,7 +7191,7 @@ MakeHeaderView( T &&emboss_reserved_local_arg) { } template -inline GenericHeaderView> +[[nodiscard]] inline GenericHeaderView> MakeHeaderView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericHeaderView>( @@ -7560,7 +7200,7 @@ MakeHeaderView( T *emboss_reserved_local_data, } template -inline GenericHeaderView< +[[nodiscard]] inline GenericHeaderView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedHeaderView( T *emboss_reserved_local_data, @@ -7621,72 +7261,42 @@ class GenericSubfieldOfAliasView final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !header().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !h().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !size().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!header().Ok()) return false; + if (!h().Ok()) return false; + if (!size().Ok()) return false; + if (!IntrinsicSizeInBytes().Ok()) return false; + if (!MaxSizeInBytes().Ok()) return false; + if (!MinSizeInBytes().Ok()) return false; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - static constexpr ::std::size_t SizeInBytes() { + [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - static constexpr bool SizeIsKnown() { + [[nodiscard]] static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericSubfieldOfAliasView emboss_reserved_local_other) const { if (!has_header().Known()) return false; @@ -7707,7 +7317,7 @@ class GenericSubfieldOfAliasView final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericSubfieldOfAliasView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_header().ValueOr(false) && @@ -7740,7 +7350,7 @@ class GenericSubfieldOfAliasView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericSubfieldOfAliasView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -7911,27 +7521,27 @@ class GenericSubfieldOfAliasView final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: - typename ::emboss::test::SubfieldOfAlias::GenericHeaderView> + [[nodiscard]] typename ::emboss::test::SubfieldOfAlias::GenericHeaderView> header() const; - ::emboss::support::Maybe has_header() const; + [[nodiscard]] ::emboss::support::Maybe has_header() const; public: - auto h() const -> decltype(this->header()) { + [[nodiscard]] auto h() const -> decltype(this->header()) { return has_h().ValueOrDefault() ? header() : decltype(this->header())(); } - ::emboss::support::Maybe has_h() const; + [[nodiscard]] ::emboss::support::Maybe has_h() const; public: - auto size() const -> decltype(this->h().size()) { + [[nodiscard]] auto size() const -> decltype(this->h().size()) { return has_size().ValueOrDefault() ? h().size() : decltype(this->h().size())(); } - ::emboss::support::Maybe has_size() const; + [[nodiscard]] ::emboss::support::Maybe has_size() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -7947,9 +7557,9 @@ class GenericSubfieldOfAliasView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -7958,13 +7568,13 @@ class GenericSubfieldOfAliasView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -7982,9 +7592,9 @@ class GenericSubfieldOfAliasView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -7993,13 +7603,13 @@ class GenericSubfieldOfAliasView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -8017,9 +7627,9 @@ class GenericSubfieldOfAliasView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -8028,13 +7638,13 @@ class GenericSubfieldOfAliasView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -8065,7 +7675,7 @@ struct EmbossReservedInternalIsGenericSubfieldOfAliasView< }; template -inline GenericSubfieldOfAliasView< +[[nodiscard]] inline GenericSubfieldOfAliasView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -8080,7 +7690,7 @@ MakeSubfieldOfAliasView( T &&emboss_reserved_local_arg) { } template -inline GenericSubfieldOfAliasView> +[[nodiscard]] inline GenericSubfieldOfAliasView> MakeSubfieldOfAliasView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericSubfieldOfAliasView>( @@ -8089,7 +7699,7 @@ MakeSubfieldOfAliasView( T *emboss_reserved_local_data, } template -inline GenericSubfieldOfAliasView< +[[nodiscard]] inline GenericSubfieldOfAliasView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedSubfieldOfAliasView( T *emboss_reserved_local_data, @@ -8156,72 +7766,51 @@ class GenericRestrictedAliasView final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; + const auto emboss_reserved_local_ok_subexpr_1 = alias_switch(); + const auto emboss_reserved_local_ok_subexpr_2 = (emboss_reserved_local_ok_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_ok_subexpr_3 = ::emboss::support::GreaterThan(emboss_reserved_local_ok_subexpr_2, ::emboss::support::Maybe(static_cast(10LL))); { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !a_b().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !alias_switch().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::GreaterThan((alias_switch().Ok() ? ::emboss::support::Maybe(static_cast(alias_switch().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(10LL))); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !a_b_alias().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!a_b().Ok()) return false; + if (!alias_switch().Ok()) return false; + if (!IntrinsicSizeInBytes().Ok()) return false; + if (!MaxSizeInBytes().Ok()) return false; + if (!MinSizeInBytes().Ok()) return false; + } } - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = emboss_reserved_local_ok_subexpr_3; + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!a_b_alias().Ok()) return false; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - static constexpr ::std::size_t SizeInBytes() { + [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - static constexpr bool SizeIsKnown() { + [[nodiscard]] static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericRestrictedAliasView emboss_reserved_local_other) const { if (!has_a_b().Known()) return false; @@ -8259,7 +7848,7 @@ class GenericRestrictedAliasView final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericRestrictedAliasView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_a_b().ValueOr(false) && @@ -8306,7 +7895,7 @@ class GenericRestrictedAliasView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericRestrictedAliasView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -8477,28 +8066,28 @@ class GenericRestrictedAliasView final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: - typename ::emboss::test::GenericBitsWithValueView>, 32>> + [[nodiscard]] typename ::emboss::test::GenericBitsWithValueView>, 32>> a_b() const; - ::emboss::support::Maybe has_a_b() const; + [[nodiscard]] ::emboss::support::Maybe has_a_b() const; public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> alias_switch() const; - ::emboss::support::Maybe has_alias_switch() const; + [[nodiscard]] ::emboss::support::Maybe has_alias_switch() const; public: - auto a_b_alias() const -> decltype(this->a_b()) { + [[nodiscard]] auto a_b_alias() const -> decltype(this->a_b()) { return has_a_b_alias().ValueOrDefault() ? a_b() : decltype(this->a_b())(); } - ::emboss::support::Maybe has_a_b_alias() const; + [[nodiscard]] ::emboss::support::Maybe has_a_b_alias() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -8514,9 +8103,9 @@ class GenericRestrictedAliasView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -8525,13 +8114,13 @@ class GenericRestrictedAliasView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -8549,9 +8138,9 @@ class GenericRestrictedAliasView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -8560,13 +8149,13 @@ class GenericRestrictedAliasView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -8584,9 +8173,9 @@ class GenericRestrictedAliasView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -8595,13 +8184,13 @@ class GenericRestrictedAliasView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -8632,7 +8221,7 @@ struct EmbossReservedInternalIsGenericRestrictedAliasView< }; template -inline GenericRestrictedAliasView< +[[nodiscard]] inline GenericRestrictedAliasView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -8647,7 +8236,7 @@ MakeRestrictedAliasView( T &&emboss_reserved_local_arg) { } template -inline GenericRestrictedAliasView> +[[nodiscard]] inline GenericRestrictedAliasView> MakeRestrictedAliasView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericRestrictedAliasView>( @@ -8656,7 +8245,7 @@ MakeRestrictedAliasView( T *emboss_reserved_local_data, } template -inline GenericRestrictedAliasView< +[[nodiscard]] inline GenericRestrictedAliasView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedRestrictedAliasView( T *emboss_reserved_local_data, @@ -8729,64 +8318,49 @@ class GenericXView final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; + const auto emboss_reserved_local_ok_subexpr_1 = v(); + const auto emboss_reserved_local_ok_subexpr_2 = (emboss_reserved_local_ok_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_ok_subexpr_3 = ::emboss::support::GreaterThan(emboss_reserved_local_ok_subexpr_2, ::emboss::support::Maybe(static_cast(10LL))); { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !v().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::GreaterThan((v().Ok() ? ::emboss::support::Maybe(static_cast(v().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(10LL))); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !y().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!v().Ok()) return false; + if (!IntrinsicSizeInBytes().Ok()) return false; + if (!MaxSizeInBytes().Ok()) return false; + if (!MinSizeInBytes().Ok()) return false; + } } - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = emboss_reserved_local_ok_subexpr_3; + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!y().Ok()) return false; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - ::std::size_t SizeInBytes() const { + [[nodiscard]] ::std::size_t SizeInBytes() const { return static_cast(IntrinsicSizeInBytes().Read()); } - bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + [[nodiscard]] bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericXView emboss_reserved_local_other) const { if (!has_v().Known()) return false; @@ -8824,7 +8398,7 @@ class GenericXView final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericXView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_v().ValueOr(false) && @@ -8871,7 +8445,7 @@ class GenericXView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericXView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -9004,23 +8578,23 @@ class GenericXView final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> v() const; - ::emboss::support::Maybe has_v() const; + [[nodiscard]] ::emboss::support::Maybe has_v() const; public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> y() const; - ::emboss::support::Maybe has_y() const; + [[nodiscard]] ::emboss::support::Maybe has_y() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -9039,17 +8613,17 @@ class GenericXView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - ::std::int32_t Read() const { + [[nodiscard]] ::std::int32_t Read() const { EMBOSS_CHECK(view_.has_IntrinsicSizeInBytes().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - ::std::int32_t UncheckedRead() const { + [[nodiscard]] ::std::int32_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - bool Ok() const { + [[nodiscard]] bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -9062,12 +8636,12 @@ class GenericXView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } private: - ::emboss::support::Maybe MaybeRead() const { + [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.v(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::GreaterThan(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(10LL))); @@ -9077,7 +8651,7 @@ class GenericXView final { return emboss_reserved_local_subexpr_5; } - static constexpr bool ValueIsOk( + [[nodiscard]] static constexpr bool ValueIsOk( ::std::int32_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -9085,8 +8659,8 @@ class GenericXView final { const GenericXView view_; }; - EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; - ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; + [[nodiscard]] EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + [[nodiscard]] ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; public: class EmbossReservedDollarVirtualMaxSizeInBytesView final { @@ -9102,9 +8676,9 @@ class GenericXView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -9113,13 +8687,13 @@ class GenericXView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -9137,9 +8711,9 @@ class GenericXView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -9148,13 +8722,13 @@ class GenericXView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -9185,7 +8759,7 @@ struct EmbossReservedInternalIsGenericXView< }; template -inline GenericXView< +[[nodiscard]] inline GenericXView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -9200,7 +8774,7 @@ MakeXView( T &&emboss_reserved_local_arg) { } template -inline GenericXView> +[[nodiscard]] inline GenericXView> MakeXView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericXView>( @@ -9209,7 +8783,7 @@ MakeXView( T *emboss_reserved_local_data, } template -inline GenericXView< +[[nodiscard]] inline GenericXView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedXView( T *emboss_reserved_local_data, @@ -9270,78 +8844,65 @@ class GenericHasFieldView final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; + const auto emboss_reserved_local_ok_subexpr_1 = z(); + const auto emboss_reserved_local_ok_subexpr_2 = (emboss_reserved_local_ok_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_ok_subexpr_3 = ::emboss::support::GreaterThan(emboss_reserved_local_ok_subexpr_2, ::emboss::support::Maybe(static_cast(10LL))); + const auto emboss_reserved_local_ok_subexpr_4 = x().has_y(); + const auto emboss_reserved_local_ok_subexpr_5 = has_x(); { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !z().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::GreaterThan((z().Ok() ? ::emboss::support::Maybe(static_cast(z().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(10LL))); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !x().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = x().has_y(); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !y().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = has_x(); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !x_has_y().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!z().Ok()) return false; + if (!IntrinsicSizeInBytes().Ok()) return false; + if (!MaxSizeInBytes().Ok()) return false; + if (!MinSizeInBytes().Ok()) return false; + } } - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = emboss_reserved_local_ok_subexpr_3; + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!x().Ok()) return false; + } } - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = emboss_reserved_local_ok_subexpr_4; + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!y().Ok()) return false; + } } - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = emboss_reserved_local_ok_subexpr_5; + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!x_has_y().Ok()) return false; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - ::std::size_t SizeInBytes() const { + [[nodiscard]] ::std::size_t SizeInBytes() const { return static_cast(IntrinsicSizeInBytes().Read()); } - bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + [[nodiscard]] bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericHasFieldView emboss_reserved_local_other) const { if (!has_z().Known()) return false; @@ -9379,7 +8940,7 @@ class GenericHasFieldView final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericHasFieldView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_z().ValueOr(false) && @@ -9426,7 +8987,7 @@ class GenericHasFieldView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericHasFieldView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -9616,28 +9177,28 @@ class GenericHasFieldView final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> z() const; - ::emboss::support::Maybe has_z() const; + [[nodiscard]] ::emboss::support::Maybe has_z() const; public: - typename ::emboss::test::HasField::GenericXView> + [[nodiscard]] typename ::emboss::test::HasField::GenericXView> x() const; - ::emboss::support::Maybe has_x() const; + [[nodiscard]] ::emboss::support::Maybe has_x() const; public: - auto y() const -> decltype(this->x().y()) { + [[nodiscard]] auto y() const -> decltype(this->x().y()) { return has_y().ValueOrDefault() ? x().y() : decltype(this->x().y())(); } - ::emboss::support::Maybe has_y() const; + [[nodiscard]] ::emboss::support::Maybe has_y() const; public: class EmbossReservedVirtualXHasYView final { @@ -9656,17 +9217,17 @@ class GenericHasFieldView final { default; ~EmbossReservedVirtualXHasYView() = default; - bool Read() const { + [[nodiscard]] bool Read() const { EMBOSS_CHECK(view_.has_x_has_y().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - bool UncheckedRead() const { + [[nodiscard]] bool UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - bool Ok() const { + [[nodiscard]] bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -9679,18 +9240,18 @@ class GenericHasFieldView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } private: - ::emboss::support::Maybe MaybeRead() const { + [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.x().has_y(); return emboss_reserved_local_subexpr_1; } - static constexpr bool ValueIsOk( + [[nodiscard]] static constexpr bool ValueIsOk( bool emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -9698,8 +9259,8 @@ class GenericHasFieldView final { const GenericHasFieldView view_; }; - EmbossReservedVirtualXHasYView x_has_y() const; - ::emboss::support::Maybe has_x_has_y() const; + [[nodiscard]] EmbossReservedVirtualXHasYView x_has_y() const; + [[nodiscard]] ::emboss::support::Maybe has_x_has_y() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -9718,17 +9279,17 @@ class GenericHasFieldView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - ::std::int32_t Read() const { + [[nodiscard]] ::std::int32_t Read() const { EMBOSS_CHECK(view_.has_IntrinsicSizeInBytes().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - ::std::int32_t UncheckedRead() const { + [[nodiscard]] ::std::int32_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - bool Ok() const { + [[nodiscard]] bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -9741,12 +9302,12 @@ class GenericHasFieldView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } private: - ::emboss::support::Maybe MaybeRead() const { + [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.z(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::GreaterThan(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(10LL))); @@ -9756,7 +9317,7 @@ class GenericHasFieldView final { return emboss_reserved_local_subexpr_5; } - static constexpr bool ValueIsOk( + [[nodiscard]] static constexpr bool ValueIsOk( ::std::int32_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -9764,8 +9325,8 @@ class GenericHasFieldView final { const GenericHasFieldView view_; }; - EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; - ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; + [[nodiscard]] EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + [[nodiscard]] ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; public: class EmbossReservedDollarVirtualMaxSizeInBytesView final { @@ -9781,9 +9342,9 @@ class GenericHasFieldView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -9792,13 +9353,13 @@ class GenericHasFieldView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -9816,9 +9377,9 @@ class GenericHasFieldView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -9827,13 +9388,13 @@ class GenericHasFieldView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -9864,7 +9425,7 @@ struct EmbossReservedInternalIsGenericHasFieldView< }; template -inline GenericHasFieldView< +[[nodiscard]] inline GenericHasFieldView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -9879,7 +9440,7 @@ MakeHasFieldView( T &&emboss_reserved_local_arg) { } template -inline GenericHasFieldView> +[[nodiscard]] inline GenericHasFieldView> MakeHasFieldView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericHasFieldView>( @@ -9888,7 +9449,7 @@ MakeHasFieldView( T *emboss_reserved_local_data, } template -inline GenericHasFieldView< +[[nodiscard]] inline GenericHasFieldView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedHasFieldView( T *emboss_reserved_local_data, @@ -9955,71 +9516,51 @@ class GenericVirtualUnconditionallyUsesConditionalView final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; + const auto emboss_reserved_local_ok_subexpr_1 = x(); + const auto emboss_reserved_local_ok_subexpr_2 = (emboss_reserved_local_ok_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !x().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Equal((x().Ok() ? ::emboss::support::Maybe(static_cast(x().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(0LL))); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !xc().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !x_nor_xc().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!x().Ok()) return false; + if (!x_nor_xc().Ok()) return false; + if (!IntrinsicSizeInBytes().Ok()) return false; + if (!MaxSizeInBytes().Ok()) return false; + if (!MinSizeInBytes().Ok()) return false; + } } - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + const auto emboss_reserved_switch_discrim = emboss_reserved_local_ok_subexpr_2; + if (!emboss_reserved_switch_discrim.Known()) return false; + switch (emboss_reserved_switch_discrim.ValueOrDefault()) { + case static_cast(0LL): + if (!xc().Ok()) return false; + break; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - ::std::size_t SizeInBytes() const { + [[nodiscard]] ::std::size_t SizeInBytes() const { return static_cast(IntrinsicSizeInBytes().Read()); } - bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + [[nodiscard]] bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericVirtualUnconditionallyUsesConditionalView emboss_reserved_local_other) const { if (!has_x().Known()) return false; @@ -10057,7 +9598,7 @@ class GenericVirtualUnconditionallyUsesConditionalView final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericVirtualUnconditionallyUsesConditionalView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_x().ValueOr(false) && @@ -10104,7 +9645,7 @@ class GenericVirtualUnconditionallyUsesConditionalView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericVirtualUnconditionallyUsesConditionalView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -10256,23 +9797,23 @@ class GenericVirtualUnconditionallyUsesConditionalView final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> x() const; - ::emboss::support::Maybe has_x() const; + [[nodiscard]] ::emboss::support::Maybe has_x() const; public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> xc() const; - ::emboss::support::Maybe has_xc() const; + [[nodiscard]] ::emboss::support::Maybe has_xc() const; public: class EmbossReservedVirtualXNorXcView final { @@ -10291,17 +9832,17 @@ class GenericVirtualUnconditionallyUsesConditionalView final { default; ~EmbossReservedVirtualXNorXcView() = default; - bool Read() const { + [[nodiscard]] bool Read() const { EMBOSS_CHECK(view_.has_x_nor_xc().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - bool UncheckedRead() const { + [[nodiscard]] bool UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - bool Ok() const { + [[nodiscard]] bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -10314,12 +9855,12 @@ class GenericVirtualUnconditionallyUsesConditionalView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } private: - ::emboss::support::Maybe MaybeRead() const { + [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.x(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(0LL))); @@ -10331,7 +9872,7 @@ class GenericVirtualUnconditionallyUsesConditionalView final { return emboss_reserved_local_subexpr_7; } - static constexpr bool ValueIsOk( + [[nodiscard]] static constexpr bool ValueIsOk( bool emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -10339,8 +9880,8 @@ class GenericVirtualUnconditionallyUsesConditionalView final { const GenericVirtualUnconditionallyUsesConditionalView view_; }; - EmbossReservedVirtualXNorXcView x_nor_xc() const; - ::emboss::support::Maybe has_x_nor_xc() const; + [[nodiscard]] EmbossReservedVirtualXNorXcView x_nor_xc() const; + [[nodiscard]] ::emboss::support::Maybe has_x_nor_xc() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -10359,17 +9900,17 @@ class GenericVirtualUnconditionallyUsesConditionalView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - ::std::int32_t Read() const { + [[nodiscard]] ::std::int32_t Read() const { EMBOSS_CHECK(view_.has_IntrinsicSizeInBytes().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - ::std::int32_t UncheckedRead() const { + [[nodiscard]] ::std::int32_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - bool Ok() const { + [[nodiscard]] bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -10382,12 +9923,12 @@ class GenericVirtualUnconditionallyUsesConditionalView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } private: - ::emboss::support::Maybe MaybeRead() const { + [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.x(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(0LL))); @@ -10397,7 +9938,7 @@ class GenericVirtualUnconditionallyUsesConditionalView final { return emboss_reserved_local_subexpr_5; } - static constexpr bool ValueIsOk( + [[nodiscard]] static constexpr bool ValueIsOk( ::std::int32_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -10405,8 +9946,8 @@ class GenericVirtualUnconditionallyUsesConditionalView final { const GenericVirtualUnconditionallyUsesConditionalView view_; }; - EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; - ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; + [[nodiscard]] EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + [[nodiscard]] ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; public: class EmbossReservedDollarVirtualMaxSizeInBytesView final { @@ -10422,9 +9963,9 @@ class GenericVirtualUnconditionallyUsesConditionalView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -10433,13 +9974,13 @@ class GenericVirtualUnconditionallyUsesConditionalView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -10457,9 +9998,9 @@ class GenericVirtualUnconditionallyUsesConditionalView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -10468,13 +10009,13 @@ class GenericVirtualUnconditionallyUsesConditionalView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -10505,7 +10046,7 @@ struct EmbossReservedInternalIsGenericVirtualUnconditionallyUsesConditionalView< }; template -inline GenericVirtualUnconditionallyUsesConditionalView< +[[nodiscard]] inline GenericVirtualUnconditionallyUsesConditionalView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -10520,7 +10061,7 @@ MakeVirtualUnconditionallyUsesConditionalView( T &&emboss_reserved_local_arg) { } template -inline GenericVirtualUnconditionallyUsesConditionalView> +[[nodiscard]] inline GenericVirtualUnconditionallyUsesConditionalView> MakeVirtualUnconditionallyUsesConditionalView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericVirtualUnconditionallyUsesConditionalView>( @@ -10529,7 +10070,7 @@ MakeVirtualUnconditionallyUsesConditionalView( T *emboss_reserved_local_data, } template -inline GenericVirtualUnconditionallyUsesConditionalView< +[[nodiscard]] inline GenericVirtualUnconditionallyUsesConditionalView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedVirtualUnconditionallyUsesConditionalView( T *emboss_reserved_local_data, @@ -10600,65 +10141,41 @@ class GenericRView final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !q().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBits().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !q_plus_bit_size().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBits().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBits().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!q().Ok()) return false; + if (!IntrinsicSizeInBits().Ok()) return false; + if (!q_plus_bit_size().Ok()) return false; + if (!MaxSizeInBits().Ok()) return false; + if (!MinSizeInBits().Ok()) return false; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBits().Ok() && backing_.SizeInBits() >= static_cast( IntrinsicSizeInBits().UncheckedRead()); } - static constexpr ::std::size_t SizeInBits() { + [[nodiscard]] static constexpr ::std::size_t SizeInBits() { return static_cast(IntrinsicSizeInBits().Read()); } - static constexpr bool SizeIsKnown() { + [[nodiscard]] static constexpr bool SizeIsKnown() { return IntrinsicSizeInBits().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericRView emboss_reserved_local_other) const { if (!has_q().Known()) return false; @@ -10679,7 +10196,7 @@ class GenericRView final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericRView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_q().ValueOr(false) && @@ -10712,7 +10229,7 @@ class GenericRView final { emboss_reserved_local_other.IntrinsicSizeInBits().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericRView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -10826,15 +10343,15 @@ class GenericRView final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename Storage::template OffsetStorageType> q() const; - ::emboss::support::Maybe has_q() const; + [[nodiscard]] ::emboss::support::Maybe has_q() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBitsView final { @@ -10850,9 +10367,9 @@ class GenericRView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBitsView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -10861,13 +10378,13 @@ class GenericRView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBitsView IntrinsicSizeInBits() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBitsView IntrinsicSizeInBits() { return EmbossReservedDollarVirtualIntrinsicSizeInBitsView(); } - static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBits() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBits() { return ::emboss::support::Maybe(true); } @@ -10888,17 +10405,17 @@ class GenericRView final { default; ~EmbossReservedVirtualQPlusBitSizeView() = default; - ::std::int32_t Read() const { + [[nodiscard]] ::std::int32_t Read() const { EMBOSS_CHECK(view_.has_q_plus_bit_size().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - ::std::int32_t UncheckedRead() const { + [[nodiscard]] ::std::int32_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - bool Ok() const { + [[nodiscard]] bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -10911,12 +10428,12 @@ class GenericRView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } private: - ::emboss::support::Maybe MaybeRead() const { + [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.q(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Sum(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(8LL))); @@ -10924,7 +10441,7 @@ class GenericRView final { return emboss_reserved_local_subexpr_3; } - static constexpr bool ValueIsOk( + [[nodiscard]] static constexpr bool ValueIsOk( ::std::int32_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -10932,8 +10449,8 @@ class GenericRView final { const GenericRView view_; }; - EmbossReservedVirtualQPlusBitSizeView q_plus_bit_size() const; - ::emboss::support::Maybe has_q_plus_bit_size() const; + [[nodiscard]] EmbossReservedVirtualQPlusBitSizeView q_plus_bit_size() const; + [[nodiscard]] ::emboss::support::Maybe has_q_plus_bit_size() const; public: class EmbossReservedDollarVirtualMaxSizeInBitsView final { @@ -10949,9 +10466,9 @@ class GenericRView final { default; ~EmbossReservedDollarVirtualMaxSizeInBitsView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -10960,13 +10477,13 @@ class GenericRView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBitsView MaxSizeInBits() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBitsView MaxSizeInBits() { return EmbossReservedDollarVirtualMaxSizeInBitsView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBits() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBits() { return ::emboss::support::Maybe(true); } @@ -10984,9 +10501,9 @@ class GenericRView final { default; ~EmbossReservedDollarVirtualMinSizeInBitsView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -10995,13 +10512,13 @@ class GenericRView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBitsView MinSizeInBits() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBitsView MinSizeInBits() { return EmbossReservedDollarVirtualMinSizeInBitsView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBits() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBits() { return ::emboss::support::Maybe(true); } @@ -11032,7 +10549,7 @@ struct EmbossReservedInternalIsGenericRView< }; template -inline GenericRView< +[[nodiscard]] inline GenericRView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -11047,7 +10564,7 @@ MakeRView( T &&emboss_reserved_local_arg) { } template -inline GenericRView> +[[nodiscard]] inline GenericRView> MakeRView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericRView>( @@ -11056,7 +10573,7 @@ MakeRView( T *emboss_reserved_local_data, } template -inline GenericRView< +[[nodiscard]] inline GenericRView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedRView( T *emboss_reserved_local_data, @@ -11117,65 +10634,41 @@ class GenericUsesSizeView final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !r().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !r_q_plus_byte_size().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!r().Ok()) return false; + if (!IntrinsicSizeInBytes().Ok()) return false; + if (!r_q_plus_byte_size().Ok()) return false; + if (!MaxSizeInBytes().Ok()) return false; + if (!MinSizeInBytes().Ok()) return false; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - static constexpr ::std::size_t SizeInBytes() { + [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - static constexpr bool SizeIsKnown() { + [[nodiscard]] static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericUsesSizeView emboss_reserved_local_other) const { if (!has_r().Known()) return false; @@ -11196,7 +10689,7 @@ class GenericUsesSizeView final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericUsesSizeView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_r().ValueOr(false) && @@ -11229,7 +10722,7 @@ class GenericUsesSizeView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericUsesSizeView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -11343,13 +10836,13 @@ class GenericUsesSizeView final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: - typename ::emboss::test::UsesSize::GenericRView>, 8>> + [[nodiscard]] typename ::emboss::test::UsesSize::GenericRView>, 8>> r() const; - ::emboss::support::Maybe has_r() const; + [[nodiscard]] ::emboss::support::Maybe has_r() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -11365,9 +10858,9 @@ class GenericUsesSizeView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -11376,13 +10869,13 @@ class GenericUsesSizeView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -11403,17 +10896,17 @@ class GenericUsesSizeView final { default; ~EmbossReservedVirtualRQPlusByteSizeView() = default; - ::std::int32_t Read() const { + [[nodiscard]] ::std::int32_t Read() const { EMBOSS_CHECK(view_.has_r_q_plus_byte_size().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - ::std::int32_t UncheckedRead() const { + [[nodiscard]] ::std::int32_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - bool Ok() const { + [[nodiscard]] bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -11426,12 +10919,12 @@ class GenericUsesSizeView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } private: - ::emboss::support::Maybe MaybeRead() const { + [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.r().q(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Sum(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(1LL))); @@ -11439,7 +10932,7 @@ class GenericUsesSizeView final { return emboss_reserved_local_subexpr_3; } - static constexpr bool ValueIsOk( + [[nodiscard]] static constexpr bool ValueIsOk( ::std::int32_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -11447,8 +10940,8 @@ class GenericUsesSizeView final { const GenericUsesSizeView view_; }; - EmbossReservedVirtualRQPlusByteSizeView r_q_plus_byte_size() const; - ::emboss::support::Maybe has_r_q_plus_byte_size() const; + [[nodiscard]] EmbossReservedVirtualRQPlusByteSizeView r_q_plus_byte_size() const; + [[nodiscard]] ::emboss::support::Maybe has_r_q_plus_byte_size() const; public: class EmbossReservedDollarVirtualMaxSizeInBytesView final { @@ -11464,9 +10957,9 @@ class GenericUsesSizeView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -11475,13 +10968,13 @@ class GenericUsesSizeView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -11499,9 +10992,9 @@ class GenericUsesSizeView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -11510,13 +11003,13 @@ class GenericUsesSizeView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -11547,7 +11040,7 @@ struct EmbossReservedInternalIsGenericUsesSizeView< }; template -inline GenericUsesSizeView< +[[nodiscard]] inline GenericUsesSizeView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -11562,7 +11055,7 @@ MakeUsesSizeView( T &&emboss_reserved_local_arg) { } template -inline GenericUsesSizeView> +[[nodiscard]] inline GenericUsesSizeView> MakeUsesSizeView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericUsesSizeView>( @@ -11571,7 +11064,7 @@ MakeUsesSizeView( T *emboss_reserved_local_data, } template -inline GenericUsesSizeView< +[[nodiscard]] inline GenericUsesSizeView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedUsesSizeView( T *emboss_reserved_local_data, @@ -11637,65 +11130,41 @@ class GenericUsesExternalSizeView final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !x().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !y().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!x().Ok()) return false; + if (!y().Ok()) return false; + if (!IntrinsicSizeInBytes().Ok()) return false; + if (!MaxSizeInBytes().Ok()) return false; + if (!MinSizeInBytes().Ok()) return false; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - static constexpr ::std::size_t SizeInBytes() { + [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - static constexpr bool SizeIsKnown() { + [[nodiscard]] static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericUsesExternalSizeView emboss_reserved_local_other) const { if (!has_x().Known()) return false; @@ -11733,7 +11202,7 @@ class GenericUsesExternalSizeView final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericUsesExternalSizeView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_x().ValueOr(false) && @@ -11780,7 +11249,7 @@ class GenericUsesExternalSizeView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericUsesExternalSizeView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -11913,19 +11382,19 @@ class GenericUsesExternalSizeView final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: - typename ::emboss::test::GenericStructureWithConstantsView> + [[nodiscard]] typename ::emboss::test::GenericStructureWithConstantsView> x() const; - ::emboss::support::Maybe has_x() const; + [[nodiscard]] ::emboss::support::Maybe has_x() const; public: - typename ::emboss::test::GenericStructureWithConstantsView> + [[nodiscard]] typename ::emboss::test::GenericStructureWithConstantsView> y() const; - ::emboss::support::Maybe has_y() const; + [[nodiscard]] ::emboss::support::Maybe has_y() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -11941,9 +11410,9 @@ class GenericUsesExternalSizeView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -11952,13 +11421,13 @@ class GenericUsesExternalSizeView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -11976,9 +11445,9 @@ class GenericUsesExternalSizeView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -11987,13 +11456,13 @@ class GenericUsesExternalSizeView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -12011,9 +11480,9 @@ class GenericUsesExternalSizeView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -12022,13 +11491,13 @@ class GenericUsesExternalSizeView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -12059,7 +11528,7 @@ struct EmbossReservedInternalIsGenericUsesExternalSizeView< }; template -inline GenericUsesExternalSizeView< +[[nodiscard]] inline GenericUsesExternalSizeView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -12074,7 +11543,7 @@ MakeUsesExternalSizeView( T &&emboss_reserved_local_arg) { } template -inline GenericUsesExternalSizeView> +[[nodiscard]] inline GenericUsesExternalSizeView> MakeUsesExternalSizeView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericUsesExternalSizeView>( @@ -12083,7 +11552,7 @@ MakeUsesExternalSizeView( T *emboss_reserved_local_data, } template -inline GenericUsesExternalSizeView< +[[nodiscard]] inline GenericUsesExternalSizeView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedUsesExternalSizeView( T *emboss_reserved_local_data, @@ -12153,93 +11622,45 @@ class GenericImplicitWriteBackView final { - bool Ok() const { + [[nodiscard]] bool Ok() const { if (!IsComplete()) return false; { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !x().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !x_plus_ten().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !ten_plus_x().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !x_minus_ten().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !ten_minus_x().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !ten_minus_x_plus_ten().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MaxSizeInBytes().Ok()) return false; - } - - - { - const auto emboss_reserved_local_field_present = ::emboss::support::Maybe(true); - if (!emboss_reserved_local_field_present.Known()) return false; - if (emboss_reserved_local_field_present.ValueOrDefault() && !MinSizeInBytes().Ok()) return false; + const auto emboss_reserved_cond = ::emboss::support::Maybe(true); + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { + if (!x().Ok()) return false; + if (!x_plus_ten().Ok()) return false; + if (!ten_plus_x().Ok()) return false; + if (!x_minus_ten().Ok()) return false; + if (!ten_minus_x().Ok()) return false; + if (!ten_minus_x_plus_ten().Ok()) return false; + if (!IntrinsicSizeInBytes().Ok()) return false; + if (!MaxSizeInBytes().Ok()) return false; + if (!MinSizeInBytes().Ok()) return false; + } } - - return true; } - Storage BackingStorage() const { return backing_; } - bool IsComplete() const { + [[nodiscard]] Storage BackingStorage() const { return backing_; } + [[nodiscard]] bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - static constexpr ::std::size_t SizeInBytes() { + [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - static constexpr bool SizeIsKnown() { + [[nodiscard]] static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - bool Equals( + [[nodiscard]] bool Equals( GenericImplicitWriteBackView emboss_reserved_local_other) const { if (!has_x().Known()) return false; @@ -12260,7 +11681,7 @@ class GenericImplicitWriteBackView final { return true; } template - bool UncheckedEquals( + [[nodiscard]] bool UncheckedEquals( GenericImplicitWriteBackView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_x().ValueOr(false) && @@ -12293,7 +11714,7 @@ class GenericImplicitWriteBackView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - bool TryToCopyFrom( + [[nodiscard]] bool TryToCopyFrom( GenericImplicitWriteBackView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -12578,15 +11999,15 @@ class GenericImplicitWriteBackView final { - static constexpr bool IsAggregate() { return true; } + [[nodiscard]] static constexpr bool IsAggregate() { return true; } public: - typename ::emboss::prelude::UIntView< + [[nodiscard]] typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> x() const; - ::emboss::support::Maybe has_x() const; + [[nodiscard]] ::emboss::support::Maybe has_x() const; public: class EmbossReservedVirtualXPlusTenView final { @@ -12605,17 +12026,17 @@ class GenericImplicitWriteBackView final { default; ~EmbossReservedVirtualXPlusTenView() = default; - ::std::int32_t Read() const { + [[nodiscard]] ::std::int32_t Read() const { EMBOSS_CHECK(view_.has_x_plus_ten().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - ::std::int32_t UncheckedRead() const { + [[nodiscard]] ::std::int32_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - bool Ok() const { + [[nodiscard]] bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -12628,9 +12049,9 @@ class GenericImplicitWriteBackView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } - bool TryToWrite(::std::int32_t emboss_reserved_local_value) { + [[nodiscard]] bool TryToWrite(::std::int32_t emboss_reserved_local_value) { const auto emboss_reserved_local_maybe_new_value = ::emboss::support::Difference(::emboss::support::Maybe(emboss_reserved_local_value), ::emboss::support::Maybe(static_cast(10LL))); if (!CouldWriteValue(emboss_reserved_local_value)) return false; return view_.x().TryToWrite( @@ -12644,7 +12065,7 @@ class GenericImplicitWriteBackView final { void UncheckedWrite(::std::int32_t emboss_reserved_local_value) { view_.x().UncheckedWrite((::emboss::support::Difference(::emboss::support::Maybe(emboss_reserved_local_value), ::emboss::support::Maybe(static_cast(10LL)))).ValueOrDefault()); } - bool CouldWriteValue(::std::int32_t emboss_reserved_local_value) { + [[nodiscard]] bool CouldWriteValue(::std::int32_t emboss_reserved_local_value) { if (!ValueIsOk(emboss_reserved_local_value)) return false; const auto emboss_reserved_local_maybe_new_value = ::emboss::support::Difference(::emboss::support::Maybe(emboss_reserved_local_value), ::emboss::support::Maybe(static_cast(10LL))); if (!emboss_reserved_local_maybe_new_value.Known()) return false; @@ -12660,7 +12081,7 @@ class GenericImplicitWriteBackView final { private: - ::emboss::support::Maybe MaybeRead() const { + [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.x(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Sum(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(10LL))); @@ -12668,7 +12089,7 @@ class GenericImplicitWriteBackView final { return emboss_reserved_local_subexpr_3; } - static constexpr bool ValueIsOk( + [[nodiscard]] static constexpr bool ValueIsOk( ::std::int32_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -12676,8 +12097,8 @@ class GenericImplicitWriteBackView final { const GenericImplicitWriteBackView view_; }; - EmbossReservedVirtualXPlusTenView x_plus_ten() const; - ::emboss::support::Maybe has_x_plus_ten() const; + [[nodiscard]] EmbossReservedVirtualXPlusTenView x_plus_ten() const; + [[nodiscard]] ::emboss::support::Maybe has_x_plus_ten() const; public: class EmbossReservedVirtualTenPlusXView final { @@ -12696,17 +12117,17 @@ class GenericImplicitWriteBackView final { default; ~EmbossReservedVirtualTenPlusXView() = default; - ::std::int32_t Read() const { + [[nodiscard]] ::std::int32_t Read() const { EMBOSS_CHECK(view_.has_ten_plus_x().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - ::std::int32_t UncheckedRead() const { + [[nodiscard]] ::std::int32_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - bool Ok() const { + [[nodiscard]] bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -12719,9 +12140,9 @@ class GenericImplicitWriteBackView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } - bool TryToWrite(::std::int32_t emboss_reserved_local_value) { + [[nodiscard]] bool TryToWrite(::std::int32_t emboss_reserved_local_value) { const auto emboss_reserved_local_maybe_new_value = ::emboss::support::Difference(::emboss::support::Maybe(emboss_reserved_local_value), ::emboss::support::Maybe(static_cast(10LL))); if (!CouldWriteValue(emboss_reserved_local_value)) return false; return view_.x().TryToWrite( @@ -12735,7 +12156,7 @@ class GenericImplicitWriteBackView final { void UncheckedWrite(::std::int32_t emboss_reserved_local_value) { view_.x().UncheckedWrite((::emboss::support::Difference(::emboss::support::Maybe(emboss_reserved_local_value), ::emboss::support::Maybe(static_cast(10LL)))).ValueOrDefault()); } - bool CouldWriteValue(::std::int32_t emboss_reserved_local_value) { + [[nodiscard]] bool CouldWriteValue(::std::int32_t emboss_reserved_local_value) { if (!ValueIsOk(emboss_reserved_local_value)) return false; const auto emboss_reserved_local_maybe_new_value = ::emboss::support::Difference(::emboss::support::Maybe(emboss_reserved_local_value), ::emboss::support::Maybe(static_cast(10LL))); if (!emboss_reserved_local_maybe_new_value.Known()) return false; @@ -12751,7 +12172,7 @@ class GenericImplicitWriteBackView final { private: - ::emboss::support::Maybe MaybeRead() const { + [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.x(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Sum(::emboss::support::Maybe(static_cast(10LL)), emboss_reserved_local_subexpr_2); @@ -12759,7 +12180,7 @@ class GenericImplicitWriteBackView final { return emboss_reserved_local_subexpr_3; } - static constexpr bool ValueIsOk( + [[nodiscard]] static constexpr bool ValueIsOk( ::std::int32_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -12767,8 +12188,8 @@ class GenericImplicitWriteBackView final { const GenericImplicitWriteBackView view_; }; - EmbossReservedVirtualTenPlusXView ten_plus_x() const; - ::emboss::support::Maybe has_ten_plus_x() const; + [[nodiscard]] EmbossReservedVirtualTenPlusXView ten_plus_x() const; + [[nodiscard]] ::emboss::support::Maybe has_ten_plus_x() const; public: class EmbossReservedVirtualXMinusTenView final { @@ -12787,17 +12208,17 @@ class GenericImplicitWriteBackView final { default; ~EmbossReservedVirtualXMinusTenView() = default; - ::std::int32_t Read() const { + [[nodiscard]] ::std::int32_t Read() const { EMBOSS_CHECK(view_.has_x_minus_ten().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - ::std::int32_t UncheckedRead() const { + [[nodiscard]] ::std::int32_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - bool Ok() const { + [[nodiscard]] bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -12810,9 +12231,9 @@ class GenericImplicitWriteBackView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } - bool TryToWrite(::std::int32_t emboss_reserved_local_value) { + [[nodiscard]] bool TryToWrite(::std::int32_t emboss_reserved_local_value) { const auto emboss_reserved_local_maybe_new_value = ::emboss::support::Sum(::emboss::support::Maybe(emboss_reserved_local_value), ::emboss::support::Maybe(static_cast(10LL))); if (!CouldWriteValue(emboss_reserved_local_value)) return false; return view_.x().TryToWrite( @@ -12826,7 +12247,7 @@ class GenericImplicitWriteBackView final { void UncheckedWrite(::std::int32_t emboss_reserved_local_value) { view_.x().UncheckedWrite((::emboss::support::Sum(::emboss::support::Maybe(emboss_reserved_local_value), ::emboss::support::Maybe(static_cast(10LL)))).ValueOrDefault()); } - bool CouldWriteValue(::std::int32_t emboss_reserved_local_value) { + [[nodiscard]] bool CouldWriteValue(::std::int32_t emboss_reserved_local_value) { if (!ValueIsOk(emboss_reserved_local_value)) return false; const auto emboss_reserved_local_maybe_new_value = ::emboss::support::Sum(::emboss::support::Maybe(emboss_reserved_local_value), ::emboss::support::Maybe(static_cast(10LL))); if (!emboss_reserved_local_maybe_new_value.Known()) return false; @@ -12842,7 +12263,7 @@ class GenericImplicitWriteBackView final { private: - ::emboss::support::Maybe MaybeRead() const { + [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.x(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Difference(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(10LL))); @@ -12850,7 +12271,7 @@ class GenericImplicitWriteBackView final { return emboss_reserved_local_subexpr_3; } - static constexpr bool ValueIsOk( + [[nodiscard]] static constexpr bool ValueIsOk( ::std::int32_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -12858,8 +12279,8 @@ class GenericImplicitWriteBackView final { const GenericImplicitWriteBackView view_; }; - EmbossReservedVirtualXMinusTenView x_minus_ten() const; - ::emboss::support::Maybe has_x_minus_ten() const; + [[nodiscard]] EmbossReservedVirtualXMinusTenView x_minus_ten() const; + [[nodiscard]] ::emboss::support::Maybe has_x_minus_ten() const; public: class EmbossReservedVirtualTenMinusXView final { @@ -12878,17 +12299,17 @@ class GenericImplicitWriteBackView final { default; ~EmbossReservedVirtualTenMinusXView() = default; - ::std::int32_t Read() const { + [[nodiscard]] ::std::int32_t Read() const { EMBOSS_CHECK(view_.has_ten_minus_x().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - ::std::int32_t UncheckedRead() const { + [[nodiscard]] ::std::int32_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - bool Ok() const { + [[nodiscard]] bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -12901,9 +12322,9 @@ class GenericImplicitWriteBackView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } - bool TryToWrite(::std::int32_t emboss_reserved_local_value) { + [[nodiscard]] bool TryToWrite(::std::int32_t emboss_reserved_local_value) { const auto emboss_reserved_local_maybe_new_value = ::emboss::support::Difference(::emboss::support::Maybe(static_cast(10LL)), ::emboss::support::Maybe(emboss_reserved_local_value)); if (!CouldWriteValue(emboss_reserved_local_value)) return false; return view_.x().TryToWrite( @@ -12917,7 +12338,7 @@ class GenericImplicitWriteBackView final { void UncheckedWrite(::std::int32_t emboss_reserved_local_value) { view_.x().UncheckedWrite((::emboss::support::Difference(::emboss::support::Maybe(static_cast(10LL)), ::emboss::support::Maybe(emboss_reserved_local_value))).ValueOrDefault()); } - bool CouldWriteValue(::std::int32_t emboss_reserved_local_value) { + [[nodiscard]] bool CouldWriteValue(::std::int32_t emboss_reserved_local_value) { if (!ValueIsOk(emboss_reserved_local_value)) return false; const auto emboss_reserved_local_maybe_new_value = ::emboss::support::Difference(::emboss::support::Maybe(static_cast(10LL)), ::emboss::support::Maybe(emboss_reserved_local_value)); if (!emboss_reserved_local_maybe_new_value.Known()) return false; @@ -12933,7 +12354,7 @@ class GenericImplicitWriteBackView final { private: - ::emboss::support::Maybe MaybeRead() const { + [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.x(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Difference(::emboss::support::Maybe(static_cast(10LL)), emboss_reserved_local_subexpr_2); @@ -12941,7 +12362,7 @@ class GenericImplicitWriteBackView final { return emboss_reserved_local_subexpr_3; } - static constexpr bool ValueIsOk( + [[nodiscard]] static constexpr bool ValueIsOk( ::std::int32_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -12949,8 +12370,8 @@ class GenericImplicitWriteBackView final { const GenericImplicitWriteBackView view_; }; - EmbossReservedVirtualTenMinusXView ten_minus_x() const; - ::emboss::support::Maybe has_ten_minus_x() const; + [[nodiscard]] EmbossReservedVirtualTenMinusXView ten_minus_x() const; + [[nodiscard]] ::emboss::support::Maybe has_ten_minus_x() const; public: class EmbossReservedVirtualTenMinusXPlusTenView final { @@ -12969,17 +12390,17 @@ class GenericImplicitWriteBackView final { default; ~EmbossReservedVirtualTenMinusXPlusTenView() = default; - ::std::int32_t Read() const { + [[nodiscard]] ::std::int32_t Read() const { EMBOSS_CHECK(view_.has_ten_minus_x_plus_ten().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - ::std::int32_t UncheckedRead() const { + [[nodiscard]] ::std::int32_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - bool Ok() const { + [[nodiscard]] bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -12992,9 +12413,9 @@ class GenericImplicitWriteBackView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } - bool TryToWrite(::std::int32_t emboss_reserved_local_value) { + [[nodiscard]] bool TryToWrite(::std::int32_t emboss_reserved_local_value) { const auto emboss_reserved_local_maybe_new_value = ::emboss::support::Difference(::emboss::support::Maybe(static_cast(10LL)), ::emboss::support::Difference(::emboss::support::Maybe(emboss_reserved_local_value), ::emboss::support::Maybe(static_cast(10LL)))); if (!CouldWriteValue(emboss_reserved_local_value)) return false; return view_.x().TryToWrite( @@ -13008,7 +12429,7 @@ class GenericImplicitWriteBackView final { void UncheckedWrite(::std::int32_t emboss_reserved_local_value) { view_.x().UncheckedWrite((::emboss::support::Difference(::emboss::support::Maybe(static_cast(10LL)), ::emboss::support::Difference(::emboss::support::Maybe(emboss_reserved_local_value), ::emboss::support::Maybe(static_cast(10LL))))).ValueOrDefault()); } - bool CouldWriteValue(::std::int32_t emboss_reserved_local_value) { + [[nodiscard]] bool CouldWriteValue(::std::int32_t emboss_reserved_local_value) { if (!ValueIsOk(emboss_reserved_local_value)) return false; const auto emboss_reserved_local_maybe_new_value = ::emboss::support::Difference(::emboss::support::Maybe(static_cast(10LL)), ::emboss::support::Difference(::emboss::support::Maybe(emboss_reserved_local_value), ::emboss::support::Maybe(static_cast(10LL)))); if (!emboss_reserved_local_maybe_new_value.Known()) return false; @@ -13024,7 +12445,7 @@ class GenericImplicitWriteBackView final { private: - ::emboss::support::Maybe MaybeRead() const { + [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.x(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Difference(::emboss::support::Maybe(static_cast(10LL)), emboss_reserved_local_subexpr_2); @@ -13033,7 +12454,7 @@ class GenericImplicitWriteBackView final { return emboss_reserved_local_subexpr_4; } - static constexpr bool ValueIsOk( + [[nodiscard]] static constexpr bool ValueIsOk( ::std::int32_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -13041,8 +12462,8 @@ class GenericImplicitWriteBackView final { const GenericImplicitWriteBackView view_; }; - EmbossReservedVirtualTenMinusXPlusTenView ten_minus_x_plus_ten() const; - ::emboss::support::Maybe has_ten_minus_x_plus_ten() const; + [[nodiscard]] EmbossReservedVirtualTenMinusXPlusTenView ten_minus_x_plus_ten() const; + [[nodiscard]] ::emboss::support::Maybe has_ten_minus_x_plus_ten() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -13058,9 +12479,9 @@ class GenericImplicitWriteBackView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -13069,13 +12490,13 @@ class GenericImplicitWriteBackView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -13093,9 +12514,9 @@ class GenericImplicitWriteBackView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -13104,13 +12525,13 @@ class GenericImplicitWriteBackView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -13128,9 +12549,9 @@ class GenericImplicitWriteBackView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - static constexpr ::std::int32_t Read(); - static constexpr ::std::int32_t UncheckedRead(); - static constexpr bool Ok() { return true; } + [[nodiscard]] static constexpr ::std::int32_t Read(); + [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); + [[nodiscard]] static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -13139,13 +12560,13 @@ class GenericImplicitWriteBackView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - static constexpr bool IsAggregate() { return false; } + [[nodiscard]] static constexpr bool IsAggregate() { return false; } }; - static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -13176,7 +12597,7 @@ struct EmbossReservedInternalIsGenericImplicitWriteBackView< }; template -inline GenericImplicitWriteBackView< +[[nodiscard]] inline GenericImplicitWriteBackView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -13191,7 +12612,7 @@ MakeImplicitWriteBackView( T &&emboss_reserved_local_arg) { } template -inline GenericImplicitWriteBackView> +[[nodiscard]] inline GenericImplicitWriteBackView> MakeImplicitWriteBackView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericImplicitWriteBackView>( @@ -13200,7 +12621,7 @@ MakeImplicitWriteBackView( T *emboss_reserved_local_data, } template -inline GenericImplicitWriteBackView< +[[nodiscard]] inline GenericImplicitWriteBackView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedImplicitWriteBackView( T *emboss_reserved_local_data, From ef26abdd159a9f0f9a4b6a03041880aa815b23ce Mon Sep 17 00:00:00 2001 From: Aaron Webster Date: Thu, 29 Jan 2026 10:04:23 -0800 Subject: [PATCH 3/6] Address review comments from PR #235 - Remove [[nodiscard]] annotations (C++17 feature) and create separate issue #242 to discuss C++14 vs C++17 support - Remove redundant check in ExpressionScope.add() that was already covered by the parent scope lookup - Revert unnecessary style change in _render_existence_test - Add comprehensive docstring to _generate_optimized_ok_method_body explaining the switch optimization with examples - Refactor switch/if generation to use templates for better readability - Optimize trivially-true conditions to skip if-block wrapper when condition is statically known to be true --- .../back_end/cpp/generated_code_templates | 111 +++++++---- compiler/back_end/cpp/header_generator.py | 173 +++++++++++++----- 2 files changed, 201 insertions(+), 83 deletions(-) diff --git a/compiler/back_end/cpp/generated_code_templates b/compiler/back_end/cpp/generated_code_templates index 9a32f50..a521938 100644 --- a/compiler/back_end/cpp/generated_code_templates +++ b/compiler/back_end/cpp/generated_code_templates @@ -124,7 +124,7 @@ class Generic${name}View final { ${enum_usings} - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; ${parameter_ok_checks} ${ok_subexpressions} @@ -132,8 +132,8 @@ ${field_ok_checks} ${requires_check} return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeIn${units}().Ok() && backing_.SizeIn${units}() >= static_cast( @@ -142,12 +142,12 @@ ${requires_check} ${size_method} template - [[nodiscard]] bool Equals( + bool Equals( Generic${name}View emboss_reserved_local_other) const { ${equals_method_body} return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( Generic${name}View emboss_reserved_local_other) const { ${unchecked_equals_method_body} return true; } @@ -172,7 +172,7 @@ ${size_method} emboss_reserved_local_other.IntrinsicSizeIn${units}().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( Generic${name}View emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -181,7 +181,7 @@ ${size_method} ${text_stream_methods} - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } ${field_method_declarations} @@ -216,7 +216,7 @@ struct EmbossReservedInternalIsGeneric${name}View< }; template -[[nodiscard]] inline Generic${name}View< +inline Generic${name}View< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -231,7 +231,7 @@ Make${name}View(${constructor_parameters} T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline Generic${name}View> +inline Generic${name}View> Make${name}View(${constructor_parameters} T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return Generic${name}View>( @@ -240,7 +240,7 @@ Make${name}View(${constructor_parameters} T *emboss_reserved_local_data, } template -[[nodiscard]] inline Generic${name}View< +inline Generic${name}View< /**/ ::emboss::support::ContiguousBuffer> MakeAligned${name}View( ${constructor_parameters} T *emboss_reserved_local_data, @@ -375,18 +375,18 @@ ${write_fields} } // ** constant_structure_size_method ** //////////////////////////////////////// - [[nodiscard]] static constexpr ::std::size_t SizeIn${units}() { + static constexpr ::std::size_t SizeIn${units}() { return static_cast(IntrinsicSizeIn${units}().Read()); } - [[nodiscard]] static constexpr bool SizeIsKnown() { + static constexpr bool SizeIsKnown() { return IntrinsicSizeIn${units}().Ok(); } // ** runtime_structure_size_method ** ///////////////////////////////////////// - [[nodiscard]] ::std::size_t SizeIn${units}() const { + ::std::size_t SizeIn${units}() const { return static_cast(IntrinsicSizeIn${units}().Read()); } - [[nodiscard]] bool SizeIsKnown() const { return IntrinsicSizeIn${units}().Ok(); } + bool SizeIsKnown() const { return IntrinsicSizeIn${units}().Ok(); } // ** ok_method_test ** //////////////////////////////////////////////////////// @@ -402,6 +402,45 @@ ${write_fields} } +// ** ok_method_switch_block ** //////////////////////////////////////////////// + // Check fields that depend on a common discriminant using a switch. + { +${inner_scope_definitions} + const auto emboss_reserved_switch_discrim = ${discriminant}; + if (!emboss_reserved_switch_discrim.Known()) return false; + switch (emboss_reserved_switch_discrim.ValueOrDefault()) { +${switch_cases} + } + } + + +// ** ok_method_switch_case ** ///////////////////////////////////////////////// + case ${case_value}: + if (!${field}().Ok()) return false; + break; + + +// ** ok_method_if_block ** //////////////////////////////////////////////////// + // Check fields that share a common condition. + { +${inner_scope_definitions} + const auto emboss_reserved_cond = ${condition}; + if (!emboss_reserved_cond.Known()) return false; + if (emboss_reserved_cond.ValueOrDefault()) { +${field_checks} + } + } + + +// ** ok_method_field_check ** ///////////////////////////////////////////////// + if (!${field}().Ok()) return false; + + +// ** ok_method_unconditional_check ** ///////////////////////////////////////// + // Field is always present (condition is statically true). + if (!${field}().Ok()) return false; + + // ** equals_method_test ** //////////////////////////////////////////////////// // If this->${field} is not equal to emboss_reserved_local_other.${field}, // then the structures are not equal. @@ -491,8 +530,8 @@ struct ${name} { // ** structure_single_field_method_declarations ** //////////////////////////// ${visibility}: - [[nodiscard]] typename ${type_reader} ${name}() const; - [[nodiscard]] ::emboss::support::Maybe has_${name}() const; + typename ${type_reader} ${name}() const; + ::emboss::support::Maybe has_${name}() const; // ** structure_single_field_method_definitions ** ///////////////////////////// @@ -547,9 +586,9 @@ Generic${parent_type}View::has_${name}() const { default; ~${virtual_view_type_name}() = default; - [[nodiscard]] static constexpr ${logical_type} Read(); - [[nodiscard]] static constexpr ${logical_type} UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ${logical_type} Read(); + static constexpr ${logical_type} UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -558,13 +597,13 @@ Generic${parent_type}View::has_${name}() const { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr ${virtual_view_type_name} ${name}() { + static constexpr ${virtual_view_type_name} ${name}() { return ${virtual_view_type_name}(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_${name}() { + static constexpr ::emboss::support::Maybe has_${name}() { return ::emboss::support::Maybe(true); } @@ -607,14 +646,14 @@ Generic${parent_type}View< default; ~${virtual_view_type_name}() = default; - [[nodiscard]] ${logical_type} Read() const { + ${logical_type} Read() const { EMBOSS_CHECK(view_.has_${name}().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - [[nodiscard]] ${logical_type} UncheckedRead() const { + ${logical_type} UncheckedRead() const { // UncheckedRead() on a virtual still calls Ok() on its dependencies; // i.e., it still does some bounds checking. This is because of a subtle // case, illustrated by the example below: @@ -648,7 +687,7 @@ Generic${parent_type}View< } // Ok() can be false if some dependency is unreadable, *or* if there is an // error somewhere in the arithmetic -- say, division by zero. - [[nodiscard]] bool Ok() const { + bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -661,17 +700,17 @@ Generic${parent_type}View< this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } ${write_methods} private: - [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { + ::emboss::support::Maybe MaybeRead() const { ${read_subexpressions} return ${read_value}; } - [[nodiscard]] static constexpr bool ValueIsOk( + static constexpr bool ValueIsOk( ${logical_type} emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ${value_is_ok}.ValueOr(false); @@ -679,12 +718,12 @@ ${read_subexpressions} const Generic${parent_type}View view_; }; - [[nodiscard]] ${virtual_view_type_name} ${name}() const; - [[nodiscard]] ::emboss::support::Maybe has_${name}() const; + ${virtual_view_type_name} ${name}() const; + ::emboss::support::Maybe has_${name}() const; // ** structure_single_virtual_field_write_methods ** ////////////////////////// - [[nodiscard]] bool TryToWrite(${logical_type} emboss_reserved_local_value) { + bool TryToWrite(${logical_type} emboss_reserved_local_value) { const auto emboss_reserved_local_maybe_new_value = ${transform}; if (!CouldWriteValue(emboss_reserved_local_value)) return false; return view_.${destination}.TryToWrite( @@ -698,7 +737,7 @@ ${read_subexpressions} void UncheckedWrite(${logical_type} emboss_reserved_local_value) { view_.${destination}.UncheckedWrite((${transform}).ValueOrDefault()); } - [[nodiscard]] bool CouldWriteValue(${logical_type} emboss_reserved_local_value) { + bool CouldWriteValue(${logical_type} emboss_reserved_local_value) { if (!ValueIsOk(emboss_reserved_local_value)) return false; const auto emboss_reserved_local_maybe_new_value = ${transform}; if (!emboss_reserved_local_maybe_new_value.Known()) return false; @@ -731,11 +770,11 @@ Generic${parent_type}View::has_${name}() const { // ** structure_single_field_indirect_method_declarations ** /////////////////// ${visibility}: // The "this->" is required for (some versions of?) GCC. - [[nodiscard]] auto ${name}() const -> decltype(this->${aliased_field}) { + auto ${name}() const -> decltype(this->${aliased_field}) { return has_${name}().ValueOrDefault() ? ${aliased_field} : decltype(this->${aliased_field})(); } - [[nodiscard]] ::emboss::support::Maybe has_${name}() const; + ::emboss::support::Maybe has_${name}() const; // ** struct_single_field_indirect_method_definitions ** /////////////////////// @@ -749,14 +788,14 @@ Generic${parent_type}View::has_${name}() const { // ** structure_single_parameter_field_method_declarations ** ////////////////// private: // TODO(bolms): Is there any harm if these are public methods? - [[nodiscard]] constexpr ::emboss::support::MaybeConstantView + constexpr ::emboss::support::MaybeConstantView ${name}() const { return parameters_initialized_ ? ::emboss::support::MaybeConstantView( ${name}_) : ::emboss::support::MaybeConstantView(); } - [[nodiscard]] constexpr ::emboss::support::Maybe has_${name}() const { + constexpr ::emboss::support::Maybe has_${name}() const { return ::emboss::support::Maybe(parameters_initialized_); } diff --git a/compiler/back_end/cpp/header_generator.py b/compiler/back_end/cpp/header_generator.py index 4489d21..08071c8 100644 --- a/compiler/back_end/cpp/header_generator.py +++ b/compiler/back_end/cpp/header_generator.py @@ -786,11 +786,10 @@ def add(self, subexpr): scope = scope._parent # Not found, add to current scope - if subexpr not in self._subexpr_to_name: - self._index_to_subexpr.append(subexpr) - self._subexpr_to_name[subexpr] = self._prefix + str( - len(self._index_to_subexpr) - ) + self._index_to_subexpr.append(subexpr) + self._subexpr_to_name[subexpr] = self._prefix + str( + len(self._index_to_subexpr) + ) return self._subexpr_to_name[subexpr] def subexprs(self): @@ -888,9 +887,7 @@ def _render_expression(expression, ir, field_reader=None, subexpressions=None): def _render_existence_test(field, ir, subexpressions=None): - return _render_expression( - field.existence_condition, ir, subexpressions=subexpressions - ) + return _render_expression(field.existence_condition, ir, subexpressions) def _alignment_of_location(location): @@ -1393,6 +1390,69 @@ def _get_switch_candidate(expression, ir): def _generate_optimized_ok_method_body(fields, ir, subexpressions): + """Generates optimized C++ code for the Ok() method body. + + This function optimizes validation logic for structures with conditional + fields by grouping fields that share the same discriminant into switch + statements, rather than generating separate if-statements for each field. + + For example, given this Emboss definition: + + struct Foo: + 0 [+4] UInt tag + if tag == 0: + 4 [+4] UInt var_0 + if tag == 1: + 4 [+4] UInt var_1 + if tag == 0: + 8 [+4] UInt var_x + + Instead of generating separate if-statements: + + if (tag() == 0 && !var_0().Ok()) return false; + if (tag() == 1 && !var_1().Ok()) return false; + if (tag() == 0 && !var_x().Ok()) return false; + + This generates an optimized switch statement: + + const auto emboss_reserved_switch_discrim = tag(); + if (!emboss_reserved_switch_discrim.Known()) return false; + switch (emboss_reserved_switch_discrim.ValueOrDefault()) { + case 0: + if (!var_0().Ok()) return false; + break; + case 1: + if (!var_1().Ok()) return false; + break; + } + + Note: When multiple fields share the same case value (like var_0 and var_x + both guarded by tag == 0), only the first field for that case value is + checked in the switch. This is because once we've checked var_0 for case 0, + we break out of the switch. Fields with duplicate case values will fall + through to the if-statement path. + + Fields with non-equality conditions (or conditions that can't be converted + to switch cases) are grouped by their rendered condition and emitted as + if-statements. + + Additionally, when a condition is statically known to be true (e.g., fields + that are always present), the if-block wrapper is omitted entirely and the + field checks are emitted directly. This avoids generating unnecessary + runtime checks like: + + const auto emboss_reserved_cond = Maybe(true); + if (!emboss_reserved_cond.Known()) return false; // Always true + if (emboss_reserved_cond.ValueOrDefault()) { ... } // Always true + + Arguments: + fields: List of field IR nodes to generate Ok() checks for. + ir: The full IR for looking up references. + subexpressions: An ExpressionScope for sharing common subexpressions. + + Returns: + A string containing the C++ code for the optimized Ok() method body. + """ groups = {} ordered_keys = [] @@ -1423,67 +1483,86 @@ def _generate_optimized_ok_method_body(fields, ir, subexpressions): ordered_keys.append(key) groups[key]["fields"].append(field) - lines = [] + blocks = [] for key in ordered_keys: group = groups[key] if group["type"] == "switch": discrim_rendered = _render_expression( group["expr"], ir, subexpressions=subexpressions ).rendered - lines.append(" {") # Create a new scope for the switch block inner_scope = ExpressionScope( "emboss_reserved_switch_scope_", parent=subexpressions ) - lines.append(inner_scope.definition_code().rstrip()) - lines.append( - " const auto emboss_reserved_switch_discrim = {};".format( - discrim_rendered - ) - ) - lines.append( - " if (!emboss_reserved_switch_discrim.Known()) return false;" - ) - lines.append( - " switch (emboss_reserved_switch_discrim.ValueOrDefault()) {" - ) + # Generate switch cases using template + switch_cases = [] for case_val, field in group["cases"]: - lines.append(" case {}:".format(case_val)) - lines.append( - " if (!{}().Ok()) return false;".format( - _cpp_field_name(field.name.name.text) + switch_cases.append( + code_template.format_template( + _TEMPLATES.ok_method_switch_case, + case_value=case_val, + field=_cpp_field_name(field.name.name.text), ) ) - lines.append(" break;") - lines.append(" }") - lines.append(" }") + + blocks.append( + code_template.format_template( + _TEMPLATES.ok_method_switch_block, + inner_scope_definitions=inner_scope.definition_code().rstrip(), + discriminant=discrim_rendered, + switch_cases="".join(switch_cases), + ) + ) else: - cond_rendered = _render_expression( + cond_result = _render_expression( group["expr"], ir, subexpressions=subexpressions - ).rendered - lines.append(" {") - # Create a new scope for the if block - inner_scope = ExpressionScope( - "emboss_reserved_if_scope_", parent=subexpressions ) - lines.append(inner_scope.definition_code().rstrip()) - lines.append( - " const auto emboss_reserved_cond = {};".format(cond_rendered) + # Check if condition is statically true (constant boolean true) + # In this case, we can skip the if-block wrapper entirely. + is_always_true = ( + cond_result.is_constant + and group["expr"].type.which_type == "boolean" + and group["expr"].type.boolean.has_field("value") + and group["expr"].type.boolean.value ) - lines.append(" if (!emboss_reserved_cond.Known()) return false;") - lines.append(" if (emboss_reserved_cond.ValueOrDefault()) {") - for field in group["fields"]: - lines.append( - " if (!{}().Ok()) return false;".format( - _cpp_field_name(field.name.name.text) + + if is_always_true: + # Emit unconditional field checks (no if-block wrapper needed) + for field in group["fields"]: + blocks.append( + code_template.format_template( + _TEMPLATES.ok_method_unconditional_check, + field=_cpp_field_name(field.name.name.text), + ) + ) + else: + # Create a new scope for the if block + inner_scope = ExpressionScope( + "emboss_reserved_if_scope_", parent=subexpressions + ) + + # Generate field checks using template + field_checks = [] + for field in group["fields"]: + field_checks.append( + code_template.format_template( + _TEMPLATES.ok_method_field_check, + field=_cpp_field_name(field.name.name.text), + ) + ) + + blocks.append( + code_template.format_template( + _TEMPLATES.ok_method_if_block, + inner_scope_definitions=inner_scope.definition_code().rstrip(), + condition=cond_result.rendered, + field_checks="".join(field_checks), ) ) - lines.append(" }") - lines.append(" }") - return "\n".join([line for line in lines if line.strip()]) + return "".join(blocks) def _generate_structure_definition(type_ir, ir, config: Config): From 0f9f76c976b4b115efbe0d011533acd081cde71a Mon Sep 17 00:00:00 2001 From: Aaron Webster Date: Thu, 29 Jan 2026 10:08:13 -0800 Subject: [PATCH 4/6] Fix Black formatting --- compiler/back_end/cpp/header_generator.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/compiler/back_end/cpp/header_generator.py b/compiler/back_end/cpp/header_generator.py index 08071c8..81904b8 100644 --- a/compiler/back_end/cpp/header_generator.py +++ b/compiler/back_end/cpp/header_generator.py @@ -787,9 +787,7 @@ def add(self, subexpr): # Not found, add to current scope self._index_to_subexpr.append(subexpr) - self._subexpr_to_name[subexpr] = self._prefix + str( - len(self._index_to_subexpr) - ) + self._subexpr_to_name[subexpr] = self._prefix + str(len(self._index_to_subexpr)) return self._subexpr_to_name[subexpr] def subexprs(self): From 2d39b632b47bd1f7b41462cdbefe726cae3bc5ba Mon Sep 17 00:00:00 2001 From: Aaron Webster Date: Thu, 29 Jan 2026 11:07:30 -0800 Subject: [PATCH 5/6] Update C++ golden test files Regenerate all golden .emb.h files to reflect changes from the optimized conditionals implementation. --- testdata/golden_cpp/alignments.emb.h | 326 +- testdata/golden_cpp/anonymous_bits.emb.h | 305 +- testdata/golden_cpp/auto_array_size.emb.h | 205 +- testdata/golden_cpp/bcd.emb.h | 349 +- testdata/golden_cpp/bits.emb.h | 699 ++-- testdata/golden_cpp/complex_offset.emb.h | 436 +-- testdata/golden_cpp/complex_structure.emb.h | 484 +-- testdata/golden_cpp/condition.emb.h | 3303 ++++++++++--------- testdata/golden_cpp/dynamic_size.emb.h | 1173 +++---- testdata/golden_cpp/enum.emb.h | 384 +-- testdata/golden_cpp/enum_case.emb.h | 117 +- testdata/golden_cpp/explicit_sizes.emb.h | 374 +-- testdata/golden_cpp/float.emb.h | 180 +- testdata/golden_cpp/imported.emb.h | 83 +- testdata/golden_cpp/imported_genfiles.emb.h | 83 +- testdata/golden_cpp/importer.emb.h | 90 +- testdata/golden_cpp/importer2.emb.h | 83 +- testdata/golden_cpp/inline_type.emb.h | 90 +- testdata/golden_cpp/int_sizes.emb.h | 132 +- testdata/golden_cpp/large_array.emb.h | 94 +- testdata/golden_cpp/nested_structure.emb.h | 277 +- testdata/golden_cpp/next_keyword.emb.h | 104 +- testdata/golden_cpp/no_enum_traits.emb.h | 83 +- testdata/golden_cpp/parameters.emb.h | 1444 ++++---- testdata/golden_cpp/requires.emb.h | 938 +++--- testdata/golden_cpp/start_size_range.emb.h | 108 +- testdata/golden_cpp/subtypes.emb.h | 442 +-- testdata/golden_cpp/text_format.emb.h | 284 +- testdata/golden_cpp/uint_sizes.emb.h | 855 ++--- testdata/golden_cpp/virtual_field.emb.h | 2384 ++++++------- 30 files changed, 8161 insertions(+), 7748 deletions(-) diff --git a/testdata/golden_cpp/alignments.emb.h b/testdata/golden_cpp/alignments.emb.h index 28b0042..5d1e40e 100644 --- a/testdata/golden_cpp/alignments.emb.h +++ b/testdata/golden_cpp/alignments.emb.h @@ -113,50 +113,59 @@ class GenericAlignmentsView final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; - { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!zero_offset().Ok()) return false; - if (!zero_offset_substructure().Ok()) return false; - if (!two_offset_substructure().Ok()) return false; - if (!three_offset().Ok()) return false; - if (!four_offset().Ok()) return false; - if (!eleven_offset().Ok()) return false; - if (!twelve_offset().Ok()) return false; - if (!zero_offset_four_stride_array().Ok()) return false; - if (!zero_offset_six_stride_array().Ok()) return false; - if (!three_offset_four_stride_array().Ok()) return false; - if (!four_offset_six_stride_array().Ok()) return false; - if (!IntrinsicSizeInBytes().Ok()) return false; - if (!MaxSizeInBytes().Ok()) return false; - if (!MinSizeInBytes().Ok()) return false; - } - } + if (!zero_offset().Ok()) return false; + + if (!zero_offset_substructure().Ok()) return false; + + if (!two_offset_substructure().Ok()) return false; + + if (!three_offset().Ok()) return false; + + if (!four_offset().Ok()) return false; + + if (!eleven_offset().Ok()) return false; + + if (!twelve_offset().Ok()) return false; + + if (!zero_offset_four_stride_array().Ok()) return false; + + if (!zero_offset_six_stride_array().Ok()) return false; + + if (!three_offset_four_stride_array().Ok()) return false; + + if (!four_offset_six_stride_array().Ok()) return false; + + if (!IntrinsicSizeInBytes().Ok()) return false; + + if (!MaxSizeInBytes().Ok()) return false; + + if (!MinSizeInBytes().Ok()) return false; + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { + static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - [[nodiscard]] static constexpr bool SizeIsKnown() { + static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericAlignmentsView emboss_reserved_local_other) const { if (!has_zero_offset().Known()) return false; @@ -347,7 +356,7 @@ class GenericAlignmentsView final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericAlignmentsView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_zero_offset().ValueOr(false) && @@ -520,7 +529,7 @@ class GenericAlignmentsView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericAlignmentsView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -995,89 +1004,89 @@ class GenericAlignmentsView final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: - [[nodiscard]] typename ::emboss::test::GenericPlaceholder4View> + typename ::emboss::test::GenericPlaceholder4View> zero_offset() const; - [[nodiscard]] ::emboss::support::Maybe has_zero_offset() const; + ::emboss::support::Maybe has_zero_offset() const; public: - [[nodiscard]] typename ::emboss::test::GenericPlaceholder6View> + typename ::emboss::test::GenericPlaceholder6View> zero_offset_substructure() const; - [[nodiscard]] ::emboss::support::Maybe has_zero_offset_substructure() const; + ::emboss::support::Maybe has_zero_offset_substructure() const; public: - [[nodiscard]] typename ::emboss::test::GenericPlaceholder6View> + typename ::emboss::test::GenericPlaceholder6View> two_offset_substructure() const; - [[nodiscard]] ::emboss::support::Maybe has_two_offset_substructure() const; + ::emboss::support::Maybe has_two_offset_substructure() const; public: - [[nodiscard]] typename ::emboss::test::GenericPlaceholder4View> + typename ::emboss::test::GenericPlaceholder4View> three_offset() const; - [[nodiscard]] ::emboss::support::Maybe has_three_offset() const; + ::emboss::support::Maybe has_three_offset() const; public: - [[nodiscard]] typename ::emboss::test::GenericPlaceholder4View> + typename ::emboss::test::GenericPlaceholder4View> four_offset() const; - [[nodiscard]] ::emboss::support::Maybe has_four_offset() const; + ::emboss::support::Maybe has_four_offset() const; public: - [[nodiscard]] typename ::emboss::test::GenericPlaceholder4View> + typename ::emboss::test::GenericPlaceholder4View> eleven_offset() const; - [[nodiscard]] ::emboss::support::Maybe has_eleven_offset() const; + ::emboss::support::Maybe has_eleven_offset() const; public: - [[nodiscard]] typename ::emboss::test::GenericPlaceholder4View> + typename ::emboss::test::GenericPlaceholder4View> twelve_offset() const; - [[nodiscard]] ::emboss::support::Maybe has_twelve_offset() const; + ::emboss::support::Maybe has_twelve_offset() const; public: - [[nodiscard]] typename ::emboss::support::GenericArrayView< + typename ::emboss::support::GenericArrayView< typename ::emboss::test::GenericPlaceholder4View::template OffsetStorageType> , typename Storage::template OffsetStorageType, 4, 8 > zero_offset_four_stride_array() const; - [[nodiscard]] ::emboss::support::Maybe has_zero_offset_four_stride_array() const; + ::emboss::support::Maybe has_zero_offset_four_stride_array() const; public: - [[nodiscard]] typename ::emboss::support::GenericArrayView< + typename ::emboss::support::GenericArrayView< typename ::emboss::test::GenericPlaceholder6View::template OffsetStorageType> , typename Storage::template OffsetStorageType, 6, 8 > zero_offset_six_stride_array() const; - [[nodiscard]] ::emboss::support::Maybe has_zero_offset_six_stride_array() const; + ::emboss::support::Maybe has_zero_offset_six_stride_array() const; public: - [[nodiscard]] typename ::emboss::support::GenericArrayView< + typename ::emboss::support::GenericArrayView< typename ::emboss::test::GenericPlaceholder4View::template OffsetStorageType> , typename Storage::template OffsetStorageType, 4, 8 > three_offset_four_stride_array() const; - [[nodiscard]] ::emboss::support::Maybe has_three_offset_four_stride_array() const; + ::emboss::support::Maybe has_three_offset_four_stride_array() const; public: - [[nodiscard]] typename ::emboss::support::GenericArrayView< + typename ::emboss::support::GenericArrayView< typename ::emboss::test::GenericPlaceholder6View::template OffsetStorageType> , typename Storage::template OffsetStorageType, 6, 8 > four_offset_six_stride_array() const; - [[nodiscard]] ::emboss::support::Maybe has_four_offset_six_stride_array() const; + ::emboss::support::Maybe has_four_offset_six_stride_array() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -1093,9 +1102,9 @@ class GenericAlignmentsView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -1104,13 +1113,13 @@ class GenericAlignmentsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -1128,9 +1137,9 @@ class GenericAlignmentsView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -1139,13 +1148,13 @@ class GenericAlignmentsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -1163,9 +1172,9 @@ class GenericAlignmentsView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -1174,13 +1183,13 @@ class GenericAlignmentsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -1211,7 +1220,7 @@ struct EmbossReservedInternalIsGenericAlignmentsView< }; template -[[nodiscard]] inline GenericAlignmentsView< +inline GenericAlignmentsView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -1226,7 +1235,7 @@ MakeAlignmentsView( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericAlignmentsView> +inline GenericAlignmentsView> MakeAlignmentsView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericAlignmentsView>( @@ -1235,7 +1244,7 @@ MakeAlignmentsView( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericAlignmentsView< +inline GenericAlignmentsView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedAlignmentsView( T *emboss_reserved_local_data, @@ -1300,40 +1309,39 @@ class GenericPlaceholder4View final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; - { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!dummy().Ok()) return false; - if (!IntrinsicSizeInBytes().Ok()) return false; - if (!MaxSizeInBytes().Ok()) return false; - if (!MinSizeInBytes().Ok()) return false; - } - } + if (!dummy().Ok()) return false; + + if (!IntrinsicSizeInBytes().Ok()) return false; + + if (!MaxSizeInBytes().Ok()) return false; + + if (!MinSizeInBytes().Ok()) return false; + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { + static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - [[nodiscard]] static constexpr bool SizeIsKnown() { + static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericPlaceholder4View emboss_reserved_local_other) const { if (!has_dummy().Known()) return false; @@ -1354,7 +1362,7 @@ class GenericPlaceholder4View final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericPlaceholder4View emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_dummy().ValueOr(false) && @@ -1387,7 +1395,7 @@ class GenericPlaceholder4View final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericPlaceholder4View emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -1482,15 +1490,15 @@ class GenericPlaceholder4View final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 32>> dummy() const; - [[nodiscard]] ::emboss::support::Maybe has_dummy() const; + ::emboss::support::Maybe has_dummy() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -1506,9 +1514,9 @@ class GenericPlaceholder4View final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -1517,13 +1525,13 @@ class GenericPlaceholder4View final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -1541,9 +1549,9 @@ class GenericPlaceholder4View final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -1552,13 +1560,13 @@ class GenericPlaceholder4View final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -1576,9 +1584,9 @@ class GenericPlaceholder4View final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -1587,13 +1595,13 @@ class GenericPlaceholder4View final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -1624,7 +1632,7 @@ struct EmbossReservedInternalIsGenericPlaceholder4View< }; template -[[nodiscard]] inline GenericPlaceholder4View< +inline GenericPlaceholder4View< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -1639,7 +1647,7 @@ MakePlaceholder4View( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericPlaceholder4View> +inline GenericPlaceholder4View> MakePlaceholder4View( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericPlaceholder4View>( @@ -1648,7 +1656,7 @@ MakePlaceholder4View( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericPlaceholder4View< +inline GenericPlaceholder4View< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedPlaceholder4View( T *emboss_reserved_local_data, @@ -1714,41 +1722,41 @@ class GenericPlaceholder6View final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; - { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!zero_offset().Ok()) return false; - if (!two_offset().Ok()) return false; - if (!IntrinsicSizeInBytes().Ok()) return false; - if (!MaxSizeInBytes().Ok()) return false; - if (!MinSizeInBytes().Ok()) return false; - } - } + if (!zero_offset().Ok()) return false; + + if (!two_offset().Ok()) return false; + + if (!IntrinsicSizeInBytes().Ok()) return false; + + if (!MaxSizeInBytes().Ok()) return false; + + if (!MinSizeInBytes().Ok()) return false; + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { + static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - [[nodiscard]] static constexpr bool SizeIsKnown() { + static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericPlaceholder6View emboss_reserved_local_other) const { if (!has_zero_offset().Known()) return false; @@ -1786,7 +1794,7 @@ class GenericPlaceholder6View final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericPlaceholder6View emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_zero_offset().ValueOr(false) && @@ -1833,7 +1841,7 @@ class GenericPlaceholder6View final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericPlaceholder6View emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -1966,19 +1974,19 @@ class GenericPlaceholder6View final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: - [[nodiscard]] typename ::emboss::test::GenericPlaceholder4View> + typename ::emboss::test::GenericPlaceholder4View> zero_offset() const; - [[nodiscard]] ::emboss::support::Maybe has_zero_offset() const; + ::emboss::support::Maybe has_zero_offset() const; public: - [[nodiscard]] typename ::emboss::test::GenericPlaceholder4View> + typename ::emboss::test::GenericPlaceholder4View> two_offset() const; - [[nodiscard]] ::emboss::support::Maybe has_two_offset() const; + ::emboss::support::Maybe has_two_offset() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -1994,9 +2002,9 @@ class GenericPlaceholder6View final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -2005,13 +2013,13 @@ class GenericPlaceholder6View final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -2029,9 +2037,9 @@ class GenericPlaceholder6View final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -2040,13 +2048,13 @@ class GenericPlaceholder6View final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -2064,9 +2072,9 @@ class GenericPlaceholder6View final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -2075,13 +2083,13 @@ class GenericPlaceholder6View final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -2112,7 +2120,7 @@ struct EmbossReservedInternalIsGenericPlaceholder6View< }; template -[[nodiscard]] inline GenericPlaceholder6View< +inline GenericPlaceholder6View< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -2127,7 +2135,7 @@ MakePlaceholder6View( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericPlaceholder6View> +inline GenericPlaceholder6View> MakePlaceholder6View( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericPlaceholder6View>( @@ -2136,7 +2144,7 @@ MakePlaceholder6View( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericPlaceholder6View< +inline GenericPlaceholder6View< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedPlaceholder6View( T *emboss_reserved_local_data, diff --git a/testdata/golden_cpp/anonymous_bits.emb.h b/testdata/golden_cpp/anonymous_bits.emb.h index bc2c174..ef903f4 100644 --- a/testdata/golden_cpp/anonymous_bits.emb.h +++ b/testdata/golden_cpp/anonymous_bits.emb.h @@ -119,42 +119,43 @@ class GenericEmbossReservedAnonymousField2View final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; - { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!high_bit().Ok()) return false; - if (!bar().Ok()) return false; - if (!first_bit().Ok()) return false; - if (!IntrinsicSizeInBits().Ok()) return false; - if (!MaxSizeInBits().Ok()) return false; - if (!MinSizeInBits().Ok()) return false; - } - } + if (!high_bit().Ok()) return false; + + if (!bar().Ok()) return false; + + if (!first_bit().Ok()) return false; + + if (!IntrinsicSizeInBits().Ok()) return false; + + if (!MaxSizeInBits().Ok()) return false; + + if (!MinSizeInBits().Ok()) return false; + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBits().Ok() && backing_.SizeInBits() >= static_cast( IntrinsicSizeInBits().UncheckedRead()); } - [[nodiscard]] static constexpr ::std::size_t SizeInBits() { + static constexpr ::std::size_t SizeInBits() { return static_cast(IntrinsicSizeInBits().Read()); } - [[nodiscard]] static constexpr bool SizeIsKnown() { + static constexpr bool SizeIsKnown() { return IntrinsicSizeInBits().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericEmbossReservedAnonymousField2View emboss_reserved_local_other) const { if (!has_high_bit().Known()) return false; @@ -209,7 +210,7 @@ class GenericEmbossReservedAnonymousField2View final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericEmbossReservedAnonymousField2View emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_high_bit().ValueOr(false) && @@ -270,7 +271,7 @@ class GenericEmbossReservedAnonymousField2View final { emboss_reserved_local_other.IntrinsicSizeInBits().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericEmbossReservedAnonymousField2View emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -441,32 +442,32 @@ class GenericEmbossReservedAnonymousField2View final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: - [[nodiscard]] typename ::emboss::prelude::FlagView< + typename ::emboss::prelude::FlagView< /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, typename Storage::template OffsetStorageType> high_bit() const; - [[nodiscard]] ::emboss::support::Maybe has_high_bit() const; + ::emboss::support::Maybe has_high_bit() const; public: - [[nodiscard]] typename ::emboss::support::EnumView< + typename ::emboss::support::EnumView< /**/ ::emboss::test::Foo::Bar, ::emboss::support::FixedSizeViewParameters<4, ::emboss::support::AllValuesAreOk>, typename Storage::template OffsetStorageType> bar() const; - [[nodiscard]] ::emboss::support::Maybe has_bar() const; + ::emboss::support::Maybe has_bar() const; public: - [[nodiscard]] typename ::emboss::prelude::FlagView< + typename ::emboss::prelude::FlagView< /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, typename Storage::template OffsetStorageType> first_bit() const; - [[nodiscard]] ::emboss::support::Maybe has_first_bit() const; + ::emboss::support::Maybe has_first_bit() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBitsView final { @@ -482,9 +483,9 @@ class GenericEmbossReservedAnonymousField2View final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBitsView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -493,13 +494,13 @@ class GenericEmbossReservedAnonymousField2View final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBitsView IntrinsicSizeInBits() { + static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBitsView IntrinsicSizeInBits() { return EmbossReservedDollarVirtualIntrinsicSizeInBitsView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBits() { + static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBits() { return ::emboss::support::Maybe(true); } @@ -517,9 +518,9 @@ class GenericEmbossReservedAnonymousField2View final { default; ~EmbossReservedDollarVirtualMaxSizeInBitsView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -528,13 +529,13 @@ class GenericEmbossReservedAnonymousField2View final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBitsView MaxSizeInBits() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBitsView MaxSizeInBits() { return EmbossReservedDollarVirtualMaxSizeInBitsView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBits() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBits() { return ::emboss::support::Maybe(true); } @@ -552,9 +553,9 @@ class GenericEmbossReservedAnonymousField2View final { default; ~EmbossReservedDollarVirtualMinSizeInBitsView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -563,13 +564,13 @@ class GenericEmbossReservedAnonymousField2View final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBitsView MinSizeInBits() { + static constexpr EmbossReservedDollarVirtualMinSizeInBitsView MinSizeInBits() { return EmbossReservedDollarVirtualMinSizeInBitsView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBits() { + static constexpr ::emboss::support::Maybe has_MinSizeInBits() { return ::emboss::support::Maybe(true); } @@ -600,7 +601,7 @@ struct EmbossReservedInternalIsGenericEmbossReservedAnonymousField2View< }; template -[[nodiscard]] inline GenericEmbossReservedAnonymousField2View< +inline GenericEmbossReservedAnonymousField2View< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -615,7 +616,7 @@ MakeEmbossReservedAnonymousField2View( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericEmbossReservedAnonymousField2View> +inline GenericEmbossReservedAnonymousField2View> MakeEmbossReservedAnonymousField2View( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericEmbossReservedAnonymousField2View>( @@ -624,7 +625,7 @@ MakeEmbossReservedAnonymousField2View( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericEmbossReservedAnonymousField2View< +inline GenericEmbossReservedAnonymousField2View< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedEmbossReservedAnonymousField2View( T *emboss_reserved_local_data, @@ -779,41 +780,41 @@ class GenericEmbossReservedAnonymousField1View final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; - { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!bit_23().Ok()) return false; - if (!low_bit().Ok()) return false; - if (!IntrinsicSizeInBits().Ok()) return false; - if (!MaxSizeInBits().Ok()) return false; - if (!MinSizeInBits().Ok()) return false; - } - } + if (!bit_23().Ok()) return false; + + if (!low_bit().Ok()) return false; + + if (!IntrinsicSizeInBits().Ok()) return false; + + if (!MaxSizeInBits().Ok()) return false; + + if (!MinSizeInBits().Ok()) return false; + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBits().Ok() && backing_.SizeInBits() >= static_cast( IntrinsicSizeInBits().UncheckedRead()); } - [[nodiscard]] static constexpr ::std::size_t SizeInBits() { + static constexpr ::std::size_t SizeInBits() { return static_cast(IntrinsicSizeInBits().Read()); } - [[nodiscard]] static constexpr bool SizeIsKnown() { + static constexpr bool SizeIsKnown() { return IntrinsicSizeInBits().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericEmbossReservedAnonymousField1View emboss_reserved_local_other) const { if (!has_bit_23().Known()) return false; @@ -851,7 +852,7 @@ class GenericEmbossReservedAnonymousField1View final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericEmbossReservedAnonymousField1View emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_bit_23().ValueOr(false) && @@ -898,7 +899,7 @@ class GenericEmbossReservedAnonymousField1View final { emboss_reserved_local_other.IntrinsicSizeInBits().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericEmbossReservedAnonymousField1View emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -1031,23 +1032,23 @@ class GenericEmbossReservedAnonymousField1View final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: - [[nodiscard]] typename ::emboss::prelude::FlagView< + typename ::emboss::prelude::FlagView< /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, typename Storage::template OffsetStorageType> bit_23() const; - [[nodiscard]] ::emboss::support::Maybe has_bit_23() const; + ::emboss::support::Maybe has_bit_23() const; public: - [[nodiscard]] typename ::emboss::prelude::FlagView< + typename ::emboss::prelude::FlagView< /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, typename Storage::template OffsetStorageType> low_bit() const; - [[nodiscard]] ::emboss::support::Maybe has_low_bit() const; + ::emboss::support::Maybe has_low_bit() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBitsView final { @@ -1063,9 +1064,9 @@ class GenericEmbossReservedAnonymousField1View final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBitsView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -1074,13 +1075,13 @@ class GenericEmbossReservedAnonymousField1View final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBitsView IntrinsicSizeInBits() { + static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBitsView IntrinsicSizeInBits() { return EmbossReservedDollarVirtualIntrinsicSizeInBitsView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBits() { + static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBits() { return ::emboss::support::Maybe(true); } @@ -1098,9 +1099,9 @@ class GenericEmbossReservedAnonymousField1View final { default; ~EmbossReservedDollarVirtualMaxSizeInBitsView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -1109,13 +1110,13 @@ class GenericEmbossReservedAnonymousField1View final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBitsView MaxSizeInBits() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBitsView MaxSizeInBits() { return EmbossReservedDollarVirtualMaxSizeInBitsView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBits() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBits() { return ::emboss::support::Maybe(true); } @@ -1133,9 +1134,9 @@ class GenericEmbossReservedAnonymousField1View final { default; ~EmbossReservedDollarVirtualMinSizeInBitsView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -1144,13 +1145,13 @@ class GenericEmbossReservedAnonymousField1View final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBitsView MinSizeInBits() { + static constexpr EmbossReservedDollarVirtualMinSizeInBitsView MinSizeInBits() { return EmbossReservedDollarVirtualMinSizeInBitsView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBits() { + static constexpr ::emboss::support::Maybe has_MinSizeInBits() { return ::emboss::support::Maybe(true); } @@ -1181,7 +1182,7 @@ struct EmbossReservedInternalIsGenericEmbossReservedAnonymousField1View< }; template -[[nodiscard]] inline GenericEmbossReservedAnonymousField1View< +inline GenericEmbossReservedAnonymousField1View< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -1196,7 +1197,7 @@ MakeEmbossReservedAnonymousField1View( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericEmbossReservedAnonymousField1View> +inline GenericEmbossReservedAnonymousField1View> MakeEmbossReservedAnonymousField1View( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericEmbossReservedAnonymousField1View>( @@ -1205,7 +1206,7 @@ MakeEmbossReservedAnonymousField1View( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericEmbossReservedAnonymousField1View< +inline GenericEmbossReservedAnonymousField1View< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedEmbossReservedAnonymousField1View( T *emboss_reserved_local_data, @@ -1266,53 +1267,61 @@ class GenericFooView final { using Bar = ::emboss::test::Foo::Bar; - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; const auto emboss_reserved_local_ok_subexpr_1 = ::emboss::support::And(::emboss::support::Maybe(true), ::emboss::support::Maybe(true)); + if (!emboss_reserved_anonymous_field_2().Ok()) return false; + + if (!emboss_reserved_anonymous_field_1().Ok()) return false; + + if (!IntrinsicSizeInBytes().Ok()) return false; + + if (!MaxSizeInBytes().Ok()) return false; + + if (!MinSizeInBytes().Ok()) return false; + { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!emboss_reserved_anonymous_field_2().Ok()) return false; - if (!emboss_reserved_anonymous_field_1().Ok()) return false; - if (!IntrinsicSizeInBytes().Ok()) return false; - if (!MaxSizeInBytes().Ok()) return false; - if (!MinSizeInBytes().Ok()) return false; - } - } - { + const auto emboss_reserved_cond = emboss_reserved_local_ok_subexpr_1; if (!emboss_reserved_cond.Known()) return false; if (emboss_reserved_cond.ValueOrDefault()) { if (!high_bit().Ok()) return false; + if (!bar().Ok()) return false; + if (!first_bit().Ok()) return false; + if (!bit_23().Ok()) return false; + if (!low_bit().Ok()) return false; + + } } + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { + static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - [[nodiscard]] static constexpr bool SizeIsKnown() { + static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericFooView emboss_reserved_local_other) const { if (!has_emboss_reserved_anonymous_field_2().Known()) return false; @@ -1350,7 +1359,7 @@ class GenericFooView final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericFooView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_emboss_reserved_anonymous_field_2().ValueOr(false) && @@ -1397,7 +1406,7 @@ class GenericFooView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericFooView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -1644,54 +1653,54 @@ class GenericFooView final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } private: - [[nodiscard]] typename ::emboss::test::Foo::GenericEmbossReservedAnonymousField2View>, 32>> + typename ::emboss::test::Foo::GenericEmbossReservedAnonymousField2View>, 32>> emboss_reserved_anonymous_field_2() const; - [[nodiscard]] ::emboss::support::Maybe has_emboss_reserved_anonymous_field_2() const; + ::emboss::support::Maybe has_emboss_reserved_anonymous_field_2() const; public: - [[nodiscard]] auto high_bit() const -> decltype(this->emboss_reserved_anonymous_field_2().high_bit()) { + auto high_bit() const -> decltype(this->emboss_reserved_anonymous_field_2().high_bit()) { return has_high_bit().ValueOrDefault() ? emboss_reserved_anonymous_field_2().high_bit() : decltype(this->emboss_reserved_anonymous_field_2().high_bit())(); } - [[nodiscard]] ::emboss::support::Maybe has_high_bit() const; + ::emboss::support::Maybe has_high_bit() const; public: - [[nodiscard]] auto bar() const -> decltype(this->emboss_reserved_anonymous_field_2().bar()) { + auto bar() const -> decltype(this->emboss_reserved_anonymous_field_2().bar()) { return has_bar().ValueOrDefault() ? emboss_reserved_anonymous_field_2().bar() : decltype(this->emboss_reserved_anonymous_field_2().bar())(); } - [[nodiscard]] ::emboss::support::Maybe has_bar() const; + ::emboss::support::Maybe has_bar() const; public: - [[nodiscard]] auto first_bit() const -> decltype(this->emboss_reserved_anonymous_field_2().first_bit()) { + auto first_bit() const -> decltype(this->emboss_reserved_anonymous_field_2().first_bit()) { return has_first_bit().ValueOrDefault() ? emboss_reserved_anonymous_field_2().first_bit() : decltype(this->emboss_reserved_anonymous_field_2().first_bit())(); } - [[nodiscard]] ::emboss::support::Maybe has_first_bit() const; + ::emboss::support::Maybe has_first_bit() const; private: - [[nodiscard]] typename ::emboss::test::Foo::GenericEmbossReservedAnonymousField1View>, 32>> + typename ::emboss::test::Foo::GenericEmbossReservedAnonymousField1View>, 32>> emboss_reserved_anonymous_field_1() const; - [[nodiscard]] ::emboss::support::Maybe has_emboss_reserved_anonymous_field_1() const; + ::emboss::support::Maybe has_emboss_reserved_anonymous_field_1() const; public: - [[nodiscard]] auto bit_23() const -> decltype(this->emboss_reserved_anonymous_field_1().bit_23()) { + auto bit_23() const -> decltype(this->emboss_reserved_anonymous_field_1().bit_23()) { return has_bit_23().ValueOrDefault() ? emboss_reserved_anonymous_field_1().bit_23() : decltype(this->emboss_reserved_anonymous_field_1().bit_23())(); } - [[nodiscard]] ::emboss::support::Maybe has_bit_23() const; + ::emboss::support::Maybe has_bit_23() const; public: - [[nodiscard]] auto low_bit() const -> decltype(this->emboss_reserved_anonymous_field_1().low_bit()) { + auto low_bit() const -> decltype(this->emboss_reserved_anonymous_field_1().low_bit()) { return has_low_bit().ValueOrDefault() ? emboss_reserved_anonymous_field_1().low_bit() : decltype(this->emboss_reserved_anonymous_field_1().low_bit())(); } - [[nodiscard]] ::emboss::support::Maybe has_low_bit() const; + ::emboss::support::Maybe has_low_bit() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -1707,9 +1716,9 @@ class GenericFooView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -1718,13 +1727,13 @@ class GenericFooView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -1742,9 +1751,9 @@ class GenericFooView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -1753,13 +1762,13 @@ class GenericFooView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -1777,9 +1786,9 @@ class GenericFooView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -1788,13 +1797,13 @@ class GenericFooView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -1825,7 +1834,7 @@ struct EmbossReservedInternalIsGenericFooView< }; template -[[nodiscard]] inline GenericFooView< +inline GenericFooView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -1840,7 +1849,7 @@ MakeFooView( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericFooView> +inline GenericFooView> MakeFooView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericFooView>( @@ -1849,7 +1858,7 @@ MakeFooView( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericFooView< +inline GenericFooView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedFooView( T *emboss_reserved_local_data, diff --git a/testdata/golden_cpp/auto_array_size.emb.h b/testdata/golden_cpp/auto_array_size.emb.h index e4b01f4..886e7c2 100644 --- a/testdata/golden_cpp/auto_array_size.emb.h +++ b/testdata/golden_cpp/auto_array_size.emb.h @@ -96,41 +96,41 @@ class GenericElementView final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; - { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!a().Ok()) return false; - if (!b().Ok()) return false; - if (!IntrinsicSizeInBytes().Ok()) return false; - if (!MaxSizeInBytes().Ok()) return false; - if (!MinSizeInBytes().Ok()) return false; - } - } + if (!a().Ok()) return false; + + if (!b().Ok()) return false; + + if (!IntrinsicSizeInBytes().Ok()) return false; + + if (!MaxSizeInBytes().Ok()) return false; + + if (!MinSizeInBytes().Ok()) return false; + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { + static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - [[nodiscard]] static constexpr bool SizeIsKnown() { + static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericElementView emboss_reserved_local_other) const { if (!has_a().Known()) return false; @@ -168,7 +168,7 @@ class GenericElementView final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericElementView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_a().ValueOr(false) && @@ -215,7 +215,7 @@ class GenericElementView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericElementView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -348,23 +348,23 @@ class GenericElementView final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> a() const; - [[nodiscard]] ::emboss::support::Maybe has_a() const; + ::emboss::support::Maybe has_a() const; public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> b() const; - [[nodiscard]] ::emboss::support::Maybe has_b() const; + ::emboss::support::Maybe has_b() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -380,9 +380,9 @@ class GenericElementView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -391,13 +391,13 @@ class GenericElementView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -415,9 +415,9 @@ class GenericElementView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -426,13 +426,13 @@ class GenericElementView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -450,9 +450,9 @@ class GenericElementView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -461,13 +461,13 @@ class GenericElementView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -498,7 +498,7 @@ struct EmbossReservedInternalIsGenericElementView< }; template -[[nodiscard]] inline GenericElementView< +inline GenericElementView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -513,7 +513,7 @@ MakeElementView( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericElementView> +inline GenericElementView> MakeElementView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericElementView>( @@ -522,7 +522,7 @@ MakeElementView( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericElementView< +inline GenericElementView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedElementView( T *emboss_reserved_local_data, @@ -591,43 +591,46 @@ class GenericAutoSizeView final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; - { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!array_size().Ok()) return false; - if (!four_byte_array().Ok()) return false; - if (!four_struct_array().Ok()) return false; - if (!dynamic_byte_array().Ok()) return false; - if (!dynamic_struct_array().Ok()) return false; - if (!IntrinsicSizeInBytes().Ok()) return false; - if (!MaxSizeInBytes().Ok()) return false; - if (!MinSizeInBytes().Ok()) return false; - } - } + if (!array_size().Ok()) return false; + + if (!four_byte_array().Ok()) return false; + + if (!four_struct_array().Ok()) return false; + + if (!dynamic_byte_array().Ok()) return false; + + if (!dynamic_struct_array().Ok()) return false; + + if (!IntrinsicSizeInBytes().Ok()) return false; + + if (!MaxSizeInBytes().Ok()) return false; + + if (!MinSizeInBytes().Ok()) return false; + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - [[nodiscard]] ::std::size_t SizeInBytes() const { + ::std::size_t SizeInBytes() const { return static_cast(IntrinsicSizeInBytes().Read()); } - [[nodiscard]] bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericAutoSizeView emboss_reserved_local_other) const { if (!has_array_size().Known()) return false; @@ -716,7 +719,7 @@ class GenericAutoSizeView final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericAutoSizeView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_array_size().ValueOr(false) && @@ -805,7 +808,7 @@ class GenericAutoSizeView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericAutoSizeView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -1052,18 +1055,18 @@ class GenericAutoSizeView final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> array_size() const; - [[nodiscard]] ::emboss::support::Maybe has_array_size() const; + ::emboss::support::Maybe has_array_size() const; public: - [[nodiscard]] typename ::emboss::support::GenericArrayView< + typename ::emboss::support::GenericArrayView< typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock::template OffsetStorageType>, 8>> @@ -1072,20 +1075,20 @@ class GenericAutoSizeView final { 8 > four_byte_array() const; - [[nodiscard]] ::emboss::support::Maybe has_four_byte_array() const; + ::emboss::support::Maybe has_four_byte_array() const; public: - [[nodiscard]] typename ::emboss::support::GenericArrayView< + typename ::emboss::support::GenericArrayView< typename ::emboss::test::GenericElementView::template OffsetStorageType> , typename Storage::template OffsetStorageType, 2, 8 > four_struct_array() const; - [[nodiscard]] ::emboss::support::Maybe has_four_struct_array() const; + ::emboss::support::Maybe has_four_struct_array() const; public: - [[nodiscard]] typename ::emboss::support::GenericArrayView< + typename ::emboss::support::GenericArrayView< typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock::template OffsetStorageType>, 8>> @@ -1094,17 +1097,17 @@ class GenericAutoSizeView final { 8 > dynamic_byte_array() const; - [[nodiscard]] ::emboss::support::Maybe has_dynamic_byte_array() const; + ::emboss::support::Maybe has_dynamic_byte_array() const; public: - [[nodiscard]] typename ::emboss::support::GenericArrayView< + typename ::emboss::support::GenericArrayView< typename ::emboss::test::GenericElementView::template OffsetStorageType> , typename Storage::template OffsetStorageType, 2, 8 > dynamic_struct_array() const; - [[nodiscard]] ::emboss::support::Maybe has_dynamic_struct_array() const; + ::emboss::support::Maybe has_dynamic_struct_array() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -1123,17 +1126,17 @@ class GenericAutoSizeView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - [[nodiscard]] ::std::int32_t Read() const { + ::std::int32_t Read() const { EMBOSS_CHECK(view_.has_IntrinsicSizeInBytes().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - [[nodiscard]] ::std::int32_t UncheckedRead() const { + ::std::int32_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - [[nodiscard]] bool Ok() const { + bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -1146,12 +1149,12 @@ class GenericAutoSizeView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } private: - [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { + ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.array_size(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Sum(::emboss::support::Maybe(static_cast(13LL)), emboss_reserved_local_subexpr_2); @@ -1164,7 +1167,7 @@ class GenericAutoSizeView final { return emboss_reserved_local_subexpr_8; } - [[nodiscard]] static constexpr bool ValueIsOk( + static constexpr bool ValueIsOk( ::std::int32_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -1172,8 +1175,8 @@ class GenericAutoSizeView final { const GenericAutoSizeView view_; }; - [[nodiscard]] EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; - [[nodiscard]] ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; + EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; public: class EmbossReservedDollarVirtualMaxSizeInBytesView final { @@ -1189,9 +1192,9 @@ class GenericAutoSizeView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -1200,13 +1203,13 @@ class GenericAutoSizeView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -1224,9 +1227,9 @@ class GenericAutoSizeView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -1235,13 +1238,13 @@ class GenericAutoSizeView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -1272,7 +1275,7 @@ struct EmbossReservedInternalIsGenericAutoSizeView< }; template -[[nodiscard]] inline GenericAutoSizeView< +inline GenericAutoSizeView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -1287,7 +1290,7 @@ MakeAutoSizeView( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericAutoSizeView> +inline GenericAutoSizeView> MakeAutoSizeView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericAutoSizeView>( @@ -1296,7 +1299,7 @@ MakeAutoSizeView( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericAutoSizeView< +inline GenericAutoSizeView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedAutoSizeView( T *emboss_reserved_local_data, diff --git a/testdata/golden_cpp/bcd.emb.h b/testdata/golden_cpp/bcd.emb.h index a92c0b0..18fd463 100644 --- a/testdata/golden_cpp/bcd.emb.h +++ b/testdata/golden_cpp/bcd.emb.h @@ -122,43 +122,45 @@ class GenericEmbossReservedAnonymousField1View final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; - { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!four_bit().Ok()) return false; - if (!six_bit().Ok()) return false; - if (!ten_bit().Ok()) return false; - if (!twelve_bit().Ok()) return false; - if (!IntrinsicSizeInBits().Ok()) return false; - if (!MaxSizeInBits().Ok()) return false; - if (!MinSizeInBits().Ok()) return false; - } - } + if (!four_bit().Ok()) return false; + + if (!six_bit().Ok()) return false; + + if (!ten_bit().Ok()) return false; + + if (!twelve_bit().Ok()) return false; + + if (!IntrinsicSizeInBits().Ok()) return false; + + if (!MaxSizeInBits().Ok()) return false; + + if (!MinSizeInBits().Ok()) return false; + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBits().Ok() && backing_.SizeInBits() >= static_cast( IntrinsicSizeInBits().UncheckedRead()); } - [[nodiscard]] static constexpr ::std::size_t SizeInBits() { + static constexpr ::std::size_t SizeInBits() { return static_cast(IntrinsicSizeInBits().Read()); } - [[nodiscard]] static constexpr bool SizeIsKnown() { + static constexpr bool SizeIsKnown() { return IntrinsicSizeInBits().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericEmbossReservedAnonymousField1View emboss_reserved_local_other) const { if (!has_four_bit().Known()) return false; @@ -230,7 +232,7 @@ class GenericEmbossReservedAnonymousField1View final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericEmbossReservedAnonymousField1View emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_four_bit().ValueOr(false) && @@ -305,7 +307,7 @@ class GenericEmbossReservedAnonymousField1View final { emboss_reserved_local_other.IntrinsicSizeInBits().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericEmbossReservedAnonymousField1View emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -514,39 +516,39 @@ class GenericEmbossReservedAnonymousField1View final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: - [[nodiscard]] typename ::emboss::prelude::BcdView< + typename ::emboss::prelude::BcdView< /**/ ::emboss::support::FixedSizeViewParameters<4, ::emboss::support::AllValuesAreOk>, typename Storage::template OffsetStorageType> four_bit() const; - [[nodiscard]] ::emboss::support::Maybe has_four_bit() const; + ::emboss::support::Maybe has_four_bit() const; public: - [[nodiscard]] typename ::emboss::prelude::BcdView< + typename ::emboss::prelude::BcdView< /**/ ::emboss::support::FixedSizeViewParameters<6, ::emboss::support::AllValuesAreOk>, typename Storage::template OffsetStorageType> six_bit() const; - [[nodiscard]] ::emboss::support::Maybe has_six_bit() const; + ::emboss::support::Maybe has_six_bit() const; public: - [[nodiscard]] typename ::emboss::prelude::BcdView< + typename ::emboss::prelude::BcdView< /**/ ::emboss::support::FixedSizeViewParameters<10, ::emboss::support::AllValuesAreOk>, typename Storage::template OffsetStorageType> ten_bit() const; - [[nodiscard]] ::emboss::support::Maybe has_ten_bit() const; + ::emboss::support::Maybe has_ten_bit() const; public: - [[nodiscard]] typename ::emboss::prelude::BcdView< + typename ::emboss::prelude::BcdView< /**/ ::emboss::support::FixedSizeViewParameters<12, ::emboss::support::AllValuesAreOk>, typename Storage::template OffsetStorageType> twelve_bit() const; - [[nodiscard]] ::emboss::support::Maybe has_twelve_bit() const; + ::emboss::support::Maybe has_twelve_bit() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBitsView final { @@ -562,9 +564,9 @@ class GenericEmbossReservedAnonymousField1View final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBitsView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -573,13 +575,13 @@ class GenericEmbossReservedAnonymousField1View final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBitsView IntrinsicSizeInBits() { + static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBitsView IntrinsicSizeInBits() { return EmbossReservedDollarVirtualIntrinsicSizeInBitsView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBits() { + static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBits() { return ::emboss::support::Maybe(true); } @@ -597,9 +599,9 @@ class GenericEmbossReservedAnonymousField1View final { default; ~EmbossReservedDollarVirtualMaxSizeInBitsView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -608,13 +610,13 @@ class GenericEmbossReservedAnonymousField1View final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBitsView MaxSizeInBits() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBitsView MaxSizeInBits() { return EmbossReservedDollarVirtualMaxSizeInBitsView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBits() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBits() { return ::emboss::support::Maybe(true); } @@ -632,9 +634,9 @@ class GenericEmbossReservedAnonymousField1View final { default; ~EmbossReservedDollarVirtualMinSizeInBitsView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -643,13 +645,13 @@ class GenericEmbossReservedAnonymousField1View final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBitsView MinSizeInBits() { + static constexpr EmbossReservedDollarVirtualMinSizeInBitsView MinSizeInBits() { return EmbossReservedDollarVirtualMinSizeInBitsView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBits() { + static constexpr ::emboss::support::Maybe has_MinSizeInBits() { return ::emboss::support::Maybe(true); } @@ -680,7 +682,7 @@ struct EmbossReservedInternalIsGenericEmbossReservedAnonymousField1View< }; template -[[nodiscard]] inline GenericEmbossReservedAnonymousField1View< +inline GenericEmbossReservedAnonymousField1View< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -695,7 +697,7 @@ MakeEmbossReservedAnonymousField1View( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericEmbossReservedAnonymousField1View> +inline GenericEmbossReservedAnonymousField1View> MakeEmbossReservedAnonymousField1View( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericEmbossReservedAnonymousField1View>( @@ -704,7 +706,7 @@ MakeEmbossReservedAnonymousField1View( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericEmbossReservedAnonymousField1View< +inline GenericEmbossReservedAnonymousField1View< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedEmbossReservedAnonymousField1View( T *emboss_reserved_local_data, @@ -765,59 +767,73 @@ class GenericBcdSizesView final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; const auto emboss_reserved_local_ok_subexpr_1 = ::emboss::support::And(::emboss::support::Maybe(true), ::emboss::support::Maybe(true)); + if (!one_byte().Ok()) return false; + + if (!two_byte().Ok()) return false; + + if (!three_byte().Ok()) return false; + + if (!four_byte().Ok()) return false; + + if (!five_byte().Ok()) return false; + + if (!six_byte().Ok()) return false; + + if (!seven_byte().Ok()) return false; + + if (!eight_byte().Ok()) return false; + + if (!emboss_reserved_anonymous_field_1().Ok()) return false; + + if (!IntrinsicSizeInBytes().Ok()) return false; + + if (!MaxSizeInBytes().Ok()) return false; + + if (!MinSizeInBytes().Ok()) return false; + { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!one_byte().Ok()) return false; - if (!two_byte().Ok()) return false; - if (!three_byte().Ok()) return false; - if (!four_byte().Ok()) return false; - if (!five_byte().Ok()) return false; - if (!six_byte().Ok()) return false; - if (!seven_byte().Ok()) return false; - if (!eight_byte().Ok()) return false; - if (!emboss_reserved_anonymous_field_1().Ok()) return false; - if (!IntrinsicSizeInBytes().Ok()) return false; - if (!MaxSizeInBytes().Ok()) return false; - if (!MinSizeInBytes().Ok()) return false; - } - } - { + const auto emboss_reserved_cond = emboss_reserved_local_ok_subexpr_1; if (!emboss_reserved_cond.Known()) return false; if (emboss_reserved_cond.ValueOrDefault()) { if (!four_bit().Ok()) return false; + if (!six_bit().Ok()) return false; + if (!ten_bit().Ok()) return false; + if (!twelve_bit().Ok()) return false; + + } } + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { + static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - [[nodiscard]] static constexpr bool SizeIsKnown() { + static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericBcdSizesView emboss_reserved_local_other) const { if (!has_one_byte().Known()) return false; @@ -974,7 +990,7 @@ class GenericBcdSizesView final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericBcdSizesView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_one_byte().ValueOr(false) && @@ -1119,7 +1135,7 @@ class GenericBcdSizesView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericBcdSizesView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -1632,105 +1648,105 @@ class GenericBcdSizesView final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: - [[nodiscard]] typename ::emboss::prelude::BcdView< + typename ::emboss::prelude::BcdView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> one_byte() const; - [[nodiscard]] ::emboss::support::Maybe has_one_byte() const; + ::emboss::support::Maybe has_one_byte() const; public: - [[nodiscard]] typename ::emboss::prelude::BcdView< + typename ::emboss::prelude::BcdView< /**/ ::emboss::support::FixedSizeViewParameters<16, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 16>> two_byte() const; - [[nodiscard]] ::emboss::support::Maybe has_two_byte() const; + ::emboss::support::Maybe has_two_byte() const; public: - [[nodiscard]] typename ::emboss::prelude::BcdView< + typename ::emboss::prelude::BcdView< /**/ ::emboss::support::FixedSizeViewParameters<24, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 24>> three_byte() const; - [[nodiscard]] ::emboss::support::Maybe has_three_byte() const; + ::emboss::support::Maybe has_three_byte() const; public: - [[nodiscard]] typename ::emboss::prelude::BcdView< + typename ::emboss::prelude::BcdView< /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 32>> four_byte() const; - [[nodiscard]] ::emboss::support::Maybe has_four_byte() const; + ::emboss::support::Maybe has_four_byte() const; public: - [[nodiscard]] typename ::emboss::prelude::BcdView< + typename ::emboss::prelude::BcdView< /**/ ::emboss::support::FixedSizeViewParameters<40, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 40>> five_byte() const; - [[nodiscard]] ::emboss::support::Maybe has_five_byte() const; + ::emboss::support::Maybe has_five_byte() const; public: - [[nodiscard]] typename ::emboss::prelude::BcdView< + typename ::emboss::prelude::BcdView< /**/ ::emboss::support::FixedSizeViewParameters<48, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 48>> six_byte() const; - [[nodiscard]] ::emboss::support::Maybe has_six_byte() const; + ::emboss::support::Maybe has_six_byte() const; public: - [[nodiscard]] typename ::emboss::prelude::BcdView< + typename ::emboss::prelude::BcdView< /**/ ::emboss::support::FixedSizeViewParameters<56, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 56>> seven_byte() const; - [[nodiscard]] ::emboss::support::Maybe has_seven_byte() const; + ::emboss::support::Maybe has_seven_byte() const; public: - [[nodiscard]] typename ::emboss::prelude::BcdView< + typename ::emboss::prelude::BcdView< /**/ ::emboss::support::FixedSizeViewParameters<64, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 64>> eight_byte() const; - [[nodiscard]] ::emboss::support::Maybe has_eight_byte() const; + ::emboss::support::Maybe has_eight_byte() const; private: - [[nodiscard]] typename ::emboss::test::BcdSizes::GenericEmbossReservedAnonymousField1View>, 32>> + typename ::emboss::test::BcdSizes::GenericEmbossReservedAnonymousField1View>, 32>> emboss_reserved_anonymous_field_1() const; - [[nodiscard]] ::emboss::support::Maybe has_emboss_reserved_anonymous_field_1() const; + ::emboss::support::Maybe has_emboss_reserved_anonymous_field_1() const; public: - [[nodiscard]] auto four_bit() const -> decltype(this->emboss_reserved_anonymous_field_1().four_bit()) { + auto four_bit() const -> decltype(this->emboss_reserved_anonymous_field_1().four_bit()) { return has_four_bit().ValueOrDefault() ? emboss_reserved_anonymous_field_1().four_bit() : decltype(this->emboss_reserved_anonymous_field_1().four_bit())(); } - [[nodiscard]] ::emboss::support::Maybe has_four_bit() const; + ::emboss::support::Maybe has_four_bit() const; public: - [[nodiscard]] auto six_bit() const -> decltype(this->emboss_reserved_anonymous_field_1().six_bit()) { + auto six_bit() const -> decltype(this->emboss_reserved_anonymous_field_1().six_bit()) { return has_six_bit().ValueOrDefault() ? emboss_reserved_anonymous_field_1().six_bit() : decltype(this->emboss_reserved_anonymous_field_1().six_bit())(); } - [[nodiscard]] ::emboss::support::Maybe has_six_bit() const; + ::emboss::support::Maybe has_six_bit() const; public: - [[nodiscard]] auto ten_bit() const -> decltype(this->emboss_reserved_anonymous_field_1().ten_bit()) { + auto ten_bit() const -> decltype(this->emboss_reserved_anonymous_field_1().ten_bit()) { return has_ten_bit().ValueOrDefault() ? emboss_reserved_anonymous_field_1().ten_bit() : decltype(this->emboss_reserved_anonymous_field_1().ten_bit())(); } - [[nodiscard]] ::emboss::support::Maybe has_ten_bit() const; + ::emboss::support::Maybe has_ten_bit() const; public: - [[nodiscard]] auto twelve_bit() const -> decltype(this->emboss_reserved_anonymous_field_1().twelve_bit()) { + auto twelve_bit() const -> decltype(this->emboss_reserved_anonymous_field_1().twelve_bit()) { return has_twelve_bit().ValueOrDefault() ? emboss_reserved_anonymous_field_1().twelve_bit() : decltype(this->emboss_reserved_anonymous_field_1().twelve_bit())(); } - [[nodiscard]] ::emboss::support::Maybe has_twelve_bit() const; + ::emboss::support::Maybe has_twelve_bit() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -1746,9 +1762,9 @@ class GenericBcdSizesView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -1757,13 +1773,13 @@ class GenericBcdSizesView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -1781,9 +1797,9 @@ class GenericBcdSizesView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -1792,13 +1808,13 @@ class GenericBcdSizesView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -1816,9 +1832,9 @@ class GenericBcdSizesView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -1827,13 +1843,13 @@ class GenericBcdSizesView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -1864,7 +1880,7 @@ struct EmbossReservedInternalIsGenericBcdSizesView< }; template -[[nodiscard]] inline GenericBcdSizesView< +inline GenericBcdSizesView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -1879,7 +1895,7 @@ MakeBcdSizesView( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericBcdSizesView> +inline GenericBcdSizesView> MakeBcdSizesView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericBcdSizesView>( @@ -1888,7 +1904,7 @@ MakeBcdSizesView( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericBcdSizesView< +inline GenericBcdSizesView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedBcdSizesView( T *emboss_reserved_local_data, @@ -1953,40 +1969,39 @@ class GenericBcdBigEndianView final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; - { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!four_byte().Ok()) return false; - if (!IntrinsicSizeInBytes().Ok()) return false; - if (!MaxSizeInBytes().Ok()) return false; - if (!MinSizeInBytes().Ok()) return false; - } - } + if (!four_byte().Ok()) return false; + + if (!IntrinsicSizeInBytes().Ok()) return false; + + if (!MaxSizeInBytes().Ok()) return false; + + if (!MinSizeInBytes().Ok()) return false; + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { + static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - [[nodiscard]] static constexpr bool SizeIsKnown() { + static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericBcdBigEndianView emboss_reserved_local_other) const { if (!has_four_byte().Known()) return false; @@ -2007,7 +2022,7 @@ class GenericBcdBigEndianView final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericBcdBigEndianView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_four_byte().ValueOr(false) && @@ -2040,7 +2055,7 @@ class GenericBcdBigEndianView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericBcdBigEndianView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -2135,15 +2150,15 @@ class GenericBcdBigEndianView final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: - [[nodiscard]] typename ::emboss::prelude::BcdView< + typename ::emboss::prelude::BcdView< /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 32>> four_byte() const; - [[nodiscard]] ::emboss::support::Maybe has_four_byte() const; + ::emboss::support::Maybe has_four_byte() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -2159,9 +2174,9 @@ class GenericBcdBigEndianView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -2170,13 +2185,13 @@ class GenericBcdBigEndianView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -2194,9 +2209,9 @@ class GenericBcdBigEndianView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -2205,13 +2220,13 @@ class GenericBcdBigEndianView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -2229,9 +2244,9 @@ class GenericBcdBigEndianView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -2240,13 +2255,13 @@ class GenericBcdBigEndianView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -2277,7 +2292,7 @@ struct EmbossReservedInternalIsGenericBcdBigEndianView< }; template -[[nodiscard]] inline GenericBcdBigEndianView< +inline GenericBcdBigEndianView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -2292,7 +2307,7 @@ MakeBcdBigEndianView( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericBcdBigEndianView> +inline GenericBcdBigEndianView> MakeBcdBigEndianView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericBcdBigEndianView>( @@ -2301,7 +2316,7 @@ MakeBcdBigEndianView( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericBcdBigEndianView< +inline GenericBcdBigEndianView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedBcdBigEndianView( T *emboss_reserved_local_data, diff --git a/testdata/golden_cpp/bits.emb.h b/testdata/golden_cpp/bits.emb.h index 1045e59..c7f68a9 100644 --- a/testdata/golden_cpp/bits.emb.h +++ b/testdata/golden_cpp/bits.emb.h @@ -139,44 +139,47 @@ class GenericOneByteView final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; - { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!high_bit().Ok()) return false; - if (!less_high_bit().Ok()) return false; - if (!mid_nibble().Ok()) return false; - if (!less_low_bit().Ok()) return false; - if (!low_bit().Ok()) return false; - if (!IntrinsicSizeInBits().Ok()) return false; - if (!MaxSizeInBits().Ok()) return false; - if (!MinSizeInBits().Ok()) return false; - } - } + if (!high_bit().Ok()) return false; + + if (!less_high_bit().Ok()) return false; + + if (!mid_nibble().Ok()) return false; + + if (!less_low_bit().Ok()) return false; + + if (!low_bit().Ok()) return false; + + if (!IntrinsicSizeInBits().Ok()) return false; + + if (!MaxSizeInBits().Ok()) return false; + + if (!MinSizeInBits().Ok()) return false; + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBits().Ok() && backing_.SizeInBits() >= static_cast( IntrinsicSizeInBits().UncheckedRead()); } - [[nodiscard]] static constexpr ::std::size_t SizeInBits() { + static constexpr ::std::size_t SizeInBits() { return static_cast(IntrinsicSizeInBits().Read()); } - [[nodiscard]] static constexpr bool SizeIsKnown() { + static constexpr bool SizeIsKnown() { return IntrinsicSizeInBits().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericOneByteView emboss_reserved_local_other) const { if (!has_high_bit().Known()) return false; @@ -265,7 +268,7 @@ class GenericOneByteView final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericOneByteView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_high_bit().ValueOr(false) && @@ -354,7 +357,7 @@ class GenericOneByteView final { emboss_reserved_local_other.IntrinsicSizeInBits().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericOneByteView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -601,47 +604,47 @@ class GenericOneByteView final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: - [[nodiscard]] typename ::emboss::prelude::FlagView< + typename ::emboss::prelude::FlagView< /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, typename Storage::template OffsetStorageType> high_bit() const; - [[nodiscard]] ::emboss::support::Maybe has_high_bit() const; + ::emboss::support::Maybe has_high_bit() const; public: - [[nodiscard]] typename ::emboss::prelude::FlagView< + typename ::emboss::prelude::FlagView< /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, typename Storage::template OffsetStorageType> less_high_bit() const; - [[nodiscard]] ::emboss::support::Maybe has_less_high_bit() const; + ::emboss::support::Maybe has_less_high_bit() const; public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<4, ::emboss::support::AllValuesAreOk>, typename Storage::template OffsetStorageType> mid_nibble() const; - [[nodiscard]] ::emboss::support::Maybe has_mid_nibble() const; + ::emboss::support::Maybe has_mid_nibble() const; public: - [[nodiscard]] typename ::emboss::prelude::FlagView< + typename ::emboss::prelude::FlagView< /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, typename Storage::template OffsetStorageType> less_low_bit() const; - [[nodiscard]] ::emboss::support::Maybe has_less_low_bit() const; + ::emboss::support::Maybe has_less_low_bit() const; public: - [[nodiscard]] typename ::emboss::prelude::FlagView< + typename ::emboss::prelude::FlagView< /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, typename Storage::template OffsetStorageType> low_bit() const; - [[nodiscard]] ::emboss::support::Maybe has_low_bit() const; + ::emboss::support::Maybe has_low_bit() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBitsView final { @@ -657,9 +660,9 @@ class GenericOneByteView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBitsView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -668,13 +671,13 @@ class GenericOneByteView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBitsView IntrinsicSizeInBits() { + static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBitsView IntrinsicSizeInBits() { return EmbossReservedDollarVirtualIntrinsicSizeInBitsView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBits() { + static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBits() { return ::emboss::support::Maybe(true); } @@ -692,9 +695,9 @@ class GenericOneByteView final { default; ~EmbossReservedDollarVirtualMaxSizeInBitsView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -703,13 +706,13 @@ class GenericOneByteView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBitsView MaxSizeInBits() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBitsView MaxSizeInBits() { return EmbossReservedDollarVirtualMaxSizeInBitsView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBits() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBits() { return ::emboss::support::Maybe(true); } @@ -727,9 +730,9 @@ class GenericOneByteView final { default; ~EmbossReservedDollarVirtualMinSizeInBitsView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -738,13 +741,13 @@ class GenericOneByteView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBitsView MinSizeInBits() { + static constexpr EmbossReservedDollarVirtualMinSizeInBitsView MinSizeInBits() { return EmbossReservedDollarVirtualMinSizeInBitsView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBits() { + static constexpr ::emboss::support::Maybe has_MinSizeInBits() { return ::emboss::support::Maybe(true); } @@ -775,7 +778,7 @@ struct EmbossReservedInternalIsGenericOneByteView< }; template -[[nodiscard]] inline GenericOneByteView< +inline GenericOneByteView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -790,7 +793,7 @@ MakeOneByteView( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericOneByteView> +inline GenericOneByteView> MakeOneByteView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericOneByteView>( @@ -799,7 +802,7 @@ MakeOneByteView( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericOneByteView< +inline GenericOneByteView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedOneByteView( T *emboss_reserved_local_data, @@ -887,42 +890,43 @@ class GenericTwoByteWithGapsView final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; - { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!high_bit().Ok()) return false; - if (!mid_nibble().Ok()) return false; - if (!low_bit().Ok()) return false; - if (!IntrinsicSizeInBits().Ok()) return false; - if (!MaxSizeInBits().Ok()) return false; - if (!MinSizeInBits().Ok()) return false; - } - } + if (!high_bit().Ok()) return false; + + if (!mid_nibble().Ok()) return false; + + if (!low_bit().Ok()) return false; + + if (!IntrinsicSizeInBits().Ok()) return false; + + if (!MaxSizeInBits().Ok()) return false; + + if (!MinSizeInBits().Ok()) return false; + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBits().Ok() && backing_.SizeInBits() >= static_cast( IntrinsicSizeInBits().UncheckedRead()); } - [[nodiscard]] static constexpr ::std::size_t SizeInBits() { + static constexpr ::std::size_t SizeInBits() { return static_cast(IntrinsicSizeInBits().Read()); } - [[nodiscard]] static constexpr bool SizeIsKnown() { + static constexpr bool SizeIsKnown() { return IntrinsicSizeInBits().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericTwoByteWithGapsView emboss_reserved_local_other) const { if (!has_high_bit().Known()) return false; @@ -977,7 +981,7 @@ class GenericTwoByteWithGapsView final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericTwoByteWithGapsView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_high_bit().ValueOr(false) && @@ -1038,7 +1042,7 @@ class GenericTwoByteWithGapsView final { emboss_reserved_local_other.IntrinsicSizeInBits().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericTwoByteWithGapsView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -1209,31 +1213,31 @@ class GenericTwoByteWithGapsView final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: - [[nodiscard]] typename ::emboss::prelude::FlagView< + typename ::emboss::prelude::FlagView< /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, typename Storage::template OffsetStorageType> high_bit() const; - [[nodiscard]] ::emboss::support::Maybe has_high_bit() const; + ::emboss::support::Maybe has_high_bit() const; public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<4, ::emboss::support::AllValuesAreOk>, typename Storage::template OffsetStorageType> mid_nibble() const; - [[nodiscard]] ::emboss::support::Maybe has_mid_nibble() const; + ::emboss::support::Maybe has_mid_nibble() const; public: - [[nodiscard]] typename ::emboss::prelude::FlagView< + typename ::emboss::prelude::FlagView< /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, typename Storage::template OffsetStorageType> low_bit() const; - [[nodiscard]] ::emboss::support::Maybe has_low_bit() const; + ::emboss::support::Maybe has_low_bit() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBitsView final { @@ -1249,9 +1253,9 @@ class GenericTwoByteWithGapsView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBitsView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -1260,13 +1264,13 @@ class GenericTwoByteWithGapsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBitsView IntrinsicSizeInBits() { + static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBitsView IntrinsicSizeInBits() { return EmbossReservedDollarVirtualIntrinsicSizeInBitsView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBits() { + static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBits() { return ::emboss::support::Maybe(true); } @@ -1284,9 +1288,9 @@ class GenericTwoByteWithGapsView final { default; ~EmbossReservedDollarVirtualMaxSizeInBitsView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -1295,13 +1299,13 @@ class GenericTwoByteWithGapsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBitsView MaxSizeInBits() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBitsView MaxSizeInBits() { return EmbossReservedDollarVirtualMaxSizeInBitsView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBits() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBits() { return ::emboss::support::Maybe(true); } @@ -1319,9 +1323,9 @@ class GenericTwoByteWithGapsView final { default; ~EmbossReservedDollarVirtualMinSizeInBitsView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -1330,13 +1334,13 @@ class GenericTwoByteWithGapsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBitsView MinSizeInBits() { + static constexpr EmbossReservedDollarVirtualMinSizeInBitsView MinSizeInBits() { return EmbossReservedDollarVirtualMinSizeInBitsView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBits() { + static constexpr ::emboss::support::Maybe has_MinSizeInBits() { return ::emboss::support::Maybe(true); } @@ -1367,7 +1371,7 @@ struct EmbossReservedInternalIsGenericTwoByteWithGapsView< }; template -[[nodiscard]] inline GenericTwoByteWithGapsView< +inline GenericTwoByteWithGapsView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -1382,7 +1386,7 @@ MakeTwoByteWithGapsView( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericTwoByteWithGapsView> +inline GenericTwoByteWithGapsView> MakeTwoByteWithGapsView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericTwoByteWithGapsView>( @@ -1391,7 +1395,7 @@ MakeTwoByteWithGapsView( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericTwoByteWithGapsView< +inline GenericTwoByteWithGapsView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedTwoByteWithGapsView( T *emboss_reserved_local_data, @@ -1452,44 +1456,47 @@ class GenericFourByteView final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; - { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!high_nibble().Ok()) return false; - if (!one_byte().Ok()) return false; - if (!two_byte().Ok()) return false; - if (!raw_low_nibble().Ok()) return false; - if (!low_nibble().Ok()) return false; - if (!IntrinsicSizeInBits().Ok()) return false; - if (!MaxSizeInBits().Ok()) return false; - if (!MinSizeInBits().Ok()) return false; - } - } + if (!high_nibble().Ok()) return false; + + if (!one_byte().Ok()) return false; + + if (!two_byte().Ok()) return false; + + if (!raw_low_nibble().Ok()) return false; + + if (!low_nibble().Ok()) return false; + + if (!IntrinsicSizeInBits().Ok()) return false; + + if (!MaxSizeInBits().Ok()) return false; + + if (!MinSizeInBits().Ok()) return false; + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBits().Ok() && backing_.SizeInBits() >= static_cast( IntrinsicSizeInBits().UncheckedRead()); } - [[nodiscard]] static constexpr ::std::size_t SizeInBits() { + static constexpr ::std::size_t SizeInBits() { return static_cast(IntrinsicSizeInBits().Read()); } - [[nodiscard]] static constexpr bool SizeIsKnown() { + static constexpr bool SizeIsKnown() { return IntrinsicSizeInBits().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericFourByteView emboss_reserved_local_other) const { if (!has_high_nibble().Known()) return false; @@ -1561,7 +1568,7 @@ class GenericFourByteView final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericFourByteView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_high_nibble().ValueOr(false) && @@ -1636,7 +1643,7 @@ class GenericFourByteView final { emboss_reserved_local_other.IntrinsicSizeInBits().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericFourByteView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -1883,35 +1890,35 @@ class GenericFourByteView final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<4, ::emboss::support::AllValuesAreOk>, typename Storage::template OffsetStorageType> high_nibble() const; - [[nodiscard]] ::emboss::support::Maybe has_high_nibble() const; + ::emboss::support::Maybe has_high_nibble() const; public: - [[nodiscard]] typename ::emboss::test::GenericOneByteView> + typename ::emboss::test::GenericOneByteView> one_byte() const; - [[nodiscard]] ::emboss::support::Maybe has_one_byte() const; + ::emboss::support::Maybe has_one_byte() const; public: - [[nodiscard]] typename ::emboss::test::FourByte::GenericTwoByteWithGapsView> + typename ::emboss::test::FourByte::GenericTwoByteWithGapsView> two_byte() const; - [[nodiscard]] ::emboss::support::Maybe has_two_byte() const; + ::emboss::support::Maybe has_two_byte() const; public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<4, FourByte::EmbossReservedValidatorForRawLowNibble>, typename Storage::template OffsetStorageType> raw_low_nibble() const; - [[nodiscard]] ::emboss::support::Maybe has_raw_low_nibble() const; + ::emboss::support::Maybe has_raw_low_nibble() const; public: class EmbossReservedVirtualLowNibbleView final { @@ -1930,17 +1937,17 @@ class GenericFourByteView final { default; ~EmbossReservedVirtualLowNibbleView() = default; - [[nodiscard]] ::std::int32_t Read() const { + ::std::int32_t Read() const { EMBOSS_CHECK(view_.has_low_nibble().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - [[nodiscard]] ::std::int32_t UncheckedRead() const { + ::std::int32_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - [[nodiscard]] bool Ok() const { + bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -1953,9 +1960,9 @@ class GenericFourByteView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } - [[nodiscard]] bool TryToWrite(::std::int32_t emboss_reserved_local_value) { + bool TryToWrite(::std::int32_t emboss_reserved_local_value) { const auto emboss_reserved_local_maybe_new_value = ::emboss::support::Difference(::emboss::support::Maybe(emboss_reserved_local_value), ::emboss::support::Maybe(static_cast(100LL))); if (!CouldWriteValue(emboss_reserved_local_value)) return false; return view_.raw_low_nibble().TryToWrite( @@ -1969,7 +1976,7 @@ class GenericFourByteView final { void UncheckedWrite(::std::int32_t emboss_reserved_local_value) { view_.raw_low_nibble().UncheckedWrite((::emboss::support::Difference(::emboss::support::Maybe(emboss_reserved_local_value), ::emboss::support::Maybe(static_cast(100LL)))).ValueOrDefault()); } - [[nodiscard]] bool CouldWriteValue(::std::int32_t emboss_reserved_local_value) { + bool CouldWriteValue(::std::int32_t emboss_reserved_local_value) { if (!ValueIsOk(emboss_reserved_local_value)) return false; const auto emboss_reserved_local_maybe_new_value = ::emboss::support::Difference(::emboss::support::Maybe(emboss_reserved_local_value), ::emboss::support::Maybe(static_cast(100LL))); if (!emboss_reserved_local_maybe_new_value.Known()) return false; @@ -1985,7 +1992,7 @@ class GenericFourByteView final { private: - [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { + ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.raw_low_nibble(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Sum(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(100LL))); @@ -1993,7 +2000,7 @@ class GenericFourByteView final { return emboss_reserved_local_subexpr_3; } - [[nodiscard]] static constexpr bool ValueIsOk( + static constexpr bool ValueIsOk( ::std::int32_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -2001,8 +2008,8 @@ class GenericFourByteView final { const GenericFourByteView view_; }; - [[nodiscard]] EmbossReservedVirtualLowNibbleView low_nibble() const; - [[nodiscard]] ::emboss::support::Maybe has_low_nibble() const; + EmbossReservedVirtualLowNibbleView low_nibble() const; + ::emboss::support::Maybe has_low_nibble() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBitsView final { @@ -2018,9 +2025,9 @@ class GenericFourByteView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBitsView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -2029,13 +2036,13 @@ class GenericFourByteView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBitsView IntrinsicSizeInBits() { + static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBitsView IntrinsicSizeInBits() { return EmbossReservedDollarVirtualIntrinsicSizeInBitsView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBits() { + static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBits() { return ::emboss::support::Maybe(true); } @@ -2053,9 +2060,9 @@ class GenericFourByteView final { default; ~EmbossReservedDollarVirtualMaxSizeInBitsView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -2064,13 +2071,13 @@ class GenericFourByteView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBitsView MaxSizeInBits() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBitsView MaxSizeInBits() { return EmbossReservedDollarVirtualMaxSizeInBitsView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBits() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBits() { return ::emboss::support::Maybe(true); } @@ -2088,9 +2095,9 @@ class GenericFourByteView final { default; ~EmbossReservedDollarVirtualMinSizeInBitsView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -2099,13 +2106,13 @@ class GenericFourByteView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBitsView MinSizeInBits() { + static constexpr EmbossReservedDollarVirtualMinSizeInBitsView MinSizeInBits() { return EmbossReservedDollarVirtualMinSizeInBitsView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBits() { + static constexpr ::emboss::support::Maybe has_MinSizeInBits() { return ::emboss::support::Maybe(true); } @@ -2136,7 +2143,7 @@ struct EmbossReservedInternalIsGenericFourByteView< }; template -[[nodiscard]] inline GenericFourByteView< +inline GenericFourByteView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -2151,7 +2158,7 @@ MakeFourByteView( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericFourByteView> +inline GenericFourByteView> MakeFourByteView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericFourByteView>( @@ -2160,7 +2167,7 @@ MakeFourByteView( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericFourByteView< +inline GenericFourByteView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedFourByteView( T *emboss_reserved_local_data, @@ -2226,41 +2233,41 @@ class GenericArrayInBitsView final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; - { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!lone_flag().Ok()) return false; - if (!flags().Ok()) return false; - if (!IntrinsicSizeInBits().Ok()) return false; - if (!MaxSizeInBits().Ok()) return false; - if (!MinSizeInBits().Ok()) return false; - } - } + if (!lone_flag().Ok()) return false; + + if (!flags().Ok()) return false; + + if (!IntrinsicSizeInBits().Ok()) return false; + + if (!MaxSizeInBits().Ok()) return false; + + if (!MinSizeInBits().Ok()) return false; + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBits().Ok() && backing_.SizeInBits() >= static_cast( IntrinsicSizeInBits().UncheckedRead()); } - [[nodiscard]] static constexpr ::std::size_t SizeInBits() { + static constexpr ::std::size_t SizeInBits() { return static_cast(IntrinsicSizeInBits().Read()); } - [[nodiscard]] static constexpr bool SizeIsKnown() { + static constexpr bool SizeIsKnown() { return IntrinsicSizeInBits().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericArrayInBitsView emboss_reserved_local_other) const { if (!has_lone_flag().Known()) return false; @@ -2298,7 +2305,7 @@ class GenericArrayInBitsView final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericArrayInBitsView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_lone_flag().ValueOr(false) && @@ -2345,7 +2352,7 @@ class GenericArrayInBitsView final { emboss_reserved_local_other.IntrinsicSizeInBits().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericArrayInBitsView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -2478,18 +2485,18 @@ class GenericArrayInBitsView final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: - [[nodiscard]] typename ::emboss::prelude::FlagView< + typename ::emboss::prelude::FlagView< /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, typename Storage::template OffsetStorageType> lone_flag() const; - [[nodiscard]] ::emboss::support::Maybe has_lone_flag() const; + ::emboss::support::Maybe has_lone_flag() const; public: - [[nodiscard]] typename ::emboss::support::GenericArrayView< + typename ::emboss::support::GenericArrayView< typename ::emboss::prelude::FlagView< /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, typename Storage::template OffsetStorageType::template OffsetStorageType> @@ -2498,7 +2505,7 @@ class GenericArrayInBitsView final { 1 > flags() const; - [[nodiscard]] ::emboss::support::Maybe has_flags() const; + ::emboss::support::Maybe has_flags() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBitsView final { @@ -2514,9 +2521,9 @@ class GenericArrayInBitsView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBitsView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -2525,13 +2532,13 @@ class GenericArrayInBitsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBitsView IntrinsicSizeInBits() { + static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBitsView IntrinsicSizeInBits() { return EmbossReservedDollarVirtualIntrinsicSizeInBitsView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBits() { + static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBits() { return ::emboss::support::Maybe(true); } @@ -2549,9 +2556,9 @@ class GenericArrayInBitsView final { default; ~EmbossReservedDollarVirtualMaxSizeInBitsView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -2560,13 +2567,13 @@ class GenericArrayInBitsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBitsView MaxSizeInBits() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBitsView MaxSizeInBits() { return EmbossReservedDollarVirtualMaxSizeInBitsView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBits() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBits() { return ::emboss::support::Maybe(true); } @@ -2584,9 +2591,9 @@ class GenericArrayInBitsView final { default; ~EmbossReservedDollarVirtualMinSizeInBitsView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -2595,13 +2602,13 @@ class GenericArrayInBitsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBitsView MinSizeInBits() { + static constexpr EmbossReservedDollarVirtualMinSizeInBitsView MinSizeInBits() { return EmbossReservedDollarVirtualMinSizeInBitsView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBits() { + static constexpr ::emboss::support::Maybe has_MinSizeInBits() { return ::emboss::support::Maybe(true); } @@ -2632,7 +2639,7 @@ struct EmbossReservedInternalIsGenericArrayInBitsView< }; template -[[nodiscard]] inline GenericArrayInBitsView< +inline GenericArrayInBitsView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -2647,7 +2654,7 @@ MakeArrayInBitsView( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericArrayInBitsView> +inline GenericArrayInBitsView> MakeArrayInBitsView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericArrayInBitsView>( @@ -2656,7 +2663,7 @@ MakeArrayInBitsView( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericArrayInBitsView< +inline GenericArrayInBitsView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedArrayInBitsView( T *emboss_reserved_local_data, @@ -2721,40 +2728,39 @@ class GenericArrayInBitsInStructView final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; - { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!array_in_bits().Ok()) return false; - if (!IntrinsicSizeInBytes().Ok()) return false; - if (!MaxSizeInBytes().Ok()) return false; - if (!MinSizeInBytes().Ok()) return false; - } - } + if (!array_in_bits().Ok()) return false; + + if (!IntrinsicSizeInBytes().Ok()) return false; + + if (!MaxSizeInBytes().Ok()) return false; + + if (!MinSizeInBytes().Ok()) return false; + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { + static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - [[nodiscard]] static constexpr bool SizeIsKnown() { + static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericArrayInBitsInStructView emboss_reserved_local_other) const { if (!has_array_in_bits().Known()) return false; @@ -2775,7 +2781,7 @@ class GenericArrayInBitsInStructView final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericArrayInBitsInStructView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_array_in_bits().ValueOr(false) && @@ -2808,7 +2814,7 @@ class GenericArrayInBitsInStructView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericArrayInBitsInStructView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -2903,13 +2909,13 @@ class GenericArrayInBitsInStructView final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: - [[nodiscard]] typename ::emboss::test::GenericArrayInBitsView>, 16>> + typename ::emboss::test::GenericArrayInBitsView>, 16>> array_in_bits() const; - [[nodiscard]] ::emboss::support::Maybe has_array_in_bits() const; + ::emboss::support::Maybe has_array_in_bits() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -2925,9 +2931,9 @@ class GenericArrayInBitsInStructView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -2936,13 +2942,13 @@ class GenericArrayInBitsInStructView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -2960,9 +2966,9 @@ class GenericArrayInBitsInStructView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -2971,13 +2977,13 @@ class GenericArrayInBitsInStructView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -2995,9 +3001,9 @@ class GenericArrayInBitsInStructView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -3006,13 +3012,13 @@ class GenericArrayInBitsInStructView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -3043,7 +3049,7 @@ struct EmbossReservedInternalIsGenericArrayInBitsInStructView< }; template -[[nodiscard]] inline GenericArrayInBitsInStructView< +inline GenericArrayInBitsInStructView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -3058,7 +3064,7 @@ MakeArrayInBitsInStructView( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericArrayInBitsInStructView> +inline GenericArrayInBitsInStructView> MakeArrayInBitsInStructView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericArrayInBitsInStructView>( @@ -3067,7 +3073,7 @@ MakeArrayInBitsInStructView( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericArrayInBitsInStructView< +inline GenericArrayInBitsInStructView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedArrayInBitsInStructView( T *emboss_reserved_local_data, @@ -3135,42 +3141,44 @@ class GenericStructOfBitsView final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; - { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!one_byte().Ok()) return false; - if (!two_byte().Ok()) return false; - if (!four_byte().Ok()) return false; - if (!located_byte().Ok()) return false; - if (!IntrinsicSizeInBytes().Ok()) return false; - if (!MaxSizeInBytes().Ok()) return false; - if (!MinSizeInBytes().Ok()) return false; - } - } + if (!one_byte().Ok()) return false; + + if (!two_byte().Ok()) return false; + + if (!four_byte().Ok()) return false; + + if (!located_byte().Ok()) return false; + + if (!IntrinsicSizeInBytes().Ok()) return false; + + if (!MaxSizeInBytes().Ok()) return false; + + if (!MinSizeInBytes().Ok()) return false; + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - [[nodiscard]] ::std::size_t SizeInBytes() const { + ::std::size_t SizeInBytes() const { return static_cast(IntrinsicSizeInBytes().Read()); } - [[nodiscard]] bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericStructOfBitsView emboss_reserved_local_other) const { if (!has_one_byte().Known()) return false; @@ -3242,7 +3250,7 @@ class GenericStructOfBitsView final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericStructOfBitsView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_one_byte().ValueOr(false) && @@ -3317,7 +3325,7 @@ class GenericStructOfBitsView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericStructOfBitsView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -3526,33 +3534,33 @@ class GenericStructOfBitsView final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: - [[nodiscard]] typename ::emboss::test::GenericOneByteView>, 8>> + typename ::emboss::test::GenericOneByteView>, 8>> one_byte() const; - [[nodiscard]] ::emboss::support::Maybe has_one_byte() const; + ::emboss::support::Maybe has_one_byte() const; public: - [[nodiscard]] typename ::emboss::test::FourByte::GenericTwoByteWithGapsView>, 16>> + typename ::emboss::test::FourByte::GenericTwoByteWithGapsView>, 16>> two_byte() const; - [[nodiscard]] ::emboss::support::Maybe has_two_byte() const; + ::emboss::support::Maybe has_two_byte() const; public: - [[nodiscard]] typename ::emboss::test::GenericFourByteView>, 32>> + typename ::emboss::test::GenericFourByteView>, 32>> four_byte() const; - [[nodiscard]] ::emboss::support::Maybe has_four_byte() const; + ::emboss::support::Maybe has_four_byte() const; public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> located_byte() const; - [[nodiscard]] ::emboss::support::Maybe has_located_byte() const; + ::emboss::support::Maybe has_located_byte() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -3571,17 +3579,17 @@ class GenericStructOfBitsView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - [[nodiscard]] ::std::int32_t Read() const { + ::std::int32_t Read() const { EMBOSS_CHECK(view_.has_IntrinsicSizeInBytes().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - [[nodiscard]] ::std::int32_t UncheckedRead() const { + ::std::int32_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - [[nodiscard]] bool Ok() const { + bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -3594,12 +3602,12 @@ class GenericStructOfBitsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } private: - [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { + ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.one_byte().mid_nibble(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Sum(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(1LL))); @@ -3609,7 +3617,7 @@ class GenericStructOfBitsView final { return emboss_reserved_local_subexpr_5; } - [[nodiscard]] static constexpr bool ValueIsOk( + static constexpr bool ValueIsOk( ::std::int32_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -3617,8 +3625,8 @@ class GenericStructOfBitsView final { const GenericStructOfBitsView view_; }; - [[nodiscard]] EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; - [[nodiscard]] ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; + EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; public: class EmbossReservedDollarVirtualMaxSizeInBytesView final { @@ -3634,9 +3642,9 @@ class GenericStructOfBitsView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -3645,13 +3653,13 @@ class GenericStructOfBitsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -3669,9 +3677,9 @@ class GenericStructOfBitsView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -3680,13 +3688,13 @@ class GenericStructOfBitsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -3717,7 +3725,7 @@ struct EmbossReservedInternalIsGenericStructOfBitsView< }; template -[[nodiscard]] inline GenericStructOfBitsView< +inline GenericStructOfBitsView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -3732,7 +3740,7 @@ MakeStructOfBitsView( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericStructOfBitsView> +inline GenericStructOfBitsView> MakeStructOfBitsView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericStructOfBitsView>( @@ -3741,7 +3749,7 @@ MakeStructOfBitsView( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericStructOfBitsView< +inline GenericStructOfBitsView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedStructOfBitsView( T *emboss_reserved_local_data, @@ -3806,40 +3814,39 @@ class GenericBitArrayView final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; - { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!one_byte().Ok()) return false; - if (!IntrinsicSizeInBytes().Ok()) return false; - if (!MaxSizeInBytes().Ok()) return false; - if (!MinSizeInBytes().Ok()) return false; - } - } + if (!one_byte().Ok()) return false; + + if (!IntrinsicSizeInBytes().Ok()) return false; + + if (!MaxSizeInBytes().Ok()) return false; + + if (!MinSizeInBytes().Ok()) return false; + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { + static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - [[nodiscard]] static constexpr bool SizeIsKnown() { + static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericBitArrayView emboss_reserved_local_other) const { if (!has_one_byte().Known()) return false; @@ -3860,7 +3867,7 @@ class GenericBitArrayView final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericBitArrayView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_one_byte().ValueOr(false) && @@ -3893,7 +3900,7 @@ class GenericBitArrayView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericBitArrayView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -3988,17 +3995,17 @@ class GenericBitArrayView final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: - [[nodiscard]] typename ::emboss::support::GenericArrayView< + typename ::emboss::support::GenericArrayView< typename ::emboss::test::GenericOneByteView::template OffsetStorageType>, 8>> , typename Storage::template OffsetStorageType, 1, 8 > one_byte() const; - [[nodiscard]] ::emboss::support::Maybe has_one_byte() const; + ::emboss::support::Maybe has_one_byte() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -4014,9 +4021,9 @@ class GenericBitArrayView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -4025,13 +4032,13 @@ class GenericBitArrayView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -4049,9 +4056,9 @@ class GenericBitArrayView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -4060,13 +4067,13 @@ class GenericBitArrayView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -4084,9 +4091,9 @@ class GenericBitArrayView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -4095,13 +4102,13 @@ class GenericBitArrayView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -4132,7 +4139,7 @@ struct EmbossReservedInternalIsGenericBitArrayView< }; template -[[nodiscard]] inline GenericBitArrayView< +inline GenericBitArrayView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -4147,7 +4154,7 @@ MakeBitArrayView( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericBitArrayView> +inline GenericBitArrayView> MakeBitArrayView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericBitArrayView>( @@ -4156,7 +4163,7 @@ MakeBitArrayView( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericBitArrayView< +inline GenericBitArrayView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedBitArrayView( T *emboss_reserved_local_data, diff --git a/testdata/golden_cpp/complex_offset.emb.h b/testdata/golden_cpp/complex_offset.emb.h index eff386c..6b54b78 100644 --- a/testdata/golden_cpp/complex_offset.emb.h +++ b/testdata/golden_cpp/complex_offset.emb.h @@ -103,40 +103,39 @@ class GenericLengthView final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; - { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!length().Ok()) return false; - if (!IntrinsicSizeInBytes().Ok()) return false; - if (!MaxSizeInBytes().Ok()) return false; - if (!MinSizeInBytes().Ok()) return false; - } - } + if (!length().Ok()) return false; + + if (!IntrinsicSizeInBytes().Ok()) return false; + + if (!MaxSizeInBytes().Ok()) return false; + + if (!MinSizeInBytes().Ok()) return false; + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { + static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - [[nodiscard]] static constexpr bool SizeIsKnown() { + static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericLengthView emboss_reserved_local_other) const { if (!has_length().Known()) return false; @@ -157,7 +156,7 @@ class GenericLengthView final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericLengthView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_length().ValueOr(false) && @@ -190,7 +189,7 @@ class GenericLengthView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericLengthView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -285,15 +284,15 @@ class GenericLengthView final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> length() const; - [[nodiscard]] ::emboss::support::Maybe has_length() const; + ::emboss::support::Maybe has_length() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -309,9 +308,9 @@ class GenericLengthView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -320,13 +319,13 @@ class GenericLengthView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -344,9 +343,9 @@ class GenericLengthView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -355,13 +354,13 @@ class GenericLengthView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -379,9 +378,9 @@ class GenericLengthView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -390,13 +389,13 @@ class GenericLengthView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -427,7 +426,7 @@ struct EmbossReservedInternalIsGenericLengthView< }; template -[[nodiscard]] inline GenericLengthView< +inline GenericLengthView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -442,7 +441,7 @@ MakeLengthView( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericLengthView> +inline GenericLengthView> MakeLengthView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericLengthView>( @@ -451,7 +450,7 @@ MakeLengthView( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericLengthView< +inline GenericLengthView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedLengthView( T *emboss_reserved_local_data, @@ -517,40 +516,40 @@ class GenericDataView final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; - { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!length().Ok()) return false; - if (!data().Ok()) return false; - if (!IntrinsicSizeInBytes().Ok()) return false; - if (!MaxSizeInBytes().Ok()) return false; - if (!MinSizeInBytes().Ok()) return false; - } - } + if (!length().Ok()) return false; + + if (!data().Ok()) return false; + + if (!IntrinsicSizeInBytes().Ok()) return false; + + if (!MaxSizeInBytes().Ok()) return false; + + if (!MinSizeInBytes().Ok()) return false; + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - [[nodiscard]] ::std::size_t SizeInBytes() const { + ::std::size_t SizeInBytes() const { return static_cast(IntrinsicSizeInBytes().Read()); } - [[nodiscard]] bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericDataView emboss_reserved_local_other) const { if (!has_length().Known()) return false; @@ -588,7 +587,7 @@ class GenericDataView final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericDataView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_length().ValueOr(false) && @@ -635,7 +634,7 @@ class GenericDataView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericDataView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -768,16 +767,16 @@ class GenericDataView final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: - [[nodiscard]] typename ::emboss::test::GenericLengthView> + typename ::emboss::test::GenericLengthView> length() const; - [[nodiscard]] ::emboss::support::Maybe has_length() const; + ::emboss::support::Maybe has_length() const; public: - [[nodiscard]] typename ::emboss::support::GenericArrayView< + typename ::emboss::support::GenericArrayView< typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock::template OffsetStorageType>, 8>> @@ -786,7 +785,7 @@ class GenericDataView final { 8 > data() const; - [[nodiscard]] ::emboss::support::Maybe has_data() const; + ::emboss::support::Maybe has_data() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -805,17 +804,17 @@ class GenericDataView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - [[nodiscard]] ::std::int32_t Read() const { + ::std::int32_t Read() const { EMBOSS_CHECK(view_.has_IntrinsicSizeInBytes().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - [[nodiscard]] ::std::int32_t UncheckedRead() const { + ::std::int32_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - [[nodiscard]] bool Ok() const { + bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -828,12 +827,12 @@ class GenericDataView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } private: - [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { + ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.length().length(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Sum(::emboss::support::Maybe(static_cast(1LL)), emboss_reserved_local_subexpr_2); @@ -843,7 +842,7 @@ class GenericDataView final { return emboss_reserved_local_subexpr_5; } - [[nodiscard]] static constexpr bool ValueIsOk( + static constexpr bool ValueIsOk( ::std::int32_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -851,8 +850,8 @@ class GenericDataView final { const GenericDataView view_; }; - [[nodiscard]] EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; - [[nodiscard]] ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; + EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; public: class EmbossReservedDollarVirtualMaxSizeInBytesView final { @@ -868,9 +867,9 @@ class GenericDataView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -879,13 +878,13 @@ class GenericDataView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -903,9 +902,9 @@ class GenericDataView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -914,13 +913,13 @@ class GenericDataView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -951,7 +950,7 @@ struct EmbossReservedInternalIsGenericDataView< }; template -[[nodiscard]] inline GenericDataView< +inline GenericDataView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -966,7 +965,7 @@ MakeDataView( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericDataView> +inline GenericDataView> MakeDataView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericDataView>( @@ -975,7 +974,7 @@ MakeDataView( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericDataView< +inline GenericDataView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedDataView( T *emboss_reserved_local_data, @@ -1056,55 +1055,70 @@ class GenericPackedFieldsView final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; - { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!length1().Ok()) return false; - if (!data1().Ok()) return false; - if (!o1().Ok()) return false; - if (!length2().Ok()) return false; - if (!data2().Ok()) return false; - if (!o2().Ok()) return false; - if (!length3().Ok()) return false; - if (!data3().Ok()) return false; - if (!o3().Ok()) return false; - if (!length4().Ok()) return false; - if (!data4().Ok()) return false; - if (!o4().Ok()) return false; - if (!length5().Ok()) return false; - if (!data5().Ok()) return false; - if (!o5().Ok()) return false; - if (!length6().Ok()) return false; - if (!data6().Ok()) return false; - if (!IntrinsicSizeInBytes().Ok()) return false; - if (!MaxSizeInBytes().Ok()) return false; - if (!MinSizeInBytes().Ok()) return false; - } - } + if (!length1().Ok()) return false; + + if (!data1().Ok()) return false; + + if (!o1().Ok()) return false; + + if (!length2().Ok()) return false; + + if (!data2().Ok()) return false; + + if (!o2().Ok()) return false; + + if (!length3().Ok()) return false; + + if (!data3().Ok()) return false; + + if (!o3().Ok()) return false; + + if (!length4().Ok()) return false; + + if (!data4().Ok()) return false; + + if (!o4().Ok()) return false; + + if (!length5().Ok()) return false; + + if (!data5().Ok()) return false; + + if (!o5().Ok()) return false; + + if (!length6().Ok()) return false; + + if (!data6().Ok()) return false; + + if (!IntrinsicSizeInBytes().Ok()) return false; + + if (!MaxSizeInBytes().Ok()) return false; + + if (!MinSizeInBytes().Ok()) return false; + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - [[nodiscard]] ::std::size_t SizeInBytes() const { + ::std::size_t SizeInBytes() const { return static_cast(IntrinsicSizeInBytes().Read()); } - [[nodiscard]] bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericPackedFieldsView emboss_reserved_local_other) const { if (!has_length1().Known()) return false; @@ -1312,7 +1326,7 @@ class GenericPackedFieldsView final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericPackedFieldsView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_length1().ValueOr(false) && @@ -1499,7 +1513,7 @@ class GenericPackedFieldsView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericPackedFieldsView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -2107,19 +2121,19 @@ class GenericPackedFieldsView final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: - [[nodiscard]] typename ::emboss::test::GenericLengthView> + typename ::emboss::test::GenericLengthView> length1() const; - [[nodiscard]] ::emboss::support::Maybe has_length1() const; + ::emboss::support::Maybe has_length1() const; public: - [[nodiscard]] typename ::emboss::test::GenericDataView> + typename ::emboss::test::GenericDataView> data1() const; - [[nodiscard]] ::emboss::support::Maybe has_data1() const; + ::emboss::support::Maybe has_data1() const; public: class EmbossReservedVirtualO1View final { @@ -2138,17 +2152,17 @@ class GenericPackedFieldsView final { default; ~EmbossReservedVirtualO1View() = default; - [[nodiscard]] ::std::int32_t Read() const { + ::std::int32_t Read() const { EMBOSS_CHECK(view_.has_o1().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - [[nodiscard]] ::std::int32_t UncheckedRead() const { + ::std::int32_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - [[nodiscard]] bool Ok() const { + bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -2161,19 +2175,19 @@ class GenericPackedFieldsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } private: - [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { + ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.data1().IntrinsicSizeInBytes(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); return emboss_reserved_local_subexpr_2; } - [[nodiscard]] static constexpr bool ValueIsOk( + static constexpr bool ValueIsOk( ::std::int32_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -2181,20 +2195,20 @@ class GenericPackedFieldsView final { const GenericPackedFieldsView view_; }; - [[nodiscard]] EmbossReservedVirtualO1View o1() const; - [[nodiscard]] ::emboss::support::Maybe has_o1() const; + EmbossReservedVirtualO1View o1() const; + ::emboss::support::Maybe has_o1() const; public: - [[nodiscard]] typename ::emboss::test::GenericLengthView> + typename ::emboss::test::GenericLengthView> length2() const; - [[nodiscard]] ::emboss::support::Maybe has_length2() const; + ::emboss::support::Maybe has_length2() const; public: - [[nodiscard]] typename ::emboss::test::GenericDataView> + typename ::emboss::test::GenericDataView> data2() const; - [[nodiscard]] ::emboss::support::Maybe has_data2() const; + ::emboss::support::Maybe has_data2() const; public: class EmbossReservedVirtualO2View final { @@ -2213,17 +2227,17 @@ class GenericPackedFieldsView final { default; ~EmbossReservedVirtualO2View() = default; - [[nodiscard]] ::std::int32_t Read() const { + ::std::int32_t Read() const { EMBOSS_CHECK(view_.has_o2().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - [[nodiscard]] ::std::int32_t UncheckedRead() const { + ::std::int32_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - [[nodiscard]] bool Ok() const { + bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -2236,12 +2250,12 @@ class GenericPackedFieldsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } private: - [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { + ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.o1(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = view_.data2().IntrinsicSizeInBytes(); @@ -2251,7 +2265,7 @@ class GenericPackedFieldsView final { return emboss_reserved_local_subexpr_5; } - [[nodiscard]] static constexpr bool ValueIsOk( + static constexpr bool ValueIsOk( ::std::int32_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -2259,20 +2273,20 @@ class GenericPackedFieldsView final { const GenericPackedFieldsView view_; }; - [[nodiscard]] EmbossReservedVirtualO2View o2() const; - [[nodiscard]] ::emboss::support::Maybe has_o2() const; + EmbossReservedVirtualO2View o2() const; + ::emboss::support::Maybe has_o2() const; public: - [[nodiscard]] typename ::emboss::test::GenericLengthView> + typename ::emboss::test::GenericLengthView> length3() const; - [[nodiscard]] ::emboss::support::Maybe has_length3() const; + ::emboss::support::Maybe has_length3() const; public: - [[nodiscard]] typename ::emboss::test::GenericDataView> + typename ::emboss::test::GenericDataView> data3() const; - [[nodiscard]] ::emboss::support::Maybe has_data3() const; + ::emboss::support::Maybe has_data3() const; public: class EmbossReservedVirtualO3View final { @@ -2291,17 +2305,17 @@ class GenericPackedFieldsView final { default; ~EmbossReservedVirtualO3View() = default; - [[nodiscard]] ::std::int32_t Read() const { + ::std::int32_t Read() const { EMBOSS_CHECK(view_.has_o3().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - [[nodiscard]] ::std::int32_t UncheckedRead() const { + ::std::int32_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - [[nodiscard]] bool Ok() const { + bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -2314,12 +2328,12 @@ class GenericPackedFieldsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } private: - [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { + ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.o2(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = view_.data3().IntrinsicSizeInBytes(); @@ -2329,7 +2343,7 @@ class GenericPackedFieldsView final { return emboss_reserved_local_subexpr_5; } - [[nodiscard]] static constexpr bool ValueIsOk( + static constexpr bool ValueIsOk( ::std::int32_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -2337,20 +2351,20 @@ class GenericPackedFieldsView final { const GenericPackedFieldsView view_; }; - [[nodiscard]] EmbossReservedVirtualO3View o3() const; - [[nodiscard]] ::emboss::support::Maybe has_o3() const; + EmbossReservedVirtualO3View o3() const; + ::emboss::support::Maybe has_o3() const; public: - [[nodiscard]] typename ::emboss::test::GenericLengthView> + typename ::emboss::test::GenericLengthView> length4() const; - [[nodiscard]] ::emboss::support::Maybe has_length4() const; + ::emboss::support::Maybe has_length4() const; public: - [[nodiscard]] typename ::emboss::test::GenericDataView> + typename ::emboss::test::GenericDataView> data4() const; - [[nodiscard]] ::emboss::support::Maybe has_data4() const; + ::emboss::support::Maybe has_data4() const; public: class EmbossReservedVirtualO4View final { @@ -2369,17 +2383,17 @@ class GenericPackedFieldsView final { default; ~EmbossReservedVirtualO4View() = default; - [[nodiscard]] ::std::int32_t Read() const { + ::std::int32_t Read() const { EMBOSS_CHECK(view_.has_o4().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - [[nodiscard]] ::std::int32_t UncheckedRead() const { + ::std::int32_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - [[nodiscard]] bool Ok() const { + bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -2392,12 +2406,12 @@ class GenericPackedFieldsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } private: - [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { + ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.o3(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = view_.data4().IntrinsicSizeInBytes(); @@ -2407,7 +2421,7 @@ class GenericPackedFieldsView final { return emboss_reserved_local_subexpr_5; } - [[nodiscard]] static constexpr bool ValueIsOk( + static constexpr bool ValueIsOk( ::std::int32_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -2415,20 +2429,20 @@ class GenericPackedFieldsView final { const GenericPackedFieldsView view_; }; - [[nodiscard]] EmbossReservedVirtualO4View o4() const; - [[nodiscard]] ::emboss::support::Maybe has_o4() const; + EmbossReservedVirtualO4View o4() const; + ::emboss::support::Maybe has_o4() const; public: - [[nodiscard]] typename ::emboss::test::GenericLengthView> + typename ::emboss::test::GenericLengthView> length5() const; - [[nodiscard]] ::emboss::support::Maybe has_length5() const; + ::emboss::support::Maybe has_length5() const; public: - [[nodiscard]] typename ::emboss::test::GenericDataView> + typename ::emboss::test::GenericDataView> data5() const; - [[nodiscard]] ::emboss::support::Maybe has_data5() const; + ::emboss::support::Maybe has_data5() const; public: class EmbossReservedVirtualO5View final { @@ -2447,17 +2461,17 @@ class GenericPackedFieldsView final { default; ~EmbossReservedVirtualO5View() = default; - [[nodiscard]] ::std::int32_t Read() const { + ::std::int32_t Read() const { EMBOSS_CHECK(view_.has_o5().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - [[nodiscard]] ::std::int32_t UncheckedRead() const { + ::std::int32_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - [[nodiscard]] bool Ok() const { + bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -2470,12 +2484,12 @@ class GenericPackedFieldsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } private: - [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { + ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.o4(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = view_.data5().IntrinsicSizeInBytes(); @@ -2485,7 +2499,7 @@ class GenericPackedFieldsView final { return emboss_reserved_local_subexpr_5; } - [[nodiscard]] static constexpr bool ValueIsOk( + static constexpr bool ValueIsOk( ::std::int32_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -2493,20 +2507,20 @@ class GenericPackedFieldsView final { const GenericPackedFieldsView view_; }; - [[nodiscard]] EmbossReservedVirtualO5View o5() const; - [[nodiscard]] ::emboss::support::Maybe has_o5() const; + EmbossReservedVirtualO5View o5() const; + ::emboss::support::Maybe has_o5() const; public: - [[nodiscard]] typename ::emboss::test::GenericLengthView> + typename ::emboss::test::GenericLengthView> length6() const; - [[nodiscard]] ::emboss::support::Maybe has_length6() const; + ::emboss::support::Maybe has_length6() const; public: - [[nodiscard]] typename ::emboss::test::GenericDataView> + typename ::emboss::test::GenericDataView> data6() const; - [[nodiscard]] ::emboss::support::Maybe has_data6() const; + ::emboss::support::Maybe has_data6() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -2525,17 +2539,17 @@ class GenericPackedFieldsView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - [[nodiscard]] ::std::int32_t Read() const { + ::std::int32_t Read() const { EMBOSS_CHECK(view_.has_IntrinsicSizeInBytes().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - [[nodiscard]] ::std::int32_t UncheckedRead() const { + ::std::int32_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - [[nodiscard]] bool Ok() const { + bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -2548,12 +2562,12 @@ class GenericPackedFieldsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } private: - [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { + ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.length1().length(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Sum(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(1LL))); @@ -2609,7 +2623,7 @@ class GenericPackedFieldsView final { return emboss_reserved_local_subexpr_51; } - [[nodiscard]] static constexpr bool ValueIsOk( + static constexpr bool ValueIsOk( ::std::int32_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -2617,8 +2631,8 @@ class GenericPackedFieldsView final { const GenericPackedFieldsView view_; }; - [[nodiscard]] EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; - [[nodiscard]] ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; + EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; public: class EmbossReservedDollarVirtualMaxSizeInBytesView final { @@ -2634,9 +2648,9 @@ class GenericPackedFieldsView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -2645,13 +2659,13 @@ class GenericPackedFieldsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -2669,9 +2683,9 @@ class GenericPackedFieldsView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -2680,13 +2694,13 @@ class GenericPackedFieldsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -2717,7 +2731,7 @@ struct EmbossReservedInternalIsGenericPackedFieldsView< }; template -[[nodiscard]] inline GenericPackedFieldsView< +inline GenericPackedFieldsView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -2732,7 +2746,7 @@ MakePackedFieldsView( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericPackedFieldsView> +inline GenericPackedFieldsView> MakePackedFieldsView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericPackedFieldsView>( @@ -2741,7 +2755,7 @@ MakePackedFieldsView( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericPackedFieldsView< +inline GenericPackedFieldsView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedPackedFieldsView( T *emboss_reserved_local_data, diff --git a/testdata/golden_cpp/complex_structure.emb.h b/testdata/golden_cpp/complex_structure.emb.h index 39af2e7..634d32b 100644 --- a/testdata/golden_cpp/complex_structure.emb.h +++ b/testdata/golden_cpp/complex_structure.emb.h @@ -112,42 +112,43 @@ class GenericRegisterLayoutView final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; - { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!x().Ok()) return false; - if (!l().Ok()) return false; - if (!h().Ok()) return false; - if (!IntrinsicSizeInBits().Ok()) return false; - if (!MaxSizeInBits().Ok()) return false; - if (!MinSizeInBits().Ok()) return false; - } - } + if (!x().Ok()) return false; + + if (!l().Ok()) return false; + + if (!h().Ok()) return false; + + if (!IntrinsicSizeInBits().Ok()) return false; + + if (!MaxSizeInBits().Ok()) return false; + + if (!MinSizeInBits().Ok()) return false; + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBits().Ok() && backing_.SizeInBits() >= static_cast( IntrinsicSizeInBits().UncheckedRead()); } - [[nodiscard]] static constexpr ::std::size_t SizeInBits() { + static constexpr ::std::size_t SizeInBits() { return static_cast(IntrinsicSizeInBits().Read()); } - [[nodiscard]] static constexpr bool SizeIsKnown() { + static constexpr bool SizeIsKnown() { return IntrinsicSizeInBits().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericRegisterLayoutView emboss_reserved_local_other) const { if (!has_x().Known()) return false; @@ -202,7 +203,7 @@ class GenericRegisterLayoutView final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericRegisterLayoutView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_x().ValueOr(false) && @@ -263,7 +264,7 @@ class GenericRegisterLayoutView final { emboss_reserved_local_other.IntrinsicSizeInBits().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericRegisterLayoutView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -434,31 +435,31 @@ class GenericRegisterLayoutView final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: - [[nodiscard]] typename ::emboss::prelude::IntView< + typename ::emboss::prelude::IntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename Storage::template OffsetStorageType> x() const; - [[nodiscard]] ::emboss::support::Maybe has_x() const; + ::emboss::support::Maybe has_x() const; public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<4, ::emboss::support::AllValuesAreOk>, typename Storage::template OffsetStorageType> l() const; - [[nodiscard]] ::emboss::support::Maybe has_l() const; + ::emboss::support::Maybe has_l() const; public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<4, ::emboss::support::AllValuesAreOk>, typename Storage::template OffsetStorageType> h() const; - [[nodiscard]] ::emboss::support::Maybe has_h() const; + ::emboss::support::Maybe has_h() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBitsView final { @@ -474,9 +475,9 @@ class GenericRegisterLayoutView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBitsView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -485,13 +486,13 @@ class GenericRegisterLayoutView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBitsView IntrinsicSizeInBits() { + static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBitsView IntrinsicSizeInBits() { return EmbossReservedDollarVirtualIntrinsicSizeInBitsView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBits() { + static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBits() { return ::emboss::support::Maybe(true); } @@ -509,9 +510,9 @@ class GenericRegisterLayoutView final { default; ~EmbossReservedDollarVirtualMaxSizeInBitsView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -520,13 +521,13 @@ class GenericRegisterLayoutView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBitsView MaxSizeInBits() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBitsView MaxSizeInBits() { return EmbossReservedDollarVirtualMaxSizeInBitsView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBits() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBits() { return ::emboss::support::Maybe(true); } @@ -544,9 +545,9 @@ class GenericRegisterLayoutView final { default; ~EmbossReservedDollarVirtualMinSizeInBitsView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -555,13 +556,13 @@ class GenericRegisterLayoutView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBitsView MinSizeInBits() { + static constexpr EmbossReservedDollarVirtualMinSizeInBitsView MinSizeInBits() { return EmbossReservedDollarVirtualMinSizeInBitsView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBits() { + static constexpr ::emboss::support::Maybe has_MinSizeInBits() { return ::emboss::support::Maybe(true); } @@ -592,7 +593,7 @@ struct EmbossReservedInternalIsGenericRegisterLayoutView< }; template -[[nodiscard]] inline GenericRegisterLayoutView< +inline GenericRegisterLayoutView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -607,7 +608,7 @@ MakeRegisterLayoutView( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericRegisterLayoutView> +inline GenericRegisterLayoutView> MakeRegisterLayoutView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericRegisterLayoutView>( @@ -616,7 +617,7 @@ MakeRegisterLayoutView( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericRegisterLayoutView< +inline GenericRegisterLayoutView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedRegisterLayoutView( T *emboss_reserved_local_data, @@ -681,40 +682,39 @@ class GenericArrayElementView final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; - { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!a().Ok()) return false; - if (!IntrinsicSizeInBytes().Ok()) return false; - if (!MaxSizeInBytes().Ok()) return false; - if (!MinSizeInBytes().Ok()) return false; - } - } + if (!a().Ok()) return false; + + if (!IntrinsicSizeInBytes().Ok()) return false; + + if (!MaxSizeInBytes().Ok()) return false; + + if (!MinSizeInBytes().Ok()) return false; + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { + static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - [[nodiscard]] static constexpr bool SizeIsKnown() { + static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericArrayElementView emboss_reserved_local_other) const { if (!has_a().Known()) return false; @@ -735,7 +735,7 @@ class GenericArrayElementView final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericArrayElementView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_a().ValueOr(false) && @@ -768,7 +768,7 @@ class GenericArrayElementView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericArrayElementView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -863,13 +863,13 @@ class GenericArrayElementView final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: - [[nodiscard]] typename ::emboss_test::GenericRegisterLayoutView>, 8>> + typename ::emboss_test::GenericRegisterLayoutView>, 8>> a() const; - [[nodiscard]] ::emboss::support::Maybe has_a() const; + ::emboss::support::Maybe has_a() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -885,9 +885,9 @@ class GenericArrayElementView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -896,13 +896,13 @@ class GenericArrayElementView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -920,9 +920,9 @@ class GenericArrayElementView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -931,13 +931,13 @@ class GenericArrayElementView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -955,9 +955,9 @@ class GenericArrayElementView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -966,13 +966,13 @@ class GenericArrayElementView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -1003,7 +1003,7 @@ struct EmbossReservedInternalIsGenericArrayElementView< }; template -[[nodiscard]] inline GenericArrayElementView< +inline GenericArrayElementView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -1018,7 +1018,7 @@ MakeArrayElementView( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericArrayElementView> +inline GenericArrayElementView> MakeArrayElementView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericArrayElementView>( @@ -1027,7 +1027,7 @@ MakeArrayElementView( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericArrayElementView< +inline GenericArrayElementView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedArrayElementView( T *emboss_reserved_local_data, @@ -1115,43 +1115,45 @@ class GenericEmbossReservedAnonymousField1View final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; - { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!a0().Ok()) return false; - if (!s0().Ok()) return false; - if (!l0().Ok()) return false; - if (!h0().Ok()) return false; - if (!IntrinsicSizeInBits().Ok()) return false; - if (!MaxSizeInBits().Ok()) return false; - if (!MinSizeInBits().Ok()) return false; - } - } + if (!a0().Ok()) return false; + + if (!s0().Ok()) return false; + + if (!l0().Ok()) return false; + + if (!h0().Ok()) return false; + + if (!IntrinsicSizeInBits().Ok()) return false; + + if (!MaxSizeInBits().Ok()) return false; + + if (!MinSizeInBits().Ok()) return false; + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBits().Ok() && backing_.SizeInBits() >= static_cast( IntrinsicSizeInBits().UncheckedRead()); } - [[nodiscard]] static constexpr ::std::size_t SizeInBits() { + static constexpr ::std::size_t SizeInBits() { return static_cast(IntrinsicSizeInBits().Read()); } - [[nodiscard]] static constexpr bool SizeIsKnown() { + static constexpr bool SizeIsKnown() { return IntrinsicSizeInBits().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericEmbossReservedAnonymousField1View emboss_reserved_local_other) const { if (!has_a0().Known()) return false; @@ -1223,7 +1225,7 @@ class GenericEmbossReservedAnonymousField1View final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericEmbossReservedAnonymousField1View emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_a0().ValueOr(false) && @@ -1298,7 +1300,7 @@ class GenericEmbossReservedAnonymousField1View final { emboss_reserved_local_other.IntrinsicSizeInBits().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericEmbossReservedAnonymousField1View emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -1507,39 +1509,39 @@ class GenericEmbossReservedAnonymousField1View final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename Storage::template OffsetStorageType> a0() const; - [[nodiscard]] ::emboss::support::Maybe has_a0() const; + ::emboss::support::Maybe has_a0() const; public: - [[nodiscard]] typename ::emboss::prelude::FlagView< + typename ::emboss::prelude::FlagView< /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, typename Storage::template OffsetStorageType> s0() const; - [[nodiscard]] ::emboss::support::Maybe has_s0() const; + ::emboss::support::Maybe has_s0() const; public: - [[nodiscard]] typename ::emboss::prelude::IntView< + typename ::emboss::prelude::IntView< /**/ ::emboss::support::FixedSizeViewParameters<4, ::emboss::support::AllValuesAreOk>, typename Storage::template OffsetStorageType> l0() const; - [[nodiscard]] ::emboss::support::Maybe has_l0() const; + ::emboss::support::Maybe has_l0() const; public: - [[nodiscard]] typename ::emboss::prelude::IntView< + typename ::emboss::prelude::IntView< /**/ ::emboss::support::FixedSizeViewParameters<4, ::emboss::support::AllValuesAreOk>, typename Storage::template OffsetStorageType> h0() const; - [[nodiscard]] ::emboss::support::Maybe has_h0() const; + ::emboss::support::Maybe has_h0() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBitsView final { @@ -1555,9 +1557,9 @@ class GenericEmbossReservedAnonymousField1View final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBitsView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -1566,13 +1568,13 @@ class GenericEmbossReservedAnonymousField1View final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBitsView IntrinsicSizeInBits() { + static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBitsView IntrinsicSizeInBits() { return EmbossReservedDollarVirtualIntrinsicSizeInBitsView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBits() { + static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBits() { return ::emboss::support::Maybe(true); } @@ -1590,9 +1592,9 @@ class GenericEmbossReservedAnonymousField1View final { default; ~EmbossReservedDollarVirtualMaxSizeInBitsView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -1601,13 +1603,13 @@ class GenericEmbossReservedAnonymousField1View final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBitsView MaxSizeInBits() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBitsView MaxSizeInBits() { return EmbossReservedDollarVirtualMaxSizeInBitsView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBits() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBits() { return ::emboss::support::Maybe(true); } @@ -1625,9 +1627,9 @@ class GenericEmbossReservedAnonymousField1View final { default; ~EmbossReservedDollarVirtualMinSizeInBitsView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -1636,13 +1638,13 @@ class GenericEmbossReservedAnonymousField1View final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBitsView MinSizeInBits() { + static constexpr EmbossReservedDollarVirtualMinSizeInBitsView MinSizeInBits() { return EmbossReservedDollarVirtualMinSizeInBitsView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBits() { + static constexpr ::emboss::support::Maybe has_MinSizeInBits() { return ::emboss::support::Maybe(true); } @@ -1673,7 +1675,7 @@ struct EmbossReservedInternalIsGenericEmbossReservedAnonymousField1View< }; template -[[nodiscard]] inline GenericEmbossReservedAnonymousField1View< +inline GenericEmbossReservedAnonymousField1View< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -1688,7 +1690,7 @@ MakeEmbossReservedAnonymousField1View( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericEmbossReservedAnonymousField1View> +inline GenericEmbossReservedAnonymousField1View> MakeEmbossReservedAnonymousField1View( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericEmbossReservedAnonymousField1View>( @@ -1697,7 +1699,7 @@ MakeEmbossReservedAnonymousField1View( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericEmbossReservedAnonymousField1View< +inline GenericEmbossReservedAnonymousField1View< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedEmbossReservedAnonymousField1View( T *emboss_reserved_local_data, @@ -1758,7 +1760,7 @@ class GenericComplexView final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; const auto emboss_reserved_local_ok_subexpr_1 = ::emboss::support::And(::emboss::support::Maybe(true), ::emboss::support::Maybe(true)); @@ -1788,93 +1790,129 @@ class GenericComplexView final { const auto emboss_reserved_local_ok_subexpr_25 = ::emboss::support::LessThan(emboss_reserved_local_ok_subexpr_3, ::emboss::support::Maybe(static_cast(4LL))); const auto emboss_reserved_local_ok_subexpr_26 = ::emboss::support::Or(emboss_reserved_local_ok_subexpr_24, emboss_reserved_local_ok_subexpr_25); + if (!s().Ok()) return false; + + if (!u().Ok()) return false; + + if (!i().Ok()) return false; + + if (!b().Ok()) return false; + + if (!a().Ok()) return false; + + if (!emboss_reserved_anonymous_field_1().Ok()) return false; + + if (!e1().Ok()) return false; + + if (!IntrinsicSizeInBytes().Ok()) return false; + + if (!MaxSizeInBytes().Ok()) return false; + + if (!MinSizeInBytes().Ok()) return false; + { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!s().Ok()) return false; - if (!u().Ok()) return false; - if (!i().Ok()) return false; - if (!b().Ok()) return false; - if (!a().Ok()) return false; - if (!emboss_reserved_anonymous_field_1().Ok()) return false; - if (!e1().Ok()) return false; - if (!IntrinsicSizeInBytes().Ok()) return false; - if (!MaxSizeInBytes().Ok()) return false; - if (!MinSizeInBytes().Ok()) return false; - } - } - { + const auto emboss_reserved_cond = emboss_reserved_local_ok_subexpr_1; if (!emboss_reserved_cond.Known()) return false; if (emboss_reserved_cond.ValueOrDefault()) { if (!a0().Ok()) return false; + if (!s0().Ok()) return false; + if (!l0().Ok()) return false; + if (!h0().Ok()) return false; + + } } + { + const auto emboss_reserved_cond = emboss_reserved_local_ok_subexpr_4; if (!emboss_reserved_cond.Known()) return false; if (emboss_reserved_cond.ValueOrDefault()) { if (!e2().Ok()) return false; + + } } + { + const auto emboss_reserved_cond = emboss_reserved_local_ok_subexpr_5; if (!emboss_reserved_cond.Known()) return false; if (emboss_reserved_cond.ValueOrDefault()) { if (!b2().Ok()) return false; + + } } + { + const auto emboss_reserved_cond = emboss_reserved_local_ok_subexpr_8; if (!emboss_reserved_cond.Known()) return false; if (emboss_reserved_cond.ValueOrDefault()) { if (!e3().Ok()) return false; + + } } + { + const auto emboss_reserved_cond = emboss_reserved_local_ok_subexpr_18; if (!emboss_reserved_cond.Known()) return false; if (emboss_reserved_cond.ValueOrDefault()) { if (!e4().Ok()) return false; + + } } + { + const auto emboss_reserved_cond = emboss_reserved_local_ok_subexpr_23; if (!emboss_reserved_cond.Known()) return false; if (emboss_reserved_cond.ValueOrDefault()) { if (!e5().Ok()) return false; + + } } + { + const auto emboss_reserved_cond = emboss_reserved_local_ok_subexpr_26; if (!emboss_reserved_cond.Known()) return false; if (emboss_reserved_cond.ValueOrDefault()) { if (!e0().Ok()) return false; + + } } + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - [[nodiscard]] ::std::size_t SizeInBytes() const { + ::std::size_t SizeInBytes() const { return static_cast(IntrinsicSizeInBytes().Read()); } - [[nodiscard]] bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericComplexView emboss_reserved_local_other) const { if (!has_s().Known()) return false; @@ -2099,7 +2137,7 @@ class GenericComplexView final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericComplexView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_s().ValueOr(false) && @@ -2300,7 +2338,7 @@ class GenericComplexView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericComplexView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -2965,42 +3003,42 @@ class GenericComplexView final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> s() const; - [[nodiscard]] ::emboss::support::Maybe has_s() const; + ::emboss::support::Maybe has_s() const; public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<64, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 64>> u() const; - [[nodiscard]] ::emboss::support::Maybe has_u() const; + ::emboss::support::Maybe has_u() const; public: - [[nodiscard]] typename ::emboss::prelude::IntView< + typename ::emboss::prelude::IntView< /**/ ::emboss::support::FixedSizeViewParameters<64, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 64>> i() const; - [[nodiscard]] ::emboss::support::Maybe has_i() const; + ::emboss::support::Maybe has_i() const; public: - [[nodiscard]] typename ::emboss::prelude::BcdView< + typename ::emboss::prelude::BcdView< /**/ ::emboss::support::FixedSizeViewParameters<64, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 64>> b() const; - [[nodiscard]] ::emboss::support::Maybe has_b() const; + ::emboss::support::Maybe has_b() const; public: - [[nodiscard]] typename ::emboss::support::GenericArrayView< + typename ::emboss::support::GenericArrayView< typename ::emboss::support::GenericArrayView< typename ::emboss_test::GenericArrayElementView::template OffsetStorageType::template OffsetStorageType> @@ -3011,93 +3049,93 @@ class GenericComplexView final { 8 > a() const; - [[nodiscard]] ::emboss::support::Maybe has_a() const; + ::emboss::support::Maybe has_a() const; private: - [[nodiscard]] typename ::emboss_test::Complex::GenericEmbossReservedAnonymousField1View>, 8>> + typename ::emboss_test::Complex::GenericEmbossReservedAnonymousField1View>, 8>> emboss_reserved_anonymous_field_1() const; - [[nodiscard]] ::emboss::support::Maybe has_emboss_reserved_anonymous_field_1() const; + ::emboss::support::Maybe has_emboss_reserved_anonymous_field_1() const; public: - [[nodiscard]] auto a0() const -> decltype(this->emboss_reserved_anonymous_field_1().a0()) { + auto a0() const -> decltype(this->emboss_reserved_anonymous_field_1().a0()) { return has_a0().ValueOrDefault() ? emboss_reserved_anonymous_field_1().a0() : decltype(this->emboss_reserved_anonymous_field_1().a0())(); } - [[nodiscard]] ::emboss::support::Maybe has_a0() const; + ::emboss::support::Maybe has_a0() const; public: - [[nodiscard]] auto s0() const -> decltype(this->emboss_reserved_anonymous_field_1().s0()) { + auto s0() const -> decltype(this->emboss_reserved_anonymous_field_1().s0()) { return has_s0().ValueOrDefault() ? emboss_reserved_anonymous_field_1().s0() : decltype(this->emboss_reserved_anonymous_field_1().s0())(); } - [[nodiscard]] ::emboss::support::Maybe has_s0() const; + ::emboss::support::Maybe has_s0() const; public: - [[nodiscard]] auto l0() const -> decltype(this->emboss_reserved_anonymous_field_1().l0()) { + auto l0() const -> decltype(this->emboss_reserved_anonymous_field_1().l0()) { return has_l0().ValueOrDefault() ? emboss_reserved_anonymous_field_1().l0() : decltype(this->emboss_reserved_anonymous_field_1().l0())(); } - [[nodiscard]] ::emboss::support::Maybe has_l0() const; + ::emboss::support::Maybe has_l0() const; public: - [[nodiscard]] auto h0() const -> decltype(this->emboss_reserved_anonymous_field_1().h0()) { + auto h0() const -> decltype(this->emboss_reserved_anonymous_field_1().h0()) { return has_h0().ValueOrDefault() ? emboss_reserved_anonymous_field_1().h0() : decltype(this->emboss_reserved_anonymous_field_1().h0())(); } - [[nodiscard]] ::emboss::support::Maybe has_h0() const; + ::emboss::support::Maybe has_h0() const; public: - [[nodiscard]] typename ::emboss_test::GenericArrayElementView> + typename ::emboss_test::GenericArrayElementView> e1() const; - [[nodiscard]] ::emboss::support::Maybe has_e1() const; + ::emboss::support::Maybe has_e1() const; public: - [[nodiscard]] typename ::emboss_test::GenericArrayElementView> + typename ::emboss_test::GenericArrayElementView> e2() const; - [[nodiscard]] ::emboss::support::Maybe has_e2() const; + ::emboss::support::Maybe has_e2() const; public: - [[nodiscard]] typename ::emboss::prelude::BcdView< + typename ::emboss::prelude::BcdView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> b2() const; - [[nodiscard]] ::emboss::support::Maybe has_b2() const; + ::emboss::support::Maybe has_b2() const; public: - [[nodiscard]] typename ::emboss::prelude::IntView< + typename ::emboss::prelude::IntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> e3() const; - [[nodiscard]] ::emboss::support::Maybe has_e3() const; + ::emboss::support::Maybe has_e3() const; public: - [[nodiscard]] typename ::emboss::prelude::IntView< + typename ::emboss::prelude::IntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> e4() const; - [[nodiscard]] ::emboss::support::Maybe has_e4() const; + ::emboss::support::Maybe has_e4() const; public: - [[nodiscard]] typename ::emboss::prelude::IntView< + typename ::emboss::prelude::IntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> e5() const; - [[nodiscard]] ::emboss::support::Maybe has_e5() const; + ::emboss::support::Maybe has_e5() const; public: - [[nodiscard]] typename ::emboss::prelude::IntView< + typename ::emboss::prelude::IntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> e0() const; - [[nodiscard]] ::emboss::support::Maybe has_e0() const; + ::emboss::support::Maybe has_e0() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -3116,17 +3154,17 @@ class GenericComplexView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - [[nodiscard]] ::std::int32_t Read() const { + ::std::int32_t Read() const { EMBOSS_CHECK(view_.has_IntrinsicSizeInBytes().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - [[nodiscard]] ::std::int32_t UncheckedRead() const { + ::std::int32_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - [[nodiscard]] bool Ok() const { + bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -3139,12 +3177,12 @@ class GenericComplexView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } private: - [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { + ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.s(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Product(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(4LL))); @@ -3184,7 +3222,7 @@ class GenericComplexView final { return emboss_reserved_local_subexpr_35; } - [[nodiscard]] static constexpr bool ValueIsOk( + static constexpr bool ValueIsOk( ::std::int32_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -3192,8 +3230,8 @@ class GenericComplexView final { const GenericComplexView view_; }; - [[nodiscard]] EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; - [[nodiscard]] ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; + EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; public: class EmbossReservedDollarVirtualMaxSizeInBytesView final { @@ -3209,9 +3247,9 @@ class GenericComplexView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -3220,13 +3258,13 @@ class GenericComplexView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -3244,9 +3282,9 @@ class GenericComplexView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -3255,13 +3293,13 @@ class GenericComplexView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -3292,7 +3330,7 @@ struct EmbossReservedInternalIsGenericComplexView< }; template -[[nodiscard]] inline GenericComplexView< +inline GenericComplexView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -3307,7 +3345,7 @@ MakeComplexView( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericComplexView> +inline GenericComplexView> MakeComplexView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericComplexView>( @@ -3316,7 +3354,7 @@ MakeComplexView( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericComplexView< +inline GenericComplexView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedComplexView( T *emboss_reserved_local_data, diff --git a/testdata/golden_cpp/condition.emb.h b/testdata/golden_cpp/condition.emb.h index 0fb69e8..b9e001e 100644 --- a/testdata/golden_cpp/condition.emb.h +++ b/testdata/golden_cpp/condition.emb.h @@ -357,50 +357,53 @@ class GenericBasicConditionalView final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; const auto emboss_reserved_local_ok_subexpr_1 = x(); const auto emboss_reserved_local_ok_subexpr_2 = (emboss_reserved_local_ok_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + if (!x().Ok()) return false; + + if (!IntrinsicSizeInBytes().Ok()) return false; + + if (!MaxSizeInBytes().Ok()) return false; + + if (!MinSizeInBytes().Ok()) return false; + { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!x().Ok()) return false; - if (!IntrinsicSizeInBytes().Ok()) return false; - if (!MaxSizeInBytes().Ok()) return false; - if (!MinSizeInBytes().Ok()) return false; - } - } - { + const auto emboss_reserved_switch_discrim = emboss_reserved_local_ok_subexpr_2; if (!emboss_reserved_switch_discrim.Known()) return false; switch (emboss_reserved_switch_discrim.ValueOrDefault()) { case static_cast(0LL): if (!xc().Ok()) return false; break; + + } } + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - [[nodiscard]] ::std::size_t SizeInBytes() const { + ::std::size_t SizeInBytes() const { return static_cast(IntrinsicSizeInBytes().Read()); } - [[nodiscard]] bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericBasicConditionalView emboss_reserved_local_other) const { if (!has_x().Known()) return false; @@ -438,7 +441,7 @@ class GenericBasicConditionalView final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericBasicConditionalView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_x().ValueOr(false) && @@ -485,7 +488,7 @@ class GenericBasicConditionalView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericBasicConditionalView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -618,23 +621,23 @@ class GenericBasicConditionalView final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> x() const; - [[nodiscard]] ::emboss::support::Maybe has_x() const; + ::emboss::support::Maybe has_x() const; public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> xc() const; - [[nodiscard]] ::emboss::support::Maybe has_xc() const; + ::emboss::support::Maybe has_xc() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -653,17 +656,17 @@ class GenericBasicConditionalView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - [[nodiscard]] ::std::int32_t Read() const { + ::std::int32_t Read() const { EMBOSS_CHECK(view_.has_IntrinsicSizeInBytes().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - [[nodiscard]] ::std::int32_t UncheckedRead() const { + ::std::int32_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - [[nodiscard]] bool Ok() const { + bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -676,12 +679,12 @@ class GenericBasicConditionalView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } private: - [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { + ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.x(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(0LL))); @@ -691,7 +694,7 @@ class GenericBasicConditionalView final { return emboss_reserved_local_subexpr_5; } - [[nodiscard]] static constexpr bool ValueIsOk( + static constexpr bool ValueIsOk( ::std::int32_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -699,8 +702,8 @@ class GenericBasicConditionalView final { const GenericBasicConditionalView view_; }; - [[nodiscard]] EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; - [[nodiscard]] ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; + EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; public: class EmbossReservedDollarVirtualMaxSizeInBytesView final { @@ -716,9 +719,9 @@ class GenericBasicConditionalView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -727,13 +730,13 @@ class GenericBasicConditionalView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -751,9 +754,9 @@ class GenericBasicConditionalView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -762,13 +765,13 @@ class GenericBasicConditionalView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -799,7 +802,7 @@ struct EmbossReservedInternalIsGenericBasicConditionalView< }; template -[[nodiscard]] inline GenericBasicConditionalView< +inline GenericBasicConditionalView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -814,7 +817,7 @@ MakeBasicConditionalView( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericBasicConditionalView> +inline GenericBasicConditionalView> MakeBasicConditionalView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericBasicConditionalView>( @@ -823,7 +826,7 @@ MakeBasicConditionalView( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericBasicConditionalView< +inline GenericBasicConditionalView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedBasicConditionalView( T *emboss_reserved_local_data, @@ -889,49 +892,52 @@ class GenericNegativeConditionalView final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; const auto emboss_reserved_local_ok_subexpr_1 = x(); const auto emboss_reserved_local_ok_subexpr_2 = (emboss_reserved_local_ok_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_ok_subexpr_3 = ::emboss::support::NotEqual(emboss_reserved_local_ok_subexpr_2, ::emboss::support::Maybe(static_cast(0LL))); + if (!x().Ok()) return false; + + if (!IntrinsicSizeInBytes().Ok()) return false; + + if (!MaxSizeInBytes().Ok()) return false; + + if (!MinSizeInBytes().Ok()) return false; + { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!x().Ok()) return false; - if (!IntrinsicSizeInBytes().Ok()) return false; - if (!MaxSizeInBytes().Ok()) return false; - if (!MinSizeInBytes().Ok()) return false; - } - } - { + const auto emboss_reserved_cond = emboss_reserved_local_ok_subexpr_3; if (!emboss_reserved_cond.Known()) return false; if (emboss_reserved_cond.ValueOrDefault()) { if (!xc().Ok()) return false; + + } } + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - [[nodiscard]] ::std::size_t SizeInBytes() const { + ::std::size_t SizeInBytes() const { return static_cast(IntrinsicSizeInBytes().Read()); } - [[nodiscard]] bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericNegativeConditionalView emboss_reserved_local_other) const { if (!has_x().Known()) return false; @@ -969,7 +975,7 @@ class GenericNegativeConditionalView final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericNegativeConditionalView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_x().ValueOr(false) && @@ -1016,7 +1022,7 @@ class GenericNegativeConditionalView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericNegativeConditionalView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -1149,23 +1155,23 @@ class GenericNegativeConditionalView final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> x() const; - [[nodiscard]] ::emboss::support::Maybe has_x() const; + ::emboss::support::Maybe has_x() const; public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> xc() const; - [[nodiscard]] ::emboss::support::Maybe has_xc() const; + ::emboss::support::Maybe has_xc() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -1184,17 +1190,17 @@ class GenericNegativeConditionalView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - [[nodiscard]] ::std::int32_t Read() const { + ::std::int32_t Read() const { EMBOSS_CHECK(view_.has_IntrinsicSizeInBytes().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - [[nodiscard]] ::std::int32_t UncheckedRead() const { + ::std::int32_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - [[nodiscard]] bool Ok() const { + bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -1207,12 +1213,12 @@ class GenericNegativeConditionalView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } private: - [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { + ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.x(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::NotEqual(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(0LL))); @@ -1222,7 +1228,7 @@ class GenericNegativeConditionalView final { return emboss_reserved_local_subexpr_5; } - [[nodiscard]] static constexpr bool ValueIsOk( + static constexpr bool ValueIsOk( ::std::int32_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -1230,8 +1236,8 @@ class GenericNegativeConditionalView final { const GenericNegativeConditionalView view_; }; - [[nodiscard]] EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; - [[nodiscard]] ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; + EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; public: class EmbossReservedDollarVirtualMaxSizeInBytesView final { @@ -1247,9 +1253,9 @@ class GenericNegativeConditionalView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -1258,13 +1264,13 @@ class GenericNegativeConditionalView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -1282,9 +1288,9 @@ class GenericNegativeConditionalView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -1293,13 +1299,13 @@ class GenericNegativeConditionalView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -1330,7 +1336,7 @@ struct EmbossReservedInternalIsGenericNegativeConditionalView< }; template -[[nodiscard]] inline GenericNegativeConditionalView< +inline GenericNegativeConditionalView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -1345,7 +1351,7 @@ MakeNegativeConditionalView( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericNegativeConditionalView> +inline GenericNegativeConditionalView> MakeNegativeConditionalView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericNegativeConditionalView>( @@ -1354,7 +1360,7 @@ MakeNegativeConditionalView( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericNegativeConditionalView< +inline GenericNegativeConditionalView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedNegativeConditionalView( T *emboss_reserved_local_data, @@ -1421,52 +1427,56 @@ class GenericConditionalAndUnconditionalOverlappingFinalFieldView final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; const auto emboss_reserved_local_ok_subexpr_1 = x(); const auto emboss_reserved_local_ok_subexpr_2 = (emboss_reserved_local_ok_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + if (!x().Ok()) return false; + + if (!z().Ok()) return false; + + if (!IntrinsicSizeInBytes().Ok()) return false; + + if (!MaxSizeInBytes().Ok()) return false; + + if (!MinSizeInBytes().Ok()) return false; + { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!x().Ok()) return false; - if (!z().Ok()) return false; - if (!IntrinsicSizeInBytes().Ok()) return false; - if (!MaxSizeInBytes().Ok()) return false; - if (!MinSizeInBytes().Ok()) return false; - } - } - { + const auto emboss_reserved_switch_discrim = emboss_reserved_local_ok_subexpr_2; if (!emboss_reserved_switch_discrim.Known()) return false; switch (emboss_reserved_switch_discrim.ValueOrDefault()) { case static_cast(0LL): if (!xc().Ok()) return false; break; + + } } + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { + static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - [[nodiscard]] static constexpr bool SizeIsKnown() { + static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericConditionalAndUnconditionalOverlappingFinalFieldView emboss_reserved_local_other) const { if (!has_x().Known()) return false; @@ -1521,7 +1531,7 @@ class GenericConditionalAndUnconditionalOverlappingFinalFieldView final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericConditionalAndUnconditionalOverlappingFinalFieldView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_x().ValueOr(false) && @@ -1582,7 +1592,7 @@ class GenericConditionalAndUnconditionalOverlappingFinalFieldView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericConditionalAndUnconditionalOverlappingFinalFieldView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -1753,31 +1763,31 @@ class GenericConditionalAndUnconditionalOverlappingFinalFieldView final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> x() const; - [[nodiscard]] ::emboss::support::Maybe has_x() const; + ::emboss::support::Maybe has_x() const; public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> xc() const; - [[nodiscard]] ::emboss::support::Maybe has_xc() const; + ::emboss::support::Maybe has_xc() const; public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> z() const; - [[nodiscard]] ::emboss::support::Maybe has_z() const; + ::emboss::support::Maybe has_z() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -1793,9 +1803,9 @@ class GenericConditionalAndUnconditionalOverlappingFinalFieldView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -1804,13 +1814,13 @@ class GenericConditionalAndUnconditionalOverlappingFinalFieldView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -1828,9 +1838,9 @@ class GenericConditionalAndUnconditionalOverlappingFinalFieldView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -1839,13 +1849,13 @@ class GenericConditionalAndUnconditionalOverlappingFinalFieldView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -1863,9 +1873,9 @@ class GenericConditionalAndUnconditionalOverlappingFinalFieldView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -1874,13 +1884,13 @@ class GenericConditionalAndUnconditionalOverlappingFinalFieldView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -1911,7 +1921,7 @@ struct EmbossReservedInternalIsGenericConditionalAndUnconditionalOverlappingFina }; template -[[nodiscard]] inline GenericConditionalAndUnconditionalOverlappingFinalFieldView< +inline GenericConditionalAndUnconditionalOverlappingFinalFieldView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -1926,7 +1936,7 @@ MakeConditionalAndUnconditionalOverlappingFinalFieldView( T &&emboss_reserved_lo } template -[[nodiscard]] inline GenericConditionalAndUnconditionalOverlappingFinalFieldView> +inline GenericConditionalAndUnconditionalOverlappingFinalFieldView> MakeConditionalAndUnconditionalOverlappingFinalFieldView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericConditionalAndUnconditionalOverlappingFinalFieldView>( @@ -1935,7 +1945,7 @@ MakeConditionalAndUnconditionalOverlappingFinalFieldView( T *emboss_reserved_loc } template -[[nodiscard]] inline GenericConditionalAndUnconditionalOverlappingFinalFieldView< +inline GenericConditionalAndUnconditionalOverlappingFinalFieldView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedConditionalAndUnconditionalOverlappingFinalFieldView( T *emboss_reserved_local_data, @@ -2001,51 +2011,54 @@ class GenericConditionalBasicConditionalFieldFirstView final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; const auto emboss_reserved_local_ok_subexpr_1 = x(); const auto emboss_reserved_local_ok_subexpr_2 = (emboss_reserved_local_ok_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + if (!x().Ok()) return false; + + if (!IntrinsicSizeInBytes().Ok()) return false; + + if (!MaxSizeInBytes().Ok()) return false; + + if (!MinSizeInBytes().Ok()) return false; + { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!x().Ok()) return false; - if (!IntrinsicSizeInBytes().Ok()) return false; - if (!MaxSizeInBytes().Ok()) return false; - if (!MinSizeInBytes().Ok()) return false; - } - } - { + const auto emboss_reserved_switch_discrim = emboss_reserved_local_ok_subexpr_2; if (!emboss_reserved_switch_discrim.Known()) return false; switch (emboss_reserved_switch_discrim.ValueOrDefault()) { case static_cast(0LL): if (!xc().Ok()) return false; break; + + } } + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { + static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - [[nodiscard]] static constexpr bool SizeIsKnown() { + static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericConditionalBasicConditionalFieldFirstView emboss_reserved_local_other) const { if (!has_x().Known()) return false; @@ -2083,7 +2096,7 @@ class GenericConditionalBasicConditionalFieldFirstView final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericConditionalBasicConditionalFieldFirstView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_x().ValueOr(false) && @@ -2130,7 +2143,7 @@ class GenericConditionalBasicConditionalFieldFirstView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericConditionalBasicConditionalFieldFirstView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -2263,23 +2276,23 @@ class GenericConditionalBasicConditionalFieldFirstView final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> x() const; - [[nodiscard]] ::emboss::support::Maybe has_x() const; + ::emboss::support::Maybe has_x() const; public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> xc() const; - [[nodiscard]] ::emboss::support::Maybe has_xc() const; + ::emboss::support::Maybe has_xc() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -2295,9 +2308,9 @@ class GenericConditionalBasicConditionalFieldFirstView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -2306,13 +2319,13 @@ class GenericConditionalBasicConditionalFieldFirstView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -2330,9 +2343,9 @@ class GenericConditionalBasicConditionalFieldFirstView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -2341,13 +2354,13 @@ class GenericConditionalBasicConditionalFieldFirstView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -2365,9 +2378,9 @@ class GenericConditionalBasicConditionalFieldFirstView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -2376,13 +2389,13 @@ class GenericConditionalBasicConditionalFieldFirstView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -2413,7 +2426,7 @@ struct EmbossReservedInternalIsGenericConditionalBasicConditionalFieldFirstView< }; template -[[nodiscard]] inline GenericConditionalBasicConditionalFieldFirstView< +inline GenericConditionalBasicConditionalFieldFirstView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -2428,7 +2441,7 @@ MakeConditionalBasicConditionalFieldFirstView( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericConditionalBasicConditionalFieldFirstView> +inline GenericConditionalBasicConditionalFieldFirstView> MakeConditionalBasicConditionalFieldFirstView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericConditionalBasicConditionalFieldFirstView>( @@ -2437,7 +2450,7 @@ MakeConditionalBasicConditionalFieldFirstView( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericConditionalBasicConditionalFieldFirstView< +inline GenericConditionalBasicConditionalFieldFirstView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedConditionalBasicConditionalFieldFirstView( T *emboss_reserved_local_data, @@ -2504,51 +2517,55 @@ class GenericConditionalAndDynamicLocationView final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; const auto emboss_reserved_local_ok_subexpr_1 = x(); const auto emboss_reserved_local_ok_subexpr_2 = (emboss_reserved_local_ok_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + if (!x().Ok()) return false; + + if (!y().Ok()) return false; + + if (!IntrinsicSizeInBytes().Ok()) return false; + + if (!MaxSizeInBytes().Ok()) return false; + + if (!MinSizeInBytes().Ok()) return false; + { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!x().Ok()) return false; - if (!y().Ok()) return false; - if (!IntrinsicSizeInBytes().Ok()) return false; - if (!MaxSizeInBytes().Ok()) return false; - if (!MinSizeInBytes().Ok()) return false; - } - } - { + const auto emboss_reserved_switch_discrim = emboss_reserved_local_ok_subexpr_2; if (!emboss_reserved_switch_discrim.Known()) return false; switch (emboss_reserved_switch_discrim.ValueOrDefault()) { case static_cast(0LL): if (!xc().Ok()) return false; break; + + } } + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - [[nodiscard]] ::std::size_t SizeInBytes() const { + ::std::size_t SizeInBytes() const { return static_cast(IntrinsicSizeInBytes().Read()); } - [[nodiscard]] bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericConditionalAndDynamicLocationView emboss_reserved_local_other) const { if (!has_x().Known()) return false; @@ -2603,7 +2620,7 @@ class GenericConditionalAndDynamicLocationView final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericConditionalAndDynamicLocationView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_x().ValueOr(false) && @@ -2664,7 +2681,7 @@ class GenericConditionalAndDynamicLocationView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericConditionalAndDynamicLocationView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -2835,31 +2852,31 @@ class GenericConditionalAndDynamicLocationView final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> x() const; - [[nodiscard]] ::emboss::support::Maybe has_x() const; + ::emboss::support::Maybe has_x() const; public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> y() const; - [[nodiscard]] ::emboss::support::Maybe has_y() const; + ::emboss::support::Maybe has_y() const; public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> xc() const; - [[nodiscard]] ::emboss::support::Maybe has_xc() const; + ::emboss::support::Maybe has_xc() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -2878,17 +2895,17 @@ class GenericConditionalAndDynamicLocationView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - [[nodiscard]] ::std::int32_t Read() const { + ::std::int32_t Read() const { EMBOSS_CHECK(view_.has_IntrinsicSizeInBytes().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - [[nodiscard]] ::std::int32_t UncheckedRead() const { + ::std::int32_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - [[nodiscard]] bool Ok() const { + bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -2901,12 +2918,12 @@ class GenericConditionalAndDynamicLocationView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } private: - [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { + ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.x(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(0LL))); @@ -2919,7 +2936,7 @@ class GenericConditionalAndDynamicLocationView final { return emboss_reserved_local_subexpr_8; } - [[nodiscard]] static constexpr bool ValueIsOk( + static constexpr bool ValueIsOk( ::std::int32_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -2927,8 +2944,8 @@ class GenericConditionalAndDynamicLocationView final { const GenericConditionalAndDynamicLocationView view_; }; - [[nodiscard]] EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; - [[nodiscard]] ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; + EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; public: class EmbossReservedDollarVirtualMaxSizeInBytesView final { @@ -2944,9 +2961,9 @@ class GenericConditionalAndDynamicLocationView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -2955,13 +2972,13 @@ class GenericConditionalAndDynamicLocationView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -2979,9 +2996,9 @@ class GenericConditionalAndDynamicLocationView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -2990,13 +3007,13 @@ class GenericConditionalAndDynamicLocationView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -3027,7 +3044,7 @@ struct EmbossReservedInternalIsGenericConditionalAndDynamicLocationView< }; template -[[nodiscard]] inline GenericConditionalAndDynamicLocationView< +inline GenericConditionalAndDynamicLocationView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -3042,7 +3059,7 @@ MakeConditionalAndDynamicLocationView( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericConditionalAndDynamicLocationView> +inline GenericConditionalAndDynamicLocationView> MakeConditionalAndDynamicLocationView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericConditionalAndDynamicLocationView>( @@ -3051,7 +3068,7 @@ MakeConditionalAndDynamicLocationView( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericConditionalAndDynamicLocationView< +inline GenericConditionalAndDynamicLocationView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedConditionalAndDynamicLocationView( T *emboss_reserved_local_data, @@ -3117,51 +3134,54 @@ class GenericConditionUsesMinIntView final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; const auto emboss_reserved_local_ok_subexpr_1 = x(); const auto emboss_reserved_local_ok_subexpr_2 = (emboss_reserved_local_ok_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_ok_subexpr_3 = ::emboss::support::Difference(emboss_reserved_local_ok_subexpr_2, ::emboss::support::Maybe(static_cast(9223372036854775680LL))); + if (!x().Ok()) return false; + + if (!IntrinsicSizeInBytes().Ok()) return false; + + if (!MaxSizeInBytes().Ok()) return false; + + if (!MinSizeInBytes().Ok()) return false; + { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!x().Ok()) return false; - if (!IntrinsicSizeInBytes().Ok()) return false; - if (!MaxSizeInBytes().Ok()) return false; - if (!MinSizeInBytes().Ok()) return false; - } - } - { + const auto emboss_reserved_switch_discrim = emboss_reserved_local_ok_subexpr_3; if (!emboss_reserved_switch_discrim.Known()) return false; switch (emboss_reserved_switch_discrim.ValueOrDefault()) { case static_cast(-9223372036854775807LL - 1): if (!xc().Ok()) return false; break; + + } } + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - [[nodiscard]] ::std::size_t SizeInBytes() const { + ::std::size_t SizeInBytes() const { return static_cast(IntrinsicSizeInBytes().Read()); } - [[nodiscard]] bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericConditionUsesMinIntView emboss_reserved_local_other) const { if (!has_x().Known()) return false; @@ -3199,7 +3219,7 @@ class GenericConditionUsesMinIntView final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericConditionUsesMinIntView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_x().ValueOr(false) && @@ -3246,7 +3266,7 @@ class GenericConditionUsesMinIntView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericConditionUsesMinIntView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -3379,23 +3399,23 @@ class GenericConditionUsesMinIntView final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: - [[nodiscard]] typename ::emboss::prelude::IntView< + typename ::emboss::prelude::IntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> x() const; - [[nodiscard]] ::emboss::support::Maybe has_x() const; + ::emboss::support::Maybe has_x() const; public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> xc() const; - [[nodiscard]] ::emboss::support::Maybe has_xc() const; + ::emboss::support::Maybe has_xc() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -3414,17 +3434,17 @@ class GenericConditionUsesMinIntView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - [[nodiscard]] ::std::int32_t Read() const { + ::std::int32_t Read() const { EMBOSS_CHECK(view_.has_IntrinsicSizeInBytes().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - [[nodiscard]] ::std::int32_t UncheckedRead() const { + ::std::int32_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - [[nodiscard]] bool Ok() const { + bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -3437,12 +3457,12 @@ class GenericConditionUsesMinIntView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } private: - [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { + ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.x(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Difference(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(9223372036854775680LL))); @@ -3453,7 +3473,7 @@ class GenericConditionUsesMinIntView final { return emboss_reserved_local_subexpr_6; } - [[nodiscard]] static constexpr bool ValueIsOk( + static constexpr bool ValueIsOk( ::std::int32_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -3461,8 +3481,8 @@ class GenericConditionUsesMinIntView final { const GenericConditionUsesMinIntView view_; }; - [[nodiscard]] EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; - [[nodiscard]] ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; + EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; public: class EmbossReservedDollarVirtualMaxSizeInBytesView final { @@ -3478,9 +3498,9 @@ class GenericConditionUsesMinIntView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -3489,13 +3509,13 @@ class GenericConditionUsesMinIntView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -3513,9 +3533,9 @@ class GenericConditionUsesMinIntView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -3524,13 +3544,13 @@ class GenericConditionUsesMinIntView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -3561,7 +3581,7 @@ struct EmbossReservedInternalIsGenericConditionUsesMinIntView< }; template -[[nodiscard]] inline GenericConditionUsesMinIntView< +inline GenericConditionUsesMinIntView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -3576,7 +3596,7 @@ MakeConditionUsesMinIntView( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericConditionUsesMinIntView> +inline GenericConditionUsesMinIntView> MakeConditionUsesMinIntView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericConditionUsesMinIntView>( @@ -3585,7 +3605,7 @@ MakeConditionUsesMinIntView( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericConditionUsesMinIntView< +inline GenericConditionUsesMinIntView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedConditionUsesMinIntView( T *emboss_reserved_local_data, @@ -3652,7 +3672,7 @@ class GenericNestedConditionalView final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; const auto emboss_reserved_local_ok_subexpr_1 = x(); @@ -3660,53 +3680,60 @@ class GenericNestedConditionalView final { const auto emboss_reserved_local_ok_subexpr_3 = xc(); const auto emboss_reserved_local_ok_subexpr_4 = (emboss_reserved_local_ok_subexpr_3.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_3.UncheckedRead())) : ::emboss::support::Maybe()); + if (!x().Ok()) return false; + + if (!IntrinsicSizeInBytes().Ok()) return false; + + if (!MaxSizeInBytes().Ok()) return false; + + if (!MinSizeInBytes().Ok()) return false; + { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!x().Ok()) return false; - if (!IntrinsicSizeInBytes().Ok()) return false; - if (!MaxSizeInBytes().Ok()) return false; - if (!MinSizeInBytes().Ok()) return false; - } - } - { + const auto emboss_reserved_switch_discrim = emboss_reserved_local_ok_subexpr_2; if (!emboss_reserved_switch_discrim.Known()) return false; switch (emboss_reserved_switch_discrim.ValueOrDefault()) { case static_cast(0LL): if (!xc().Ok()) return false; break; + + } } + { + const auto emboss_reserved_switch_discrim = emboss_reserved_local_ok_subexpr_4; if (!emboss_reserved_switch_discrim.Known()) return false; switch (emboss_reserved_switch_discrim.ValueOrDefault()) { case static_cast(0LL): if (!xcc().Ok()) return false; break; + + } } + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - [[nodiscard]] ::std::size_t SizeInBytes() const { + ::std::size_t SizeInBytes() const { return static_cast(IntrinsicSizeInBytes().Read()); } - [[nodiscard]] bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericNestedConditionalView emboss_reserved_local_other) const { if (!has_x().Known()) return false; @@ -3761,7 +3788,7 @@ class GenericNestedConditionalView final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericNestedConditionalView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_x().ValueOr(false) && @@ -3822,7 +3849,7 @@ class GenericNestedConditionalView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericNestedConditionalView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -3993,31 +4020,31 @@ class GenericNestedConditionalView final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> x() const; - [[nodiscard]] ::emboss::support::Maybe has_x() const; + ::emboss::support::Maybe has_x() const; public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> xc() const; - [[nodiscard]] ::emboss::support::Maybe has_xc() const; + ::emboss::support::Maybe has_xc() const; public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> xcc() const; - [[nodiscard]] ::emboss::support::Maybe has_xcc() const; + ::emboss::support::Maybe has_xcc() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -4036,17 +4063,17 @@ class GenericNestedConditionalView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - [[nodiscard]] ::std::int32_t Read() const { + ::std::int32_t Read() const { EMBOSS_CHECK(view_.has_IntrinsicSizeInBytes().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - [[nodiscard]] ::std::int32_t UncheckedRead() const { + ::std::int32_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - [[nodiscard]] bool Ok() const { + bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -4059,12 +4086,12 @@ class GenericNestedConditionalView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } private: - [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { + ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.x(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(0LL))); @@ -4078,7 +4105,7 @@ class GenericNestedConditionalView final { return emboss_reserved_local_subexpr_9; } - [[nodiscard]] static constexpr bool ValueIsOk( + static constexpr bool ValueIsOk( ::std::int32_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -4086,8 +4113,8 @@ class GenericNestedConditionalView final { const GenericNestedConditionalView view_; }; - [[nodiscard]] EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; - [[nodiscard]] ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; + EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; public: class EmbossReservedDollarVirtualMaxSizeInBytesView final { @@ -4103,9 +4130,9 @@ class GenericNestedConditionalView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -4114,13 +4141,13 @@ class GenericNestedConditionalView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -4138,9 +4165,9 @@ class GenericNestedConditionalView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -4149,13 +4176,13 @@ class GenericNestedConditionalView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -4186,7 +4213,7 @@ struct EmbossReservedInternalIsGenericNestedConditionalView< }; template -[[nodiscard]] inline GenericNestedConditionalView< +inline GenericNestedConditionalView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -4201,7 +4228,7 @@ MakeNestedConditionalView( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericNestedConditionalView> +inline GenericNestedConditionalView> MakeNestedConditionalView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericNestedConditionalView>( @@ -4210,7 +4237,7 @@ MakeNestedConditionalView( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericNestedConditionalView< +inline GenericNestedConditionalView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedNestedConditionalView( T *emboss_reserved_local_data, @@ -4277,7 +4304,7 @@ class GenericCorrectNestedConditionalView final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; const auto emboss_reserved_local_ok_subexpr_1 = x(); @@ -4288,51 +4315,58 @@ class GenericCorrectNestedConditionalView final { const auto emboss_reserved_local_ok_subexpr_6 = ::emboss::support::Equal(emboss_reserved_local_ok_subexpr_5, ::emboss::support::Maybe(static_cast(0LL))); const auto emboss_reserved_local_ok_subexpr_7 = ::emboss::support::And(emboss_reserved_local_ok_subexpr_3, emboss_reserved_local_ok_subexpr_6); + if (!x().Ok()) return false; + + if (!IntrinsicSizeInBytes().Ok()) return false; + + if (!MaxSizeInBytes().Ok()) return false; + + if (!MinSizeInBytes().Ok()) return false; + { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!x().Ok()) return false; - if (!IntrinsicSizeInBytes().Ok()) return false; - if (!MaxSizeInBytes().Ok()) return false; - if (!MinSizeInBytes().Ok()) return false; - } - } - { + const auto emboss_reserved_switch_discrim = emboss_reserved_local_ok_subexpr_2; if (!emboss_reserved_switch_discrim.Known()) return false; switch (emboss_reserved_switch_discrim.ValueOrDefault()) { case static_cast(0LL): if (!xc().Ok()) return false; break; + + } } + { + const auto emboss_reserved_cond = emboss_reserved_local_ok_subexpr_7; if (!emboss_reserved_cond.Known()) return false; if (emboss_reserved_cond.ValueOrDefault()) { if (!xcc().Ok()) return false; + + } } + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - [[nodiscard]] ::std::size_t SizeInBytes() const { + ::std::size_t SizeInBytes() const { return static_cast(IntrinsicSizeInBytes().Read()); } - [[nodiscard]] bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericCorrectNestedConditionalView emboss_reserved_local_other) const { if (!has_x().Known()) return false; @@ -4387,7 +4421,7 @@ class GenericCorrectNestedConditionalView final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericCorrectNestedConditionalView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_x().ValueOr(false) && @@ -4448,7 +4482,7 @@ class GenericCorrectNestedConditionalView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericCorrectNestedConditionalView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -4619,31 +4653,31 @@ class GenericCorrectNestedConditionalView final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> x() const; - [[nodiscard]] ::emboss::support::Maybe has_x() const; + ::emboss::support::Maybe has_x() const; public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> xc() const; - [[nodiscard]] ::emboss::support::Maybe has_xc() const; + ::emboss::support::Maybe has_xc() const; public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> xcc() const; - [[nodiscard]] ::emboss::support::Maybe has_xcc() const; + ::emboss::support::Maybe has_xcc() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -4662,17 +4696,17 @@ class GenericCorrectNestedConditionalView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - [[nodiscard]] ::std::int32_t Read() const { + ::std::int32_t Read() const { EMBOSS_CHECK(view_.has_IntrinsicSizeInBytes().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - [[nodiscard]] ::std::int32_t UncheckedRead() const { + ::std::int32_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - [[nodiscard]] bool Ok() const { + bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -4685,12 +4719,12 @@ class GenericCorrectNestedConditionalView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } private: - [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { + ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.x(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(0LL))); @@ -4705,7 +4739,7 @@ class GenericCorrectNestedConditionalView final { return emboss_reserved_local_subexpr_10; } - [[nodiscard]] static constexpr bool ValueIsOk( + static constexpr bool ValueIsOk( ::std::int32_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -4713,8 +4747,8 @@ class GenericCorrectNestedConditionalView final { const GenericCorrectNestedConditionalView view_; }; - [[nodiscard]] EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; - [[nodiscard]] ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; + EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; public: class EmbossReservedDollarVirtualMaxSizeInBytesView final { @@ -4730,9 +4764,9 @@ class GenericCorrectNestedConditionalView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -4741,13 +4775,13 @@ class GenericCorrectNestedConditionalView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -4765,9 +4799,9 @@ class GenericCorrectNestedConditionalView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -4776,13 +4810,13 @@ class GenericCorrectNestedConditionalView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -4813,7 +4847,7 @@ struct EmbossReservedInternalIsGenericCorrectNestedConditionalView< }; template -[[nodiscard]] inline GenericCorrectNestedConditionalView< +inline GenericCorrectNestedConditionalView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -4828,7 +4862,7 @@ MakeCorrectNestedConditionalView( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericCorrectNestedConditionalView> +inline GenericCorrectNestedConditionalView> MakeCorrectNestedConditionalView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericCorrectNestedConditionalView>( @@ -4837,7 +4871,7 @@ MakeCorrectNestedConditionalView( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericCorrectNestedConditionalView< +inline GenericCorrectNestedConditionalView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedCorrectNestedConditionalView( T *emboss_reserved_local_data, @@ -4903,47 +4937,50 @@ class GenericAlwaysFalseConditionView final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; + if (!x().Ok()) return false; + + if (!IntrinsicSizeInBytes().Ok()) return false; + + if (!MaxSizeInBytes().Ok()) return false; + + if (!MinSizeInBytes().Ok()) return false; + { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!x().Ok()) return false; - if (!IntrinsicSizeInBytes().Ok()) return false; - if (!MaxSizeInBytes().Ok()) return false; - if (!MinSizeInBytes().Ok()) return false; - } - } - { + const auto emboss_reserved_cond = ::emboss::support::Maybe(false); if (!emboss_reserved_cond.Known()) return false; if (emboss_reserved_cond.ValueOrDefault()) { if (!xc().Ok()) return false; + + } } + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { + static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - [[nodiscard]] static constexpr bool SizeIsKnown() { + static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericAlwaysFalseConditionView emboss_reserved_local_other) const { if (!has_x().Known()) return false; @@ -4981,7 +5018,7 @@ class GenericAlwaysFalseConditionView final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericAlwaysFalseConditionView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_x().ValueOr(false) && @@ -5028,7 +5065,7 @@ class GenericAlwaysFalseConditionView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericAlwaysFalseConditionView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -5161,23 +5198,23 @@ class GenericAlwaysFalseConditionView final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> x() const; - [[nodiscard]] ::emboss::support::Maybe has_x() const; + ::emboss::support::Maybe has_x() const; public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> xc() const; - [[nodiscard]] ::emboss::support::Maybe has_xc() const; + ::emboss::support::Maybe has_xc() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -5193,9 +5230,9 @@ class GenericAlwaysFalseConditionView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -5204,13 +5241,13 @@ class GenericAlwaysFalseConditionView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -5228,9 +5265,9 @@ class GenericAlwaysFalseConditionView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -5239,13 +5276,13 @@ class GenericAlwaysFalseConditionView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -5263,9 +5300,9 @@ class GenericAlwaysFalseConditionView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -5274,13 +5311,13 @@ class GenericAlwaysFalseConditionView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -5311,7 +5348,7 @@ struct EmbossReservedInternalIsGenericAlwaysFalseConditionView< }; template -[[nodiscard]] inline GenericAlwaysFalseConditionView< +inline GenericAlwaysFalseConditionView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -5326,7 +5363,7 @@ MakeAlwaysFalseConditionView( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericAlwaysFalseConditionView> +inline GenericAlwaysFalseConditionView> MakeAlwaysFalseConditionView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericAlwaysFalseConditionView>( @@ -5335,7 +5372,7 @@ MakeAlwaysFalseConditionView( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericAlwaysFalseConditionView< +inline GenericAlwaysFalseConditionView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedAlwaysFalseConditionView( T *emboss_reserved_local_data, @@ -5400,46 +5437,48 @@ class GenericOnlyAlwaysFalseConditionView final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; { + const auto emboss_reserved_cond = ::emboss::support::Maybe(false); if (!emboss_reserved_cond.Known()) return false; if (emboss_reserved_cond.ValueOrDefault()) { if (!xc().Ok()) return false; + + } } - { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!IntrinsicSizeInBytes().Ok()) return false; - if (!MaxSizeInBytes().Ok()) return false; - if (!MinSizeInBytes().Ok()) return false; - } - } + + if (!IntrinsicSizeInBytes().Ok()) return false; + + if (!MaxSizeInBytes().Ok()) return false; + + if (!MinSizeInBytes().Ok()) return false; + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { + static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - [[nodiscard]] static constexpr bool SizeIsKnown() { + static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericOnlyAlwaysFalseConditionView emboss_reserved_local_other) const { if (!has_xc().Known()) return false; @@ -5460,7 +5499,7 @@ class GenericOnlyAlwaysFalseConditionView final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericOnlyAlwaysFalseConditionView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_xc().ValueOr(false) && @@ -5493,7 +5532,7 @@ class GenericOnlyAlwaysFalseConditionView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericOnlyAlwaysFalseConditionView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -5588,15 +5627,15 @@ class GenericOnlyAlwaysFalseConditionView final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> xc() const; - [[nodiscard]] ::emboss::support::Maybe has_xc() const; + ::emboss::support::Maybe has_xc() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -5612,9 +5651,9 @@ class GenericOnlyAlwaysFalseConditionView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -5623,13 +5662,13 @@ class GenericOnlyAlwaysFalseConditionView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -5647,9 +5686,9 @@ class GenericOnlyAlwaysFalseConditionView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -5658,13 +5697,13 @@ class GenericOnlyAlwaysFalseConditionView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -5682,9 +5721,9 @@ class GenericOnlyAlwaysFalseConditionView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -5693,13 +5732,13 @@ class GenericOnlyAlwaysFalseConditionView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -5730,7 +5769,7 @@ struct EmbossReservedInternalIsGenericOnlyAlwaysFalseConditionView< }; template -[[nodiscard]] inline GenericOnlyAlwaysFalseConditionView< +inline GenericOnlyAlwaysFalseConditionView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -5745,7 +5784,7 @@ MakeOnlyAlwaysFalseConditionView( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericOnlyAlwaysFalseConditionView> +inline GenericOnlyAlwaysFalseConditionView> MakeOnlyAlwaysFalseConditionView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericOnlyAlwaysFalseConditionView>( @@ -5754,7 +5793,7 @@ MakeOnlyAlwaysFalseConditionView( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericOnlyAlwaysFalseConditionView< +inline GenericOnlyAlwaysFalseConditionView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedOnlyAlwaysFalseConditionView( T *emboss_reserved_local_data, @@ -5818,44 +5857,42 @@ class GenericEmptyStructView final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; - { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!IntrinsicSizeInBytes().Ok()) return false; - if (!MaxSizeInBytes().Ok()) return false; - if (!MinSizeInBytes().Ok()) return false; - } - } + if (!IntrinsicSizeInBytes().Ok()) return false; + + if (!MaxSizeInBytes().Ok()) return false; + + if (!MinSizeInBytes().Ok()) return false; + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { + static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - [[nodiscard]] static constexpr bool SizeIsKnown() { + static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericEmptyStructView emboss_reserved_local_other) const { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericEmptyStructView emboss_reserved_local_other) const { return true; } @@ -5875,7 +5912,7 @@ class GenericEmptyStructView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericEmptyStructView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -5934,7 +5971,7 @@ class GenericEmptyStructView final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -5950,9 +5987,9 @@ class GenericEmptyStructView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -5961,13 +5998,13 @@ class GenericEmptyStructView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -5985,9 +6022,9 @@ class GenericEmptyStructView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -5996,13 +6033,13 @@ class GenericEmptyStructView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -6020,9 +6057,9 @@ class GenericEmptyStructView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -6031,13 +6068,13 @@ class GenericEmptyStructView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -6068,7 +6105,7 @@ struct EmbossReservedInternalIsGenericEmptyStructView< }; template -[[nodiscard]] inline GenericEmptyStructView< +inline GenericEmptyStructView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -6083,7 +6120,7 @@ MakeEmptyStructView( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericEmptyStructView> +inline GenericEmptyStructView> MakeEmptyStructView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericEmptyStructView>( @@ -6092,7 +6129,7 @@ MakeEmptyStructView( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericEmptyStructView< +inline GenericEmptyStructView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedEmptyStructView( T *emboss_reserved_local_data, @@ -6159,47 +6196,51 @@ class GenericAlwaysFalseConditionDynamicSizeView final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; + if (!x().Ok()) return false; + + if (!y().Ok()) return false; + + if (!IntrinsicSizeInBytes().Ok()) return false; + + if (!MaxSizeInBytes().Ok()) return false; + + if (!MinSizeInBytes().Ok()) return false; + { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!x().Ok()) return false; - if (!y().Ok()) return false; - if (!IntrinsicSizeInBytes().Ok()) return false; - if (!MaxSizeInBytes().Ok()) return false; - if (!MinSizeInBytes().Ok()) return false; - } - } - { + const auto emboss_reserved_cond = ::emboss::support::Maybe(false); if (!emboss_reserved_cond.Known()) return false; if (emboss_reserved_cond.ValueOrDefault()) { if (!xc().Ok()) return false; + + } } + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - [[nodiscard]] ::std::size_t SizeInBytes() const { + ::std::size_t SizeInBytes() const { return static_cast(IntrinsicSizeInBytes().Read()); } - [[nodiscard]] bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericAlwaysFalseConditionDynamicSizeView emboss_reserved_local_other) const { if (!has_x().Known()) return false; @@ -6254,7 +6295,7 @@ class GenericAlwaysFalseConditionDynamicSizeView final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericAlwaysFalseConditionDynamicSizeView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_x().ValueOr(false) && @@ -6315,7 +6356,7 @@ class GenericAlwaysFalseConditionDynamicSizeView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericAlwaysFalseConditionDynamicSizeView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -6486,31 +6527,31 @@ class GenericAlwaysFalseConditionDynamicSizeView final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> x() const; - [[nodiscard]] ::emboss::support::Maybe has_x() const; + ::emboss::support::Maybe has_x() const; public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> y() const; - [[nodiscard]] ::emboss::support::Maybe has_y() const; + ::emboss::support::Maybe has_y() const; public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> xc() const; - [[nodiscard]] ::emboss::support::Maybe has_xc() const; + ::emboss::support::Maybe has_xc() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -6529,17 +6570,17 @@ class GenericAlwaysFalseConditionDynamicSizeView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - [[nodiscard]] ::std::int32_t Read() const { + ::std::int32_t Read() const { EMBOSS_CHECK(view_.has_IntrinsicSizeInBytes().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - [[nodiscard]] ::std::int32_t UncheckedRead() const { + ::std::int32_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - [[nodiscard]] bool Ok() const { + bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -6552,12 +6593,12 @@ class GenericAlwaysFalseConditionDynamicSizeView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } private: - [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { + ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.x(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Sum(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(1LL))); @@ -6567,7 +6608,7 @@ class GenericAlwaysFalseConditionDynamicSizeView final { return emboss_reserved_local_subexpr_5; } - [[nodiscard]] static constexpr bool ValueIsOk( + static constexpr bool ValueIsOk( ::std::int32_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -6575,8 +6616,8 @@ class GenericAlwaysFalseConditionDynamicSizeView final { const GenericAlwaysFalseConditionDynamicSizeView view_; }; - [[nodiscard]] EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; - [[nodiscard]] ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; + EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; public: class EmbossReservedDollarVirtualMaxSizeInBytesView final { @@ -6592,9 +6633,9 @@ class GenericAlwaysFalseConditionDynamicSizeView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -6603,13 +6644,13 @@ class GenericAlwaysFalseConditionDynamicSizeView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -6627,9 +6668,9 @@ class GenericAlwaysFalseConditionDynamicSizeView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -6638,13 +6679,13 @@ class GenericAlwaysFalseConditionDynamicSizeView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -6675,7 +6716,7 @@ struct EmbossReservedInternalIsGenericAlwaysFalseConditionDynamicSizeView< }; template -[[nodiscard]] inline GenericAlwaysFalseConditionDynamicSizeView< +inline GenericAlwaysFalseConditionDynamicSizeView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -6690,7 +6731,7 @@ MakeAlwaysFalseConditionDynamicSizeView( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericAlwaysFalseConditionDynamicSizeView> +inline GenericAlwaysFalseConditionDynamicSizeView> MakeAlwaysFalseConditionDynamicSizeView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericAlwaysFalseConditionDynamicSizeView>( @@ -6699,7 +6740,7 @@ MakeAlwaysFalseConditionDynamicSizeView( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericAlwaysFalseConditionDynamicSizeView< +inline GenericAlwaysFalseConditionDynamicSizeView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedAlwaysFalseConditionDynamicSizeView( T *emboss_reserved_local_data, @@ -6766,52 +6807,56 @@ class GenericConditionDoesNotContributeToSizeView final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; const auto emboss_reserved_local_ok_subexpr_1 = x(); const auto emboss_reserved_local_ok_subexpr_2 = (emboss_reserved_local_ok_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + if (!x().Ok()) return false; + + if (!y().Ok()) return false; + + if (!IntrinsicSizeInBytes().Ok()) return false; + + if (!MaxSizeInBytes().Ok()) return false; + + if (!MinSizeInBytes().Ok()) return false; + { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!x().Ok()) return false; - if (!y().Ok()) return false; - if (!IntrinsicSizeInBytes().Ok()) return false; - if (!MaxSizeInBytes().Ok()) return false; - if (!MinSizeInBytes().Ok()) return false; - } - } - { + const auto emboss_reserved_switch_discrim = emboss_reserved_local_ok_subexpr_2; if (!emboss_reserved_switch_discrim.Known()) return false; switch (emboss_reserved_switch_discrim.ValueOrDefault()) { case static_cast(0LL): if (!xc().Ok()) return false; break; + + } } + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { + static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - [[nodiscard]] static constexpr bool SizeIsKnown() { + static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericConditionDoesNotContributeToSizeView emboss_reserved_local_other) const { if (!has_x().Known()) return false; @@ -6866,7 +6911,7 @@ class GenericConditionDoesNotContributeToSizeView final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericConditionDoesNotContributeToSizeView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_x().ValueOr(false) && @@ -6927,7 +6972,7 @@ class GenericConditionDoesNotContributeToSizeView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericConditionDoesNotContributeToSizeView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -7098,31 +7143,31 @@ class GenericConditionDoesNotContributeToSizeView final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> x() const; - [[nodiscard]] ::emboss::support::Maybe has_x() const; + ::emboss::support::Maybe has_x() const; public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> xc() const; - [[nodiscard]] ::emboss::support::Maybe has_xc() const; + ::emboss::support::Maybe has_xc() const; public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> y() const; - [[nodiscard]] ::emboss::support::Maybe has_y() const; + ::emboss::support::Maybe has_y() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -7138,9 +7183,9 @@ class GenericConditionDoesNotContributeToSizeView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -7149,13 +7194,13 @@ class GenericConditionDoesNotContributeToSizeView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -7173,9 +7218,9 @@ class GenericConditionDoesNotContributeToSizeView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -7184,13 +7229,13 @@ class GenericConditionDoesNotContributeToSizeView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -7208,9 +7253,9 @@ class GenericConditionDoesNotContributeToSizeView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -7219,13 +7264,13 @@ class GenericConditionDoesNotContributeToSizeView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -7256,7 +7301,7 @@ struct EmbossReservedInternalIsGenericConditionDoesNotContributeToSizeView< }; template -[[nodiscard]] inline GenericConditionDoesNotContributeToSizeView< +inline GenericConditionDoesNotContributeToSizeView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -7271,7 +7316,7 @@ MakeConditionDoesNotContributeToSizeView( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericConditionDoesNotContributeToSizeView> +inline GenericConditionDoesNotContributeToSizeView> MakeConditionDoesNotContributeToSizeView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericConditionDoesNotContributeToSizeView>( @@ -7280,7 +7325,7 @@ MakeConditionDoesNotContributeToSizeView( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericConditionDoesNotContributeToSizeView< +inline GenericConditionDoesNotContributeToSizeView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedConditionDoesNotContributeToSizeView( T *emboss_reserved_local_data, @@ -7434,58 +7479,65 @@ class GenericEnumConditionView final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; const auto emboss_reserved_local_ok_subexpr_1 = x(); const auto emboss_reserved_local_ok_subexpr_2 = (emboss_reserved_local_ok_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_ok_subexpr_3 = ::emboss::support::GreaterThan(emboss_reserved_local_ok_subexpr_2, ::emboss::support::Maybe(static_cast(0))); + if (!x().Ok()) return false; + + if (!IntrinsicSizeInBytes().Ok()) return false; + + if (!MaxSizeInBytes().Ok()) return false; + + if (!MinSizeInBytes().Ok()) return false; + { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!x().Ok()) return false; - if (!IntrinsicSizeInBytes().Ok()) return false; - if (!MaxSizeInBytes().Ok()) return false; - if (!MinSizeInBytes().Ok()) return false; - } - } - { + const auto emboss_reserved_switch_discrim = emboss_reserved_local_ok_subexpr_2; if (!emboss_reserved_switch_discrim.Known()) return false; switch (emboss_reserved_switch_discrim.ValueOrDefault()) { case static_cast(1): if (!xc().Ok()) return false; break; + + } } + { + const auto emboss_reserved_cond = emboss_reserved_local_ok_subexpr_3; if (!emboss_reserved_cond.Known()) return false; if (emboss_reserved_cond.ValueOrDefault()) { if (!xc2().Ok()) return false; + + } } + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - [[nodiscard]] ::std::size_t SizeInBytes() const { + ::std::size_t SizeInBytes() const { return static_cast(IntrinsicSizeInBytes().Read()); } - [[nodiscard]] bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericEnumConditionView emboss_reserved_local_other) const { if (!has_x().Known()) return false; @@ -7540,7 +7592,7 @@ class GenericEnumConditionView final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericEnumConditionView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_x().ValueOr(false) && @@ -7601,7 +7653,7 @@ class GenericEnumConditionView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericEnumConditionView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -7772,32 +7824,32 @@ class GenericEnumConditionView final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: - [[nodiscard]] typename ::emboss::support::EnumView< + typename ::emboss::support::EnumView< /**/ ::emboss::test::OnOff, ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> x() const; - [[nodiscard]] ::emboss::support::Maybe has_x() const; + ::emboss::support::Maybe has_x() const; public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> xc() const; - [[nodiscard]] ::emboss::support::Maybe has_xc() const; + ::emboss::support::Maybe has_xc() const; public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> xc2() const; - [[nodiscard]] ::emboss::support::Maybe has_xc2() const; + ::emboss::support::Maybe has_xc2() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -7816,17 +7868,17 @@ class GenericEnumConditionView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - [[nodiscard]] ::std::int32_t Read() const { + ::std::int32_t Read() const { EMBOSS_CHECK(view_.has_IntrinsicSizeInBytes().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - [[nodiscard]] ::std::int32_t UncheckedRead() const { + ::std::int32_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - [[nodiscard]] bool Ok() const { + bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -7839,12 +7891,12 @@ class GenericEnumConditionView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } private: - [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { + ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.x(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(1))); @@ -7856,7 +7908,7 @@ class GenericEnumConditionView final { return emboss_reserved_local_subexpr_7; } - [[nodiscard]] static constexpr bool ValueIsOk( + static constexpr bool ValueIsOk( ::std::int32_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -7864,8 +7916,8 @@ class GenericEnumConditionView final { const GenericEnumConditionView view_; }; - [[nodiscard]] EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; - [[nodiscard]] ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; + EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; public: class EmbossReservedDollarVirtualMaxSizeInBytesView final { @@ -7881,9 +7933,9 @@ class GenericEnumConditionView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -7892,13 +7944,13 @@ class GenericEnumConditionView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -7916,9 +7968,9 @@ class GenericEnumConditionView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -7927,13 +7979,13 @@ class GenericEnumConditionView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -7964,7 +8016,7 @@ struct EmbossReservedInternalIsGenericEnumConditionView< }; template -[[nodiscard]] inline GenericEnumConditionView< +inline GenericEnumConditionView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -7979,7 +8031,7 @@ MakeEnumConditionView( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericEnumConditionView> +inline GenericEnumConditionView> MakeEnumConditionView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericEnumConditionView>( @@ -7988,7 +8040,7 @@ MakeEnumConditionView( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericEnumConditionView< +inline GenericEnumConditionView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedEnumConditionView( T *emboss_reserved_local_data, @@ -8054,49 +8106,52 @@ class GenericNegativeEnumConditionView final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; const auto emboss_reserved_local_ok_subexpr_1 = x(); const auto emboss_reserved_local_ok_subexpr_2 = (emboss_reserved_local_ok_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_ok_subexpr_3 = ::emboss::support::NotEqual(emboss_reserved_local_ok_subexpr_2, ::emboss::support::Maybe(static_cast(1))); + if (!x().Ok()) return false; + + if (!IntrinsicSizeInBytes().Ok()) return false; + + if (!MaxSizeInBytes().Ok()) return false; + + if (!MinSizeInBytes().Ok()) return false; + { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!x().Ok()) return false; - if (!IntrinsicSizeInBytes().Ok()) return false; - if (!MaxSizeInBytes().Ok()) return false; - if (!MinSizeInBytes().Ok()) return false; - } - } - { + const auto emboss_reserved_cond = emboss_reserved_local_ok_subexpr_3; if (!emboss_reserved_cond.Known()) return false; if (emboss_reserved_cond.ValueOrDefault()) { if (!xc().Ok()) return false; + + } } + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - [[nodiscard]] ::std::size_t SizeInBytes() const { + ::std::size_t SizeInBytes() const { return static_cast(IntrinsicSizeInBytes().Read()); } - [[nodiscard]] bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericNegativeEnumConditionView emboss_reserved_local_other) const { if (!has_x().Known()) return false; @@ -8134,7 +8189,7 @@ class GenericNegativeEnumConditionView final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericNegativeEnumConditionView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_x().ValueOr(false) && @@ -8181,7 +8236,7 @@ class GenericNegativeEnumConditionView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericNegativeEnumConditionView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -8314,24 +8369,24 @@ class GenericNegativeEnumConditionView final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: - [[nodiscard]] typename ::emboss::support::EnumView< + typename ::emboss::support::EnumView< /**/ ::emboss::test::OnOff, ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> x() const; - [[nodiscard]] ::emboss::support::Maybe has_x() const; + ::emboss::support::Maybe has_x() const; public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> xc() const; - [[nodiscard]] ::emboss::support::Maybe has_xc() const; + ::emboss::support::Maybe has_xc() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -8350,17 +8405,17 @@ class GenericNegativeEnumConditionView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - [[nodiscard]] ::std::int32_t Read() const { + ::std::int32_t Read() const { EMBOSS_CHECK(view_.has_IntrinsicSizeInBytes().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - [[nodiscard]] ::std::int32_t UncheckedRead() const { + ::std::int32_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - [[nodiscard]] bool Ok() const { + bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -8373,12 +8428,12 @@ class GenericNegativeEnumConditionView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } private: - [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { + ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.x(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::NotEqual(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(1))); @@ -8388,7 +8443,7 @@ class GenericNegativeEnumConditionView final { return emboss_reserved_local_subexpr_5; } - [[nodiscard]] static constexpr bool ValueIsOk( + static constexpr bool ValueIsOk( ::std::int32_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -8396,8 +8451,8 @@ class GenericNegativeEnumConditionView final { const GenericNegativeEnumConditionView view_; }; - [[nodiscard]] EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; - [[nodiscard]] ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; + EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; public: class EmbossReservedDollarVirtualMaxSizeInBytesView final { @@ -8413,9 +8468,9 @@ class GenericNegativeEnumConditionView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -8424,13 +8479,13 @@ class GenericNegativeEnumConditionView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -8448,9 +8503,9 @@ class GenericNegativeEnumConditionView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -8459,13 +8514,13 @@ class GenericNegativeEnumConditionView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -8496,7 +8551,7 @@ struct EmbossReservedInternalIsGenericNegativeEnumConditionView< }; template -[[nodiscard]] inline GenericNegativeEnumConditionView< +inline GenericNegativeEnumConditionView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -8511,7 +8566,7 @@ MakeNegativeEnumConditionView( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericNegativeEnumConditionView> +inline GenericNegativeEnumConditionView> MakeNegativeEnumConditionView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericNegativeEnumConditionView>( @@ -8520,7 +8575,7 @@ MakeNegativeEnumConditionView( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericNegativeEnumConditionView< +inline GenericNegativeEnumConditionView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedNegativeEnumConditionView( T *emboss_reserved_local_data, @@ -8586,49 +8641,52 @@ class GenericLessThanConditionView final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; const auto emboss_reserved_local_ok_subexpr_1 = x(); const auto emboss_reserved_local_ok_subexpr_2 = (emboss_reserved_local_ok_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_ok_subexpr_3 = ::emboss::support::LessThan(emboss_reserved_local_ok_subexpr_2, ::emboss::support::Maybe(static_cast(5LL))); + if (!x().Ok()) return false; + + if (!IntrinsicSizeInBytes().Ok()) return false; + + if (!MaxSizeInBytes().Ok()) return false; + + if (!MinSizeInBytes().Ok()) return false; + { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!x().Ok()) return false; - if (!IntrinsicSizeInBytes().Ok()) return false; - if (!MaxSizeInBytes().Ok()) return false; - if (!MinSizeInBytes().Ok()) return false; - } - } - { + const auto emboss_reserved_cond = emboss_reserved_local_ok_subexpr_3; if (!emboss_reserved_cond.Known()) return false; if (emboss_reserved_cond.ValueOrDefault()) { if (!xc().Ok()) return false; + + } } + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - [[nodiscard]] ::std::size_t SizeInBytes() const { + ::std::size_t SizeInBytes() const { return static_cast(IntrinsicSizeInBytes().Read()); } - [[nodiscard]] bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericLessThanConditionView emboss_reserved_local_other) const { if (!has_x().Known()) return false; @@ -8666,7 +8724,7 @@ class GenericLessThanConditionView final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericLessThanConditionView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_x().ValueOr(false) && @@ -8713,7 +8771,7 @@ class GenericLessThanConditionView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericLessThanConditionView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -8846,23 +8904,23 @@ class GenericLessThanConditionView final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> x() const; - [[nodiscard]] ::emboss::support::Maybe has_x() const; + ::emboss::support::Maybe has_x() const; public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> xc() const; - [[nodiscard]] ::emboss::support::Maybe has_xc() const; + ::emboss::support::Maybe has_xc() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -8881,17 +8939,17 @@ class GenericLessThanConditionView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - [[nodiscard]] ::std::int32_t Read() const { + ::std::int32_t Read() const { EMBOSS_CHECK(view_.has_IntrinsicSizeInBytes().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - [[nodiscard]] ::std::int32_t UncheckedRead() const { + ::std::int32_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - [[nodiscard]] bool Ok() const { + bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -8904,12 +8962,12 @@ class GenericLessThanConditionView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } private: - [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { + ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.x(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::LessThan(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(5LL))); @@ -8919,7 +8977,7 @@ class GenericLessThanConditionView final { return emboss_reserved_local_subexpr_5; } - [[nodiscard]] static constexpr bool ValueIsOk( + static constexpr bool ValueIsOk( ::std::int32_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -8927,8 +8985,8 @@ class GenericLessThanConditionView final { const GenericLessThanConditionView view_; }; - [[nodiscard]] EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; - [[nodiscard]] ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; + EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; public: class EmbossReservedDollarVirtualMaxSizeInBytesView final { @@ -8944,9 +9002,9 @@ class GenericLessThanConditionView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -8955,13 +9013,13 @@ class GenericLessThanConditionView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -8979,9 +9037,9 @@ class GenericLessThanConditionView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -8990,13 +9048,13 @@ class GenericLessThanConditionView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -9027,7 +9085,7 @@ struct EmbossReservedInternalIsGenericLessThanConditionView< }; template -[[nodiscard]] inline GenericLessThanConditionView< +inline GenericLessThanConditionView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -9042,7 +9100,7 @@ MakeLessThanConditionView( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericLessThanConditionView> +inline GenericLessThanConditionView> MakeLessThanConditionView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericLessThanConditionView>( @@ -9051,7 +9109,7 @@ MakeLessThanConditionView( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericLessThanConditionView< +inline GenericLessThanConditionView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedLessThanConditionView( T *emboss_reserved_local_data, @@ -9117,49 +9175,52 @@ class GenericLessThanOrEqualConditionView final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; const auto emboss_reserved_local_ok_subexpr_1 = x(); const auto emboss_reserved_local_ok_subexpr_2 = (emboss_reserved_local_ok_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_ok_subexpr_3 = ::emboss::support::LessThanOrEqual(emboss_reserved_local_ok_subexpr_2, ::emboss::support::Maybe(static_cast(5LL))); + if (!x().Ok()) return false; + + if (!IntrinsicSizeInBytes().Ok()) return false; + + if (!MaxSizeInBytes().Ok()) return false; + + if (!MinSizeInBytes().Ok()) return false; + { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!x().Ok()) return false; - if (!IntrinsicSizeInBytes().Ok()) return false; - if (!MaxSizeInBytes().Ok()) return false; - if (!MinSizeInBytes().Ok()) return false; - } - } - { + const auto emboss_reserved_cond = emboss_reserved_local_ok_subexpr_3; if (!emboss_reserved_cond.Known()) return false; if (emboss_reserved_cond.ValueOrDefault()) { if (!xc().Ok()) return false; + + } } + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - [[nodiscard]] ::std::size_t SizeInBytes() const { + ::std::size_t SizeInBytes() const { return static_cast(IntrinsicSizeInBytes().Read()); } - [[nodiscard]] bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericLessThanOrEqualConditionView emboss_reserved_local_other) const { if (!has_x().Known()) return false; @@ -9197,7 +9258,7 @@ class GenericLessThanOrEqualConditionView final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericLessThanOrEqualConditionView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_x().ValueOr(false) && @@ -9244,7 +9305,7 @@ class GenericLessThanOrEqualConditionView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericLessThanOrEqualConditionView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -9377,23 +9438,23 @@ class GenericLessThanOrEqualConditionView final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> x() const; - [[nodiscard]] ::emboss::support::Maybe has_x() const; + ::emboss::support::Maybe has_x() const; public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> xc() const; - [[nodiscard]] ::emboss::support::Maybe has_xc() const; + ::emboss::support::Maybe has_xc() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -9412,17 +9473,17 @@ class GenericLessThanOrEqualConditionView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - [[nodiscard]] ::std::int32_t Read() const { + ::std::int32_t Read() const { EMBOSS_CHECK(view_.has_IntrinsicSizeInBytes().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - [[nodiscard]] ::std::int32_t UncheckedRead() const { + ::std::int32_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - [[nodiscard]] bool Ok() const { + bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -9435,12 +9496,12 @@ class GenericLessThanOrEqualConditionView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } private: - [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { + ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.x(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::LessThanOrEqual(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(5LL))); @@ -9450,7 +9511,7 @@ class GenericLessThanOrEqualConditionView final { return emboss_reserved_local_subexpr_5; } - [[nodiscard]] static constexpr bool ValueIsOk( + static constexpr bool ValueIsOk( ::std::int32_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -9458,8 +9519,8 @@ class GenericLessThanOrEqualConditionView final { const GenericLessThanOrEqualConditionView view_; }; - [[nodiscard]] EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; - [[nodiscard]] ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; + EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; public: class EmbossReservedDollarVirtualMaxSizeInBytesView final { @@ -9475,9 +9536,9 @@ class GenericLessThanOrEqualConditionView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -9486,13 +9547,13 @@ class GenericLessThanOrEqualConditionView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -9510,9 +9571,9 @@ class GenericLessThanOrEqualConditionView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -9521,13 +9582,13 @@ class GenericLessThanOrEqualConditionView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -9558,7 +9619,7 @@ struct EmbossReservedInternalIsGenericLessThanOrEqualConditionView< }; template -[[nodiscard]] inline GenericLessThanOrEqualConditionView< +inline GenericLessThanOrEqualConditionView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -9573,7 +9634,7 @@ MakeLessThanOrEqualConditionView( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericLessThanOrEqualConditionView> +inline GenericLessThanOrEqualConditionView> MakeLessThanOrEqualConditionView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericLessThanOrEqualConditionView>( @@ -9582,7 +9643,7 @@ MakeLessThanOrEqualConditionView( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericLessThanOrEqualConditionView< +inline GenericLessThanOrEqualConditionView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedLessThanOrEqualConditionView( T *emboss_reserved_local_data, @@ -9648,49 +9709,52 @@ class GenericGreaterThanOrEqualConditionView final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; const auto emboss_reserved_local_ok_subexpr_1 = x(); const auto emboss_reserved_local_ok_subexpr_2 = (emboss_reserved_local_ok_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_ok_subexpr_3 = ::emboss::support::GreaterThanOrEqual(emboss_reserved_local_ok_subexpr_2, ::emboss::support::Maybe(static_cast(5LL))); + if (!x().Ok()) return false; + + if (!IntrinsicSizeInBytes().Ok()) return false; + + if (!MaxSizeInBytes().Ok()) return false; + + if (!MinSizeInBytes().Ok()) return false; + { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!x().Ok()) return false; - if (!IntrinsicSizeInBytes().Ok()) return false; - if (!MaxSizeInBytes().Ok()) return false; - if (!MinSizeInBytes().Ok()) return false; - } - } - { + const auto emboss_reserved_cond = emboss_reserved_local_ok_subexpr_3; if (!emboss_reserved_cond.Known()) return false; if (emboss_reserved_cond.ValueOrDefault()) { if (!xc().Ok()) return false; + + } } + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - [[nodiscard]] ::std::size_t SizeInBytes() const { + ::std::size_t SizeInBytes() const { return static_cast(IntrinsicSizeInBytes().Read()); } - [[nodiscard]] bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericGreaterThanOrEqualConditionView emboss_reserved_local_other) const { if (!has_x().Known()) return false; @@ -9728,7 +9792,7 @@ class GenericGreaterThanOrEqualConditionView final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericGreaterThanOrEqualConditionView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_x().ValueOr(false) && @@ -9775,7 +9839,7 @@ class GenericGreaterThanOrEqualConditionView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericGreaterThanOrEqualConditionView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -9908,23 +9972,23 @@ class GenericGreaterThanOrEqualConditionView final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> x() const; - [[nodiscard]] ::emboss::support::Maybe has_x() const; + ::emboss::support::Maybe has_x() const; public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> xc() const; - [[nodiscard]] ::emboss::support::Maybe has_xc() const; + ::emboss::support::Maybe has_xc() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -9943,17 +10007,17 @@ class GenericGreaterThanOrEqualConditionView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - [[nodiscard]] ::std::int32_t Read() const { + ::std::int32_t Read() const { EMBOSS_CHECK(view_.has_IntrinsicSizeInBytes().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - [[nodiscard]] ::std::int32_t UncheckedRead() const { + ::std::int32_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - [[nodiscard]] bool Ok() const { + bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -9966,12 +10030,12 @@ class GenericGreaterThanOrEqualConditionView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } private: - [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { + ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.x(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::GreaterThanOrEqual(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(5LL))); @@ -9981,7 +10045,7 @@ class GenericGreaterThanOrEqualConditionView final { return emboss_reserved_local_subexpr_5; } - [[nodiscard]] static constexpr bool ValueIsOk( + static constexpr bool ValueIsOk( ::std::int32_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -9989,8 +10053,8 @@ class GenericGreaterThanOrEqualConditionView final { const GenericGreaterThanOrEqualConditionView view_; }; - [[nodiscard]] EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; - [[nodiscard]] ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; + EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; public: class EmbossReservedDollarVirtualMaxSizeInBytesView final { @@ -10006,9 +10070,9 @@ class GenericGreaterThanOrEqualConditionView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -10017,13 +10081,13 @@ class GenericGreaterThanOrEqualConditionView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -10041,9 +10105,9 @@ class GenericGreaterThanOrEqualConditionView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -10052,13 +10116,13 @@ class GenericGreaterThanOrEqualConditionView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -10089,7 +10153,7 @@ struct EmbossReservedInternalIsGenericGreaterThanOrEqualConditionView< }; template -[[nodiscard]] inline GenericGreaterThanOrEqualConditionView< +inline GenericGreaterThanOrEqualConditionView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -10104,7 +10168,7 @@ MakeGreaterThanOrEqualConditionView( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericGreaterThanOrEqualConditionView> +inline GenericGreaterThanOrEqualConditionView> MakeGreaterThanOrEqualConditionView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericGreaterThanOrEqualConditionView>( @@ -10113,7 +10177,7 @@ MakeGreaterThanOrEqualConditionView( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericGreaterThanOrEqualConditionView< +inline GenericGreaterThanOrEqualConditionView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedGreaterThanOrEqualConditionView( T *emboss_reserved_local_data, @@ -10179,49 +10243,52 @@ class GenericGreaterThanConditionView final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; const auto emboss_reserved_local_ok_subexpr_1 = x(); const auto emboss_reserved_local_ok_subexpr_2 = (emboss_reserved_local_ok_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_ok_subexpr_3 = ::emboss::support::GreaterThan(emboss_reserved_local_ok_subexpr_2, ::emboss::support::Maybe(static_cast(5LL))); + if (!x().Ok()) return false; + + if (!IntrinsicSizeInBytes().Ok()) return false; + + if (!MaxSizeInBytes().Ok()) return false; + + if (!MinSizeInBytes().Ok()) return false; + { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!x().Ok()) return false; - if (!IntrinsicSizeInBytes().Ok()) return false; - if (!MaxSizeInBytes().Ok()) return false; - if (!MinSizeInBytes().Ok()) return false; - } - } - { + const auto emboss_reserved_cond = emboss_reserved_local_ok_subexpr_3; if (!emboss_reserved_cond.Known()) return false; if (emboss_reserved_cond.ValueOrDefault()) { if (!xc().Ok()) return false; + + } } + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - [[nodiscard]] ::std::size_t SizeInBytes() const { + ::std::size_t SizeInBytes() const { return static_cast(IntrinsicSizeInBytes().Read()); } - [[nodiscard]] bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericGreaterThanConditionView emboss_reserved_local_other) const { if (!has_x().Known()) return false; @@ -10259,7 +10326,7 @@ class GenericGreaterThanConditionView final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericGreaterThanConditionView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_x().ValueOr(false) && @@ -10306,7 +10373,7 @@ class GenericGreaterThanConditionView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericGreaterThanConditionView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -10439,23 +10506,23 @@ class GenericGreaterThanConditionView final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> x() const; - [[nodiscard]] ::emboss::support::Maybe has_x() const; + ::emboss::support::Maybe has_x() const; public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> xc() const; - [[nodiscard]] ::emboss::support::Maybe has_xc() const; + ::emboss::support::Maybe has_xc() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -10474,17 +10541,17 @@ class GenericGreaterThanConditionView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - [[nodiscard]] ::std::int32_t Read() const { + ::std::int32_t Read() const { EMBOSS_CHECK(view_.has_IntrinsicSizeInBytes().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - [[nodiscard]] ::std::int32_t UncheckedRead() const { + ::std::int32_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - [[nodiscard]] bool Ok() const { + bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -10497,12 +10564,12 @@ class GenericGreaterThanConditionView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } private: - [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { + ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.x(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::GreaterThan(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(5LL))); @@ -10512,7 +10579,7 @@ class GenericGreaterThanConditionView final { return emboss_reserved_local_subexpr_5; } - [[nodiscard]] static constexpr bool ValueIsOk( + static constexpr bool ValueIsOk( ::std::int32_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -10520,8 +10587,8 @@ class GenericGreaterThanConditionView final { const GenericGreaterThanConditionView view_; }; - [[nodiscard]] EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; - [[nodiscard]] ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; + EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; public: class EmbossReservedDollarVirtualMaxSizeInBytesView final { @@ -10537,9 +10604,9 @@ class GenericGreaterThanConditionView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -10548,13 +10615,13 @@ class GenericGreaterThanConditionView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -10572,9 +10639,9 @@ class GenericGreaterThanConditionView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -10583,13 +10650,13 @@ class GenericGreaterThanConditionView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -10620,7 +10687,7 @@ struct EmbossReservedInternalIsGenericGreaterThanConditionView< }; template -[[nodiscard]] inline GenericGreaterThanConditionView< +inline GenericGreaterThanConditionView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -10635,7 +10702,7 @@ MakeGreaterThanConditionView( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericGreaterThanConditionView> +inline GenericGreaterThanConditionView> MakeGreaterThanConditionView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericGreaterThanConditionView>( @@ -10644,7 +10711,7 @@ MakeGreaterThanConditionView( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericGreaterThanConditionView< +inline GenericGreaterThanConditionView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedGreaterThanConditionView( T *emboss_reserved_local_data, @@ -10711,7 +10778,7 @@ class GenericRangeConditionView final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; const auto emboss_reserved_local_ok_subexpr_1 = x(); @@ -10724,43 +10791,47 @@ class GenericRangeConditionView final { const auto emboss_reserved_local_ok_subexpr_8 = ::emboss::support::LessThan(emboss_reserved_local_ok_subexpr_5, ::emboss::support::Maybe(static_cast(10LL))); const auto emboss_reserved_local_ok_subexpr_9 = ::emboss::support::And(emboss_reserved_local_ok_subexpr_7, emboss_reserved_local_ok_subexpr_8); + if (!x().Ok()) return false; + + if (!y().Ok()) return false; + + if (!IntrinsicSizeInBytes().Ok()) return false; + + if (!MaxSizeInBytes().Ok()) return false; + + if (!MinSizeInBytes().Ok()) return false; + { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!x().Ok()) return false; - if (!y().Ok()) return false; - if (!IntrinsicSizeInBytes().Ok()) return false; - if (!MaxSizeInBytes().Ok()) return false; - if (!MinSizeInBytes().Ok()) return false; - } - } - { + const auto emboss_reserved_cond = emboss_reserved_local_ok_subexpr_9; if (!emboss_reserved_cond.Known()) return false; if (emboss_reserved_cond.ValueOrDefault()) { if (!xc().Ok()) return false; + + } } + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - [[nodiscard]] ::std::size_t SizeInBytes() const { + ::std::size_t SizeInBytes() const { return static_cast(IntrinsicSizeInBytes().Read()); } - [[nodiscard]] bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericRangeConditionView emboss_reserved_local_other) const { if (!has_x().Known()) return false; @@ -10815,7 +10886,7 @@ class GenericRangeConditionView final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericRangeConditionView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_x().ValueOr(false) && @@ -10876,7 +10947,7 @@ class GenericRangeConditionView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericRangeConditionView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -11047,31 +11118,31 @@ class GenericRangeConditionView final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> x() const; - [[nodiscard]] ::emboss::support::Maybe has_x() const; + ::emboss::support::Maybe has_x() const; public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> y() const; - [[nodiscard]] ::emboss::support::Maybe has_y() const; + ::emboss::support::Maybe has_y() const; public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> xc() const; - [[nodiscard]] ::emboss::support::Maybe has_xc() const; + ::emboss::support::Maybe has_xc() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -11090,17 +11161,17 @@ class GenericRangeConditionView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - [[nodiscard]] ::std::int32_t Read() const { + ::std::int32_t Read() const { EMBOSS_CHECK(view_.has_IntrinsicSizeInBytes().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - [[nodiscard]] ::std::int32_t UncheckedRead() const { + ::std::int32_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - [[nodiscard]] bool Ok() const { + bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -11113,12 +11184,12 @@ class GenericRangeConditionView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } private: - [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { + ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.x(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::LessThan(::emboss::support::Maybe(static_cast(5LL)), emboss_reserved_local_subexpr_2); @@ -11134,7 +11205,7 @@ class GenericRangeConditionView final { return emboss_reserved_local_subexpr_11; } - [[nodiscard]] static constexpr bool ValueIsOk( + static constexpr bool ValueIsOk( ::std::int32_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -11142,8 +11213,8 @@ class GenericRangeConditionView final { const GenericRangeConditionView view_; }; - [[nodiscard]] EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; - [[nodiscard]] ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; + EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; public: class EmbossReservedDollarVirtualMaxSizeInBytesView final { @@ -11159,9 +11230,9 @@ class GenericRangeConditionView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -11170,13 +11241,13 @@ class GenericRangeConditionView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -11194,9 +11265,9 @@ class GenericRangeConditionView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -11205,13 +11276,13 @@ class GenericRangeConditionView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -11242,7 +11313,7 @@ struct EmbossReservedInternalIsGenericRangeConditionView< }; template -[[nodiscard]] inline GenericRangeConditionView< +inline GenericRangeConditionView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -11257,7 +11328,7 @@ MakeRangeConditionView( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericRangeConditionView> +inline GenericRangeConditionView> MakeRangeConditionView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericRangeConditionView>( @@ -11266,7 +11337,7 @@ MakeRangeConditionView( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericRangeConditionView< +inline GenericRangeConditionView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedRangeConditionView( T *emboss_reserved_local_data, @@ -11333,7 +11404,7 @@ class GenericReverseRangeConditionView final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; const auto emboss_reserved_local_ok_subexpr_1 = y(); @@ -11346,43 +11417,47 @@ class GenericReverseRangeConditionView final { const auto emboss_reserved_local_ok_subexpr_8 = ::emboss::support::GreaterThan(emboss_reserved_local_ok_subexpr_5, ::emboss::support::Maybe(static_cast(5LL))); const auto emboss_reserved_local_ok_subexpr_9 = ::emboss::support::And(emboss_reserved_local_ok_subexpr_7, emboss_reserved_local_ok_subexpr_8); + if (!x().Ok()) return false; + + if (!y().Ok()) return false; + + if (!IntrinsicSizeInBytes().Ok()) return false; + + if (!MaxSizeInBytes().Ok()) return false; + + if (!MinSizeInBytes().Ok()) return false; + { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!x().Ok()) return false; - if (!y().Ok()) return false; - if (!IntrinsicSizeInBytes().Ok()) return false; - if (!MaxSizeInBytes().Ok()) return false; - if (!MinSizeInBytes().Ok()) return false; - } - } - { + const auto emboss_reserved_cond = emboss_reserved_local_ok_subexpr_9; if (!emboss_reserved_cond.Known()) return false; if (emboss_reserved_cond.ValueOrDefault()) { if (!xc().Ok()) return false; + + } } + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - [[nodiscard]] ::std::size_t SizeInBytes() const { + ::std::size_t SizeInBytes() const { return static_cast(IntrinsicSizeInBytes().Read()); } - [[nodiscard]] bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericReverseRangeConditionView emboss_reserved_local_other) const { if (!has_x().Known()) return false; @@ -11437,7 +11512,7 @@ class GenericReverseRangeConditionView final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericReverseRangeConditionView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_x().ValueOr(false) && @@ -11498,7 +11573,7 @@ class GenericReverseRangeConditionView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericReverseRangeConditionView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -11669,31 +11744,31 @@ class GenericReverseRangeConditionView final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> x() const; - [[nodiscard]] ::emboss::support::Maybe has_x() const; + ::emboss::support::Maybe has_x() const; public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> y() const; - [[nodiscard]] ::emboss::support::Maybe has_y() const; + ::emboss::support::Maybe has_y() const; public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> xc() const; - [[nodiscard]] ::emboss::support::Maybe has_xc() const; + ::emboss::support::Maybe has_xc() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -11712,17 +11787,17 @@ class GenericReverseRangeConditionView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - [[nodiscard]] ::std::int32_t Read() const { + ::std::int32_t Read() const { EMBOSS_CHECK(view_.has_IntrinsicSizeInBytes().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - [[nodiscard]] ::std::int32_t UncheckedRead() const { + ::std::int32_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - [[nodiscard]] bool Ok() const { + bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -11735,12 +11810,12 @@ class GenericReverseRangeConditionView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } private: - [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { + ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.y(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::GreaterThan(::emboss::support::Maybe(static_cast(10LL)), emboss_reserved_local_subexpr_2); @@ -11756,7 +11831,7 @@ class GenericReverseRangeConditionView final { return emboss_reserved_local_subexpr_11; } - [[nodiscard]] static constexpr bool ValueIsOk( + static constexpr bool ValueIsOk( ::std::int32_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -11764,8 +11839,8 @@ class GenericReverseRangeConditionView final { const GenericReverseRangeConditionView view_; }; - [[nodiscard]] EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; - [[nodiscard]] ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; + EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; public: class EmbossReservedDollarVirtualMaxSizeInBytesView final { @@ -11781,9 +11856,9 @@ class GenericReverseRangeConditionView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -11792,13 +11867,13 @@ class GenericReverseRangeConditionView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -11816,9 +11891,9 @@ class GenericReverseRangeConditionView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -11827,13 +11902,13 @@ class GenericReverseRangeConditionView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -11864,7 +11939,7 @@ struct EmbossReservedInternalIsGenericReverseRangeConditionView< }; template -[[nodiscard]] inline GenericReverseRangeConditionView< +inline GenericReverseRangeConditionView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -11879,7 +11954,7 @@ MakeReverseRangeConditionView( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericReverseRangeConditionView> +inline GenericReverseRangeConditionView> MakeReverseRangeConditionView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericReverseRangeConditionView>( @@ -11888,7 +11963,7 @@ MakeReverseRangeConditionView( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericReverseRangeConditionView< +inline GenericReverseRangeConditionView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedReverseRangeConditionView( T *emboss_reserved_local_data, @@ -11955,7 +12030,7 @@ class GenericAndConditionView final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; const auto emboss_reserved_local_ok_subexpr_1 = x(); @@ -11966,43 +12041,47 @@ class GenericAndConditionView final { const auto emboss_reserved_local_ok_subexpr_6 = ::emboss::support::Equal(emboss_reserved_local_ok_subexpr_5, ::emboss::support::Maybe(static_cast(5LL))); const auto emboss_reserved_local_ok_subexpr_7 = ::emboss::support::And(emboss_reserved_local_ok_subexpr_3, emboss_reserved_local_ok_subexpr_6); + if (!x().Ok()) return false; + + if (!y().Ok()) return false; + + if (!IntrinsicSizeInBytes().Ok()) return false; + + if (!MaxSizeInBytes().Ok()) return false; + + if (!MinSizeInBytes().Ok()) return false; + { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!x().Ok()) return false; - if (!y().Ok()) return false; - if (!IntrinsicSizeInBytes().Ok()) return false; - if (!MaxSizeInBytes().Ok()) return false; - if (!MinSizeInBytes().Ok()) return false; - } - } - { + const auto emboss_reserved_cond = emboss_reserved_local_ok_subexpr_7; if (!emboss_reserved_cond.Known()) return false; if (emboss_reserved_cond.ValueOrDefault()) { if (!xc().Ok()) return false; + + } } + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - [[nodiscard]] ::std::size_t SizeInBytes() const { + ::std::size_t SizeInBytes() const { return static_cast(IntrinsicSizeInBytes().Read()); } - [[nodiscard]] bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericAndConditionView emboss_reserved_local_other) const { if (!has_x().Known()) return false; @@ -12057,7 +12136,7 @@ class GenericAndConditionView final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericAndConditionView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_x().ValueOr(false) && @@ -12118,7 +12197,7 @@ class GenericAndConditionView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericAndConditionView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -12289,31 +12368,31 @@ class GenericAndConditionView final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> x() const; - [[nodiscard]] ::emboss::support::Maybe has_x() const; + ::emboss::support::Maybe has_x() const; public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> y() const; - [[nodiscard]] ::emboss::support::Maybe has_y() const; + ::emboss::support::Maybe has_y() const; public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> xc() const; - [[nodiscard]] ::emboss::support::Maybe has_xc() const; + ::emboss::support::Maybe has_xc() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -12332,17 +12411,17 @@ class GenericAndConditionView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - [[nodiscard]] ::std::int32_t Read() const { + ::std::int32_t Read() const { EMBOSS_CHECK(view_.has_IntrinsicSizeInBytes().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - [[nodiscard]] ::std::int32_t UncheckedRead() const { + ::std::int32_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - [[nodiscard]] bool Ok() const { + bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -12355,12 +12434,12 @@ class GenericAndConditionView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } private: - [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { + ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.x(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(5LL))); @@ -12374,7 +12453,7 @@ class GenericAndConditionView final { return emboss_reserved_local_subexpr_9; } - [[nodiscard]] static constexpr bool ValueIsOk( + static constexpr bool ValueIsOk( ::std::int32_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -12382,8 +12461,8 @@ class GenericAndConditionView final { const GenericAndConditionView view_; }; - [[nodiscard]] EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; - [[nodiscard]] ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; + EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; public: class EmbossReservedDollarVirtualMaxSizeInBytesView final { @@ -12399,9 +12478,9 @@ class GenericAndConditionView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -12410,13 +12489,13 @@ class GenericAndConditionView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -12434,9 +12513,9 @@ class GenericAndConditionView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -12445,13 +12524,13 @@ class GenericAndConditionView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -12482,7 +12561,7 @@ struct EmbossReservedInternalIsGenericAndConditionView< }; template -[[nodiscard]] inline GenericAndConditionView< +inline GenericAndConditionView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -12497,7 +12576,7 @@ MakeAndConditionView( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericAndConditionView> +inline GenericAndConditionView> MakeAndConditionView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericAndConditionView>( @@ -12506,7 +12585,7 @@ MakeAndConditionView( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericAndConditionView< +inline GenericAndConditionView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedAndConditionView( T *emboss_reserved_local_data, @@ -12573,7 +12652,7 @@ class GenericOrConditionView final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; const auto emboss_reserved_local_ok_subexpr_1 = x(); @@ -12584,43 +12663,47 @@ class GenericOrConditionView final { const auto emboss_reserved_local_ok_subexpr_6 = ::emboss::support::Equal(emboss_reserved_local_ok_subexpr_5, ::emboss::support::Maybe(static_cast(5LL))); const auto emboss_reserved_local_ok_subexpr_7 = ::emboss::support::Or(emboss_reserved_local_ok_subexpr_3, emboss_reserved_local_ok_subexpr_6); + if (!x().Ok()) return false; + + if (!y().Ok()) return false; + + if (!IntrinsicSizeInBytes().Ok()) return false; + + if (!MaxSizeInBytes().Ok()) return false; + + if (!MinSizeInBytes().Ok()) return false; + { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!x().Ok()) return false; - if (!y().Ok()) return false; - if (!IntrinsicSizeInBytes().Ok()) return false; - if (!MaxSizeInBytes().Ok()) return false; - if (!MinSizeInBytes().Ok()) return false; - } - } - { + const auto emboss_reserved_cond = emboss_reserved_local_ok_subexpr_7; if (!emboss_reserved_cond.Known()) return false; if (emboss_reserved_cond.ValueOrDefault()) { if (!xc().Ok()) return false; + + } } + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - [[nodiscard]] ::std::size_t SizeInBytes() const { + ::std::size_t SizeInBytes() const { return static_cast(IntrinsicSizeInBytes().Read()); } - [[nodiscard]] bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericOrConditionView emboss_reserved_local_other) const { if (!has_x().Known()) return false; @@ -12675,7 +12758,7 @@ class GenericOrConditionView final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericOrConditionView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_x().ValueOr(false) && @@ -12736,7 +12819,7 @@ class GenericOrConditionView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericOrConditionView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -12907,31 +12990,31 @@ class GenericOrConditionView final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> x() const; - [[nodiscard]] ::emboss::support::Maybe has_x() const; + ::emboss::support::Maybe has_x() const; public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> y() const; - [[nodiscard]] ::emboss::support::Maybe has_y() const; + ::emboss::support::Maybe has_y() const; public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> xc() const; - [[nodiscard]] ::emboss::support::Maybe has_xc() const; + ::emboss::support::Maybe has_xc() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -12950,17 +13033,17 @@ class GenericOrConditionView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - [[nodiscard]] ::std::int32_t Read() const { + ::std::int32_t Read() const { EMBOSS_CHECK(view_.has_IntrinsicSizeInBytes().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - [[nodiscard]] ::std::int32_t UncheckedRead() const { + ::std::int32_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - [[nodiscard]] bool Ok() const { + bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -12973,12 +13056,12 @@ class GenericOrConditionView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } private: - [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { + ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.x(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(5LL))); @@ -12992,7 +13075,7 @@ class GenericOrConditionView final { return emboss_reserved_local_subexpr_9; } - [[nodiscard]] static constexpr bool ValueIsOk( + static constexpr bool ValueIsOk( ::std::int32_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -13000,8 +13083,8 @@ class GenericOrConditionView final { const GenericOrConditionView view_; }; - [[nodiscard]] EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; - [[nodiscard]] ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; + EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; public: class EmbossReservedDollarVirtualMaxSizeInBytesView final { @@ -13017,9 +13100,9 @@ class GenericOrConditionView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -13028,13 +13111,13 @@ class GenericOrConditionView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -13052,9 +13135,9 @@ class GenericOrConditionView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -13063,13 +13146,13 @@ class GenericOrConditionView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -13100,7 +13183,7 @@ struct EmbossReservedInternalIsGenericOrConditionView< }; template -[[nodiscard]] inline GenericOrConditionView< +inline GenericOrConditionView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -13115,7 +13198,7 @@ MakeOrConditionView( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericOrConditionView> +inline GenericOrConditionView> MakeOrConditionView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericOrConditionView>( @@ -13124,7 +13207,7 @@ MakeOrConditionView( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericOrConditionView< +inline GenericOrConditionView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedOrConditionView( T *emboss_reserved_local_data, @@ -13279,7 +13362,7 @@ class GenericChoiceConditionView final { using Field = ::emboss::test::ChoiceCondition::Field; - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; const auto emboss_reserved_local_ok_subexpr_1 = field(); @@ -13291,46 +13374,51 @@ class GenericChoiceConditionView final { const auto emboss_reserved_local_ok_subexpr_7 = (emboss_reserved_local_ok_subexpr_6.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_6.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_ok_subexpr_8 = ::emboss::support::Choice(emboss_reserved_local_ok_subexpr_3, emboss_reserved_local_ok_subexpr_5, emboss_reserved_local_ok_subexpr_7); + if (!field().Ok()) return false; + + if (!x().Ok()) return false; + + if (!y().Ok()) return false; + + if (!IntrinsicSizeInBytes().Ok()) return false; + + if (!MaxSizeInBytes().Ok()) return false; + + if (!MinSizeInBytes().Ok()) return false; + { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!field().Ok()) return false; - if (!x().Ok()) return false; - if (!y().Ok()) return false; - if (!IntrinsicSizeInBytes().Ok()) return false; - if (!MaxSizeInBytes().Ok()) return false; - if (!MinSizeInBytes().Ok()) return false; - } - } - { + const auto emboss_reserved_switch_discrim = emboss_reserved_local_ok_subexpr_8; if (!emboss_reserved_switch_discrim.Known()) return false; switch (emboss_reserved_switch_discrim.ValueOrDefault()) { case static_cast(5LL): if (!xyc().Ok()) return false; break; + + } } + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - [[nodiscard]] ::std::size_t SizeInBytes() const { + ::std::size_t SizeInBytes() const { return static_cast(IntrinsicSizeInBytes().Read()); } - [[nodiscard]] bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericChoiceConditionView emboss_reserved_local_other) const { if (!has_field().Known()) return false; @@ -13402,7 +13490,7 @@ class GenericChoiceConditionView final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericChoiceConditionView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_field().ValueOr(false) && @@ -13477,7 +13565,7 @@ class GenericChoiceConditionView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericChoiceConditionView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -13686,40 +13774,40 @@ class GenericChoiceConditionView final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: - [[nodiscard]] typename ::emboss::support::EnumView< + typename ::emboss::support::EnumView< /**/ ::emboss::test::ChoiceCondition::Field, ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> field() const; - [[nodiscard]] ::emboss::support::Maybe has_field() const; + ::emboss::support::Maybe has_field() const; public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> x() const; - [[nodiscard]] ::emboss::support::Maybe has_x() const; + ::emboss::support::Maybe has_x() const; public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> y() const; - [[nodiscard]] ::emboss::support::Maybe has_y() const; + ::emboss::support::Maybe has_y() const; public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> xyc() const; - [[nodiscard]] ::emboss::support::Maybe has_xyc() const; + ::emboss::support::Maybe has_xyc() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -13738,17 +13826,17 @@ class GenericChoiceConditionView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - [[nodiscard]] ::std::int32_t Read() const { + ::std::int32_t Read() const { EMBOSS_CHECK(view_.has_IntrinsicSizeInBytes().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - [[nodiscard]] ::std::int32_t UncheckedRead() const { + ::std::int32_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - [[nodiscard]] bool Ok() const { + bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -13761,12 +13849,12 @@ class GenericChoiceConditionView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } private: - [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { + ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.field(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(1))); @@ -13782,7 +13870,7 @@ class GenericChoiceConditionView final { return emboss_reserved_local_subexpr_11; } - [[nodiscard]] static constexpr bool ValueIsOk( + static constexpr bool ValueIsOk( ::std::int32_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -13790,8 +13878,8 @@ class GenericChoiceConditionView final { const GenericChoiceConditionView view_; }; - [[nodiscard]] EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; - [[nodiscard]] ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; + EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; public: class EmbossReservedDollarVirtualMaxSizeInBytesView final { @@ -13807,9 +13895,9 @@ class GenericChoiceConditionView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -13818,13 +13906,13 @@ class GenericChoiceConditionView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -13842,9 +13930,9 @@ class GenericChoiceConditionView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -13853,13 +13941,13 @@ class GenericChoiceConditionView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -13890,7 +13978,7 @@ struct EmbossReservedInternalIsGenericChoiceConditionView< }; template -[[nodiscard]] inline GenericChoiceConditionView< +inline GenericChoiceConditionView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -13905,7 +13993,7 @@ MakeChoiceConditionView( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericChoiceConditionView> +inline GenericChoiceConditionView> MakeChoiceConditionView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericChoiceConditionView>( @@ -13914,7 +14002,7 @@ MakeChoiceConditionView( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericChoiceConditionView< +inline GenericChoiceConditionView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedChoiceConditionView( T *emboss_reserved_local_data, @@ -13986,41 +14074,41 @@ class GenericEmbossReservedAnonymousField3View final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; - { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!has_top().Ok()) return false; - if (!has_bottom().Ok()) return false; - if (!IntrinsicSizeInBits().Ok()) return false; - if (!MaxSizeInBits().Ok()) return false; - if (!MinSizeInBits().Ok()) return false; - } - } + if (!has_top().Ok()) return false; + + if (!has_bottom().Ok()) return false; + + if (!IntrinsicSizeInBits().Ok()) return false; + + if (!MaxSizeInBits().Ok()) return false; + + if (!MinSizeInBits().Ok()) return false; + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBits().Ok() && backing_.SizeInBits() >= static_cast( IntrinsicSizeInBits().UncheckedRead()); } - [[nodiscard]] static constexpr ::std::size_t SizeInBits() { + static constexpr ::std::size_t SizeInBits() { return static_cast(IntrinsicSizeInBits().Read()); } - [[nodiscard]] static constexpr bool SizeIsKnown() { + static constexpr bool SizeIsKnown() { return IntrinsicSizeInBits().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericEmbossReservedAnonymousField3View emboss_reserved_local_other) const { if (!has_has_top().Known()) return false; @@ -14058,7 +14146,7 @@ class GenericEmbossReservedAnonymousField3View final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericEmbossReservedAnonymousField3View emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_has_top().ValueOr(false) && @@ -14105,7 +14193,7 @@ class GenericEmbossReservedAnonymousField3View final { emboss_reserved_local_other.IntrinsicSizeInBits().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericEmbossReservedAnonymousField3View emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -14238,23 +14326,23 @@ class GenericEmbossReservedAnonymousField3View final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, typename Storage::template OffsetStorageType> has_top() const; - [[nodiscard]] ::emboss::support::Maybe has_has_top() const; + ::emboss::support::Maybe has_has_top() const; public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, typename Storage::template OffsetStorageType> has_bottom() const; - [[nodiscard]] ::emboss::support::Maybe has_has_bottom() const; + ::emboss::support::Maybe has_has_bottom() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBitsView final { @@ -14270,9 +14358,9 @@ class GenericEmbossReservedAnonymousField3View final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBitsView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -14281,13 +14369,13 @@ class GenericEmbossReservedAnonymousField3View final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBitsView IntrinsicSizeInBits() { + static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBitsView IntrinsicSizeInBits() { return EmbossReservedDollarVirtualIntrinsicSizeInBitsView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBits() { + static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBits() { return ::emboss::support::Maybe(true); } @@ -14305,9 +14393,9 @@ class GenericEmbossReservedAnonymousField3View final { default; ~EmbossReservedDollarVirtualMaxSizeInBitsView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -14316,13 +14404,13 @@ class GenericEmbossReservedAnonymousField3View final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBitsView MaxSizeInBits() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBitsView MaxSizeInBits() { return EmbossReservedDollarVirtualMaxSizeInBitsView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBits() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBits() { return ::emboss::support::Maybe(true); } @@ -14340,9 +14428,9 @@ class GenericEmbossReservedAnonymousField3View final { default; ~EmbossReservedDollarVirtualMinSizeInBitsView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -14351,13 +14439,13 @@ class GenericEmbossReservedAnonymousField3View final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBitsView MinSizeInBits() { + static constexpr EmbossReservedDollarVirtualMinSizeInBitsView MinSizeInBits() { return EmbossReservedDollarVirtualMinSizeInBitsView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBits() { + static constexpr ::emboss::support::Maybe has_MinSizeInBits() { return ::emboss::support::Maybe(true); } @@ -14388,7 +14476,7 @@ struct EmbossReservedInternalIsGenericEmbossReservedAnonymousField3View< }; template -[[nodiscard]] inline GenericEmbossReservedAnonymousField3View< +inline GenericEmbossReservedAnonymousField3View< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -14403,7 +14491,7 @@ MakeEmbossReservedAnonymousField3View( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericEmbossReservedAnonymousField3View> +inline GenericEmbossReservedAnonymousField3View> MakeEmbossReservedAnonymousField3View( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericEmbossReservedAnonymousField3View>( @@ -14412,7 +14500,7 @@ MakeEmbossReservedAnonymousField3View( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericEmbossReservedAnonymousField3View< +inline GenericEmbossReservedAnonymousField3View< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedEmbossReservedAnonymousField3View( T *emboss_reserved_local_data, @@ -14473,49 +14561,53 @@ class GenericContainsBitsView final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; const auto emboss_reserved_local_ok_subexpr_1 = ::emboss::support::And(::emboss::support::Maybe(true), ::emboss::support::Maybe(true)); + if (!emboss_reserved_anonymous_field_3().Ok()) return false; + + if (!IntrinsicSizeInBytes().Ok()) return false; + + if (!MaxSizeInBytes().Ok()) return false; + + if (!MinSizeInBytes().Ok()) return false; + { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!emboss_reserved_anonymous_field_3().Ok()) return false; - if (!IntrinsicSizeInBytes().Ok()) return false; - if (!MaxSizeInBytes().Ok()) return false; - if (!MinSizeInBytes().Ok()) return false; - } - } - { + const auto emboss_reserved_cond = emboss_reserved_local_ok_subexpr_1; if (!emboss_reserved_cond.Known()) return false; if (emboss_reserved_cond.ValueOrDefault()) { if (!has_top().Ok()) return false; + if (!has_bottom().Ok()) return false; + + } } + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { + static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - [[nodiscard]] static constexpr bool SizeIsKnown() { + static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericContainsBitsView emboss_reserved_local_other) const { if (!has_emboss_reserved_anonymous_field_3().Known()) return false; @@ -14536,7 +14628,7 @@ class GenericContainsBitsView final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericContainsBitsView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_emboss_reserved_anonymous_field_3().ValueOr(false) && @@ -14569,7 +14661,7 @@ class GenericContainsBitsView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericContainsBitsView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -14702,27 +14794,27 @@ class GenericContainsBitsView final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } private: - [[nodiscard]] typename ::emboss::test::ContainsBits::GenericEmbossReservedAnonymousField3View>, 8>> + typename ::emboss::test::ContainsBits::GenericEmbossReservedAnonymousField3View>, 8>> emboss_reserved_anonymous_field_3() const; - [[nodiscard]] ::emboss::support::Maybe has_emboss_reserved_anonymous_field_3() const; + ::emboss::support::Maybe has_emboss_reserved_anonymous_field_3() const; public: - [[nodiscard]] auto has_top() const -> decltype(this->emboss_reserved_anonymous_field_3().has_top()) { + auto has_top() const -> decltype(this->emboss_reserved_anonymous_field_3().has_top()) { return has_has_top().ValueOrDefault() ? emboss_reserved_anonymous_field_3().has_top() : decltype(this->emboss_reserved_anonymous_field_3().has_top())(); } - [[nodiscard]] ::emboss::support::Maybe has_has_top() const; + ::emboss::support::Maybe has_has_top() const; public: - [[nodiscard]] auto has_bottom() const -> decltype(this->emboss_reserved_anonymous_field_3().has_bottom()) { + auto has_bottom() const -> decltype(this->emboss_reserved_anonymous_field_3().has_bottom()) { return has_has_bottom().ValueOrDefault() ? emboss_reserved_anonymous_field_3().has_bottom() : decltype(this->emboss_reserved_anonymous_field_3().has_bottom())(); } - [[nodiscard]] ::emboss::support::Maybe has_has_bottom() const; + ::emboss::support::Maybe has_has_bottom() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -14738,9 +14830,9 @@ class GenericContainsBitsView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -14749,13 +14841,13 @@ class GenericContainsBitsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -14773,9 +14865,9 @@ class GenericContainsBitsView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -14784,13 +14876,13 @@ class GenericContainsBitsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -14808,9 +14900,9 @@ class GenericContainsBitsView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -14819,13 +14911,13 @@ class GenericContainsBitsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -14856,7 +14948,7 @@ struct EmbossReservedInternalIsGenericContainsBitsView< }; template -[[nodiscard]] inline GenericContainsBitsView< +inline GenericContainsBitsView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -14871,7 +14963,7 @@ MakeContainsBitsView( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericContainsBitsView> +inline GenericContainsBitsView> MakeContainsBitsView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericContainsBitsView>( @@ -14880,7 +14972,7 @@ MakeContainsBitsView( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericContainsBitsView< +inline GenericContainsBitsView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedContainsBitsView( T *emboss_reserved_local_data, @@ -14946,50 +15038,53 @@ class GenericContainsContainsBitsView final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; const auto emboss_reserved_local_ok_subexpr_1 = condition().has_top(); const auto emboss_reserved_local_ok_subexpr_2 = (emboss_reserved_local_ok_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + if (!condition().Ok()) return false; + + if (!IntrinsicSizeInBytes().Ok()) return false; + + if (!MaxSizeInBytes().Ok()) return false; + + if (!MinSizeInBytes().Ok()) return false; + { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!condition().Ok()) return false; - if (!IntrinsicSizeInBytes().Ok()) return false; - if (!MaxSizeInBytes().Ok()) return false; - if (!MinSizeInBytes().Ok()) return false; - } - } - { + const auto emboss_reserved_switch_discrim = emboss_reserved_local_ok_subexpr_2; if (!emboss_reserved_switch_discrim.Known()) return false; switch (emboss_reserved_switch_discrim.ValueOrDefault()) { case static_cast(1LL): if (!top().Ok()) return false; break; + + } } + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - [[nodiscard]] ::std::size_t SizeInBytes() const { + ::std::size_t SizeInBytes() const { return static_cast(IntrinsicSizeInBytes().Read()); } - [[nodiscard]] bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericContainsContainsBitsView emboss_reserved_local_other) const { if (!has_condition().Known()) return false; @@ -15027,7 +15122,7 @@ class GenericContainsContainsBitsView final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericContainsContainsBitsView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_condition().ValueOr(false) && @@ -15074,7 +15169,7 @@ class GenericContainsContainsBitsView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericContainsContainsBitsView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -15207,21 +15302,21 @@ class GenericContainsContainsBitsView final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: - [[nodiscard]] typename ::emboss::test::GenericContainsBitsView> + typename ::emboss::test::GenericContainsBitsView> condition() const; - [[nodiscard]] ::emboss::support::Maybe has_condition() const; + ::emboss::support::Maybe has_condition() const; public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> top() const; - [[nodiscard]] ::emboss::support::Maybe has_top() const; + ::emboss::support::Maybe has_top() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -15240,17 +15335,17 @@ class GenericContainsContainsBitsView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - [[nodiscard]] ::std::int32_t Read() const { + ::std::int32_t Read() const { EMBOSS_CHECK(view_.has_IntrinsicSizeInBytes().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - [[nodiscard]] ::std::int32_t UncheckedRead() const { + ::std::int32_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - [[nodiscard]] bool Ok() const { + bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -15263,12 +15358,12 @@ class GenericContainsContainsBitsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } private: - [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { + ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.condition().has_top(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(1LL))); @@ -15278,7 +15373,7 @@ class GenericContainsContainsBitsView final { return emboss_reserved_local_subexpr_5; } - [[nodiscard]] static constexpr bool ValueIsOk( + static constexpr bool ValueIsOk( ::std::int32_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -15286,8 +15381,8 @@ class GenericContainsContainsBitsView final { const GenericContainsContainsBitsView view_; }; - [[nodiscard]] EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; - [[nodiscard]] ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; + EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; public: class EmbossReservedDollarVirtualMaxSizeInBytesView final { @@ -15303,9 +15398,9 @@ class GenericContainsContainsBitsView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -15314,13 +15409,13 @@ class GenericContainsContainsBitsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -15338,9 +15433,9 @@ class GenericContainsContainsBitsView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -15349,13 +15444,13 @@ class GenericContainsContainsBitsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -15386,7 +15481,7 @@ struct EmbossReservedInternalIsGenericContainsContainsBitsView< }; template -[[nodiscard]] inline GenericContainsContainsBitsView< +inline GenericContainsContainsBitsView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -15401,7 +15496,7 @@ MakeContainsContainsBitsView( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericContainsContainsBitsView> +inline GenericContainsContainsBitsView> MakeContainsContainsBitsView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericContainsContainsBitsView>( @@ -15410,7 +15505,7 @@ MakeContainsContainsBitsView( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericContainsContainsBitsView< +inline GenericContainsContainsBitsView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedContainsContainsBitsView( T *emboss_reserved_local_data, @@ -15483,42 +15578,43 @@ class GenericType0View final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; - { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!a().Ok()) return false; - if (!b().Ok()) return false; - if (!c().Ok()) return false; - if (!IntrinsicSizeInBytes().Ok()) return false; - if (!MaxSizeInBytes().Ok()) return false; - if (!MinSizeInBytes().Ok()) return false; - } - } + if (!a().Ok()) return false; + + if (!b().Ok()) return false; + + if (!c().Ok()) return false; + + if (!IntrinsicSizeInBytes().Ok()) return false; + + if (!MaxSizeInBytes().Ok()) return false; + + if (!MinSizeInBytes().Ok()) return false; + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { + static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - [[nodiscard]] static constexpr bool SizeIsKnown() { + static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericType0View emboss_reserved_local_other) const { if (!has_a().Known()) return false; @@ -15573,7 +15669,7 @@ class GenericType0View final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericType0View emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_a().ValueOr(false) && @@ -15634,7 +15730,7 @@ class GenericType0View final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericType0View emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -15805,31 +15901,31 @@ class GenericType0View final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> a() const; - [[nodiscard]] ::emboss::support::Maybe has_a() const; + ::emboss::support::Maybe has_a() const; public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> b() const; - [[nodiscard]] ::emboss::support::Maybe has_b() const; + ::emboss::support::Maybe has_b() const; public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> c() const; - [[nodiscard]] ::emboss::support::Maybe has_c() const; + ::emboss::support::Maybe has_c() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -15845,9 +15941,9 @@ class GenericType0View final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -15856,13 +15952,13 @@ class GenericType0View final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -15880,9 +15976,9 @@ class GenericType0View final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -15891,13 +15987,13 @@ class GenericType0View final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -15915,9 +16011,9 @@ class GenericType0View final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -15926,13 +16022,13 @@ class GenericType0View final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -15963,7 +16059,7 @@ struct EmbossReservedInternalIsGenericType0View< }; template -[[nodiscard]] inline GenericType0View< +inline GenericType0View< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -15978,7 +16074,7 @@ MakeType0View( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericType0View> +inline GenericType0View> MakeType0View( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericType0View>( @@ -15987,7 +16083,7 @@ MakeType0View( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericType0View< +inline GenericType0View< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedType0View( T *emboss_reserved_local_data, @@ -16055,42 +16151,43 @@ class GenericType1View final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; - { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!a().Ok()) return false; - if (!b().Ok()) return false; - if (!c().Ok()) return false; - if (!IntrinsicSizeInBytes().Ok()) return false; - if (!MaxSizeInBytes().Ok()) return false; - if (!MinSizeInBytes().Ok()) return false; - } - } + if (!a().Ok()) return false; + + if (!b().Ok()) return false; + + if (!c().Ok()) return false; + + if (!IntrinsicSizeInBytes().Ok()) return false; + + if (!MaxSizeInBytes().Ok()) return false; + + if (!MinSizeInBytes().Ok()) return false; + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { + static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - [[nodiscard]] static constexpr bool SizeIsKnown() { + static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericType1View emboss_reserved_local_other) const { if (!has_a().Known()) return false; @@ -16145,7 +16242,7 @@ class GenericType1View final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericType1View emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_a().ValueOr(false) && @@ -16206,7 +16303,7 @@ class GenericType1View final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericType1View emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -16377,31 +16474,31 @@ class GenericType1View final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> a() const; - [[nodiscard]] ::emboss::support::Maybe has_a() const; + ::emboss::support::Maybe has_a() const; public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> b() const; - [[nodiscard]] ::emboss::support::Maybe has_b() const; + ::emboss::support::Maybe has_b() const; public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> c() const; - [[nodiscard]] ::emboss::support::Maybe has_c() const; + ::emboss::support::Maybe has_c() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -16417,9 +16514,9 @@ class GenericType1View final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -16428,13 +16525,13 @@ class GenericType1View final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -16452,9 +16549,9 @@ class GenericType1View final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -16463,13 +16560,13 @@ class GenericType1View final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -16487,9 +16584,9 @@ class GenericType1View final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -16498,13 +16595,13 @@ class GenericType1View final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -16535,7 +16632,7 @@ struct EmbossReservedInternalIsGenericType1View< }; template -[[nodiscard]] inline GenericType1View< +inline GenericType1View< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -16550,7 +16647,7 @@ MakeType1View( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericType1View> +inline GenericType1View> MakeType1View( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericType1View>( @@ -16559,7 +16656,7 @@ MakeType1View( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericType1View< +inline GenericType1View< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedType1View( T *emboss_reserved_local_data, @@ -16620,53 +16717,57 @@ class GenericConditionalInlineView final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; const auto emboss_reserved_local_ok_subexpr_1 = payload_id(); const auto emboss_reserved_local_ok_subexpr_2 = (emboss_reserved_local_ok_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + if (!payload_id().Ok()) return false; + + if (!IntrinsicSizeInBytes().Ok()) return false; + + if (!MaxSizeInBytes().Ok()) return false; + + if (!MinSizeInBytes().Ok()) return false; + { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!payload_id().Ok()) return false; - if (!IntrinsicSizeInBytes().Ok()) return false; - if (!MaxSizeInBytes().Ok()) return false; - if (!MinSizeInBytes().Ok()) return false; - } - } - { + const auto emboss_reserved_switch_discrim = emboss_reserved_local_ok_subexpr_2; if (!emboss_reserved_switch_discrim.Known()) return false; switch (emboss_reserved_switch_discrim.ValueOrDefault()) { case static_cast(0LL): if (!type_0().Ok()) return false; break; + case static_cast(1LL): if (!type_1().Ok()) return false; break; + + } } + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - [[nodiscard]] ::std::size_t SizeInBytes() const { + ::std::size_t SizeInBytes() const { return static_cast(IntrinsicSizeInBytes().Read()); } - [[nodiscard]] bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericConditionalInlineView emboss_reserved_local_other) const { if (!has_payload_id().Known()) return false; @@ -16721,7 +16822,7 @@ class GenericConditionalInlineView final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericConditionalInlineView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_payload_id().ValueOr(false) && @@ -16782,7 +16883,7 @@ class GenericConditionalInlineView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericConditionalInlineView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -16953,27 +17054,27 @@ class GenericConditionalInlineView final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> payload_id() const; - [[nodiscard]] ::emboss::support::Maybe has_payload_id() const; + ::emboss::support::Maybe has_payload_id() const; public: - [[nodiscard]] typename ::emboss::test::ConditionalInline::GenericType0View> + typename ::emboss::test::ConditionalInline::GenericType0View> type_0() const; - [[nodiscard]] ::emboss::support::Maybe has_type_0() const; + ::emboss::support::Maybe has_type_0() const; public: - [[nodiscard]] typename ::emboss::test::ConditionalInline::GenericType1View> + typename ::emboss::test::ConditionalInline::GenericType1View> type_1() const; - [[nodiscard]] ::emboss::support::Maybe has_type_1() const; + ::emboss::support::Maybe has_type_1() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -16992,17 +17093,17 @@ class GenericConditionalInlineView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - [[nodiscard]] ::std::int32_t Read() const { + ::std::int32_t Read() const { EMBOSS_CHECK(view_.has_IntrinsicSizeInBytes().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - [[nodiscard]] ::std::int32_t UncheckedRead() const { + ::std::int32_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - [[nodiscard]] bool Ok() const { + bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -17015,12 +17116,12 @@ class GenericConditionalInlineView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } private: - [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { + ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.payload_id(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(0LL))); @@ -17032,7 +17133,7 @@ class GenericConditionalInlineView final { return emboss_reserved_local_subexpr_7; } - [[nodiscard]] static constexpr bool ValueIsOk( + static constexpr bool ValueIsOk( ::std::int32_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -17040,8 +17141,8 @@ class GenericConditionalInlineView final { const GenericConditionalInlineView view_; }; - [[nodiscard]] EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; - [[nodiscard]] ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; + EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; public: class EmbossReservedDollarVirtualMaxSizeInBytesView final { @@ -17057,9 +17158,9 @@ class GenericConditionalInlineView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -17068,13 +17169,13 @@ class GenericConditionalInlineView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -17092,9 +17193,9 @@ class GenericConditionalInlineView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -17103,13 +17204,13 @@ class GenericConditionalInlineView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -17140,7 +17241,7 @@ struct EmbossReservedInternalIsGenericConditionalInlineView< }; template -[[nodiscard]] inline GenericConditionalInlineView< +inline GenericConditionalInlineView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -17155,7 +17256,7 @@ MakeConditionalInlineView( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericConditionalInlineView> +inline GenericConditionalInlineView> MakeConditionalInlineView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericConditionalInlineView>( @@ -17164,7 +17265,7 @@ MakeConditionalInlineView( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericConditionalInlineView< +inline GenericConditionalInlineView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedConditionalInlineView( T *emboss_reserved_local_data, @@ -17239,52 +17340,56 @@ class GenericEmbossReservedAnonymousField2View final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; const auto emboss_reserved_local_ok_subexpr_1 = low(); const auto emboss_reserved_local_ok_subexpr_2 = (emboss_reserved_local_ok_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + if (!low().Ok()) return false; + + if (!high().Ok()) return false; + + if (!IntrinsicSizeInBits().Ok()) return false; + + if (!MaxSizeInBits().Ok()) return false; + + if (!MinSizeInBits().Ok()) return false; + { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!low().Ok()) return false; - if (!high().Ok()) return false; - if (!IntrinsicSizeInBits().Ok()) return false; - if (!MaxSizeInBits().Ok()) return false; - if (!MinSizeInBits().Ok()) return false; - } - } - { + const auto emboss_reserved_switch_discrim = emboss_reserved_local_ok_subexpr_2; if (!emboss_reserved_switch_discrim.Known()) return false; switch (emboss_reserved_switch_discrim.ValueOrDefault()) { case static_cast(1LL): if (!mid().Ok()) return false; break; + + } } + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBits().Ok() && backing_.SizeInBits() >= static_cast( IntrinsicSizeInBits().UncheckedRead()); } - [[nodiscard]] static constexpr ::std::size_t SizeInBits() { + static constexpr ::std::size_t SizeInBits() { return static_cast(IntrinsicSizeInBits().Read()); } - [[nodiscard]] static constexpr bool SizeIsKnown() { + static constexpr bool SizeIsKnown() { return IntrinsicSizeInBits().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericEmbossReservedAnonymousField2View emboss_reserved_local_other) const { if (!has_low().Known()) return false; @@ -17339,7 +17444,7 @@ class GenericEmbossReservedAnonymousField2View final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericEmbossReservedAnonymousField2View emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_low().ValueOr(false) && @@ -17400,7 +17505,7 @@ class GenericEmbossReservedAnonymousField2View final { emboss_reserved_local_other.IntrinsicSizeInBits().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericEmbossReservedAnonymousField2View emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -17571,31 +17676,31 @@ class GenericEmbossReservedAnonymousField2View final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, typename Storage::template OffsetStorageType> low() const; - [[nodiscard]] ::emboss::support::Maybe has_low() const; + ::emboss::support::Maybe has_low() const; public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<2, ::emboss::support::AllValuesAreOk>, typename Storage::template OffsetStorageType> mid() const; - [[nodiscard]] ::emboss::support::Maybe has_mid() const; + ::emboss::support::Maybe has_mid() const; public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, typename Storage::template OffsetStorageType> high() const; - [[nodiscard]] ::emboss::support::Maybe has_high() const; + ::emboss::support::Maybe has_high() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBitsView final { @@ -17611,9 +17716,9 @@ class GenericEmbossReservedAnonymousField2View final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBitsView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -17622,13 +17727,13 @@ class GenericEmbossReservedAnonymousField2View final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBitsView IntrinsicSizeInBits() { + static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBitsView IntrinsicSizeInBits() { return EmbossReservedDollarVirtualIntrinsicSizeInBitsView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBits() { + static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBits() { return ::emboss::support::Maybe(true); } @@ -17646,9 +17751,9 @@ class GenericEmbossReservedAnonymousField2View final { default; ~EmbossReservedDollarVirtualMaxSizeInBitsView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -17657,13 +17762,13 @@ class GenericEmbossReservedAnonymousField2View final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBitsView MaxSizeInBits() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBitsView MaxSizeInBits() { return EmbossReservedDollarVirtualMaxSizeInBitsView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBits() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBits() { return ::emboss::support::Maybe(true); } @@ -17681,9 +17786,9 @@ class GenericEmbossReservedAnonymousField2View final { default; ~EmbossReservedDollarVirtualMinSizeInBitsView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -17692,13 +17797,13 @@ class GenericEmbossReservedAnonymousField2View final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBitsView MinSizeInBits() { + static constexpr EmbossReservedDollarVirtualMinSizeInBitsView MinSizeInBits() { return EmbossReservedDollarVirtualMinSizeInBitsView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBits() { + static constexpr ::emboss::support::Maybe has_MinSizeInBits() { return ::emboss::support::Maybe(true); } @@ -17729,7 +17834,7 @@ struct EmbossReservedInternalIsGenericEmbossReservedAnonymousField2View< }; template -[[nodiscard]] inline GenericEmbossReservedAnonymousField2View< +inline GenericEmbossReservedAnonymousField2View< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -17744,7 +17849,7 @@ MakeEmbossReservedAnonymousField2View( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericEmbossReservedAnonymousField2View> +inline GenericEmbossReservedAnonymousField2View> MakeEmbossReservedAnonymousField2View( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericEmbossReservedAnonymousField2View>( @@ -17753,7 +17858,7 @@ MakeEmbossReservedAnonymousField2View( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericEmbossReservedAnonymousField2View< +inline GenericEmbossReservedAnonymousField2View< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedEmbossReservedAnonymousField2View( T *emboss_reserved_local_data, @@ -17814,7 +17919,7 @@ class GenericConditionalAnonymousView final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; const auto emboss_reserved_local_ok_subexpr_1 = x(); @@ -17825,57 +17930,69 @@ class GenericConditionalAnonymousView final { const auto emboss_reserved_local_ok_subexpr_6 = emboss_reserved_anonymous_field_2().has_mid(); const auto emboss_reserved_local_ok_subexpr_7 = ::emboss::support::And(emboss_reserved_local_ok_subexpr_4, emboss_reserved_local_ok_subexpr_6); + if (!x().Ok()) return false; + + if (!IntrinsicSizeInBytes().Ok()) return false; + + if (!MaxSizeInBytes().Ok()) return false; + + if (!MinSizeInBytes().Ok()) return false; + { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!x().Ok()) return false; - if (!IntrinsicSizeInBytes().Ok()) return false; - if (!MaxSizeInBytes().Ok()) return false; - if (!MinSizeInBytes().Ok()) return false; - } - } - { + const auto emboss_reserved_cond = emboss_reserved_local_ok_subexpr_3; if (!emboss_reserved_cond.Known()) return false; if (emboss_reserved_cond.ValueOrDefault()) { if (!emboss_reserved_anonymous_field_2().Ok()) return false; + + } } + { + const auto emboss_reserved_cond = emboss_reserved_local_ok_subexpr_5; if (!emboss_reserved_cond.Known()) return false; if (emboss_reserved_cond.ValueOrDefault()) { if (!low().Ok()) return false; + if (!high().Ok()) return false; + + } } + { + const auto emboss_reserved_cond = emboss_reserved_local_ok_subexpr_7; if (!emboss_reserved_cond.Known()) return false; if (emboss_reserved_cond.ValueOrDefault()) { if (!mid().Ok()) return false; + + } } + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - [[nodiscard]] ::std::size_t SizeInBytes() const { + ::std::size_t SizeInBytes() const { return static_cast(IntrinsicSizeInBytes().Read()); } - [[nodiscard]] bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericConditionalAnonymousView emboss_reserved_local_other) const { if (!has_x().Known()) return false; @@ -17913,7 +18030,7 @@ class GenericConditionalAnonymousView final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericConditionalAnonymousView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_x().ValueOr(false) && @@ -17960,7 +18077,7 @@ class GenericConditionalAnonymousView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericConditionalAnonymousView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -18169,42 +18286,42 @@ class GenericConditionalAnonymousView final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> x() const; - [[nodiscard]] ::emboss::support::Maybe has_x() const; + ::emboss::support::Maybe has_x() const; private: - [[nodiscard]] typename ::emboss::test::ConditionalAnonymous::GenericEmbossReservedAnonymousField2View>, 8>> + typename ::emboss::test::ConditionalAnonymous::GenericEmbossReservedAnonymousField2View>, 8>> emboss_reserved_anonymous_field_2() const; - [[nodiscard]] ::emboss::support::Maybe has_emboss_reserved_anonymous_field_2() const; + ::emboss::support::Maybe has_emboss_reserved_anonymous_field_2() const; public: - [[nodiscard]] auto low() const -> decltype(this->emboss_reserved_anonymous_field_2().low()) { + auto low() const -> decltype(this->emboss_reserved_anonymous_field_2().low()) { return has_low().ValueOrDefault() ? emboss_reserved_anonymous_field_2().low() : decltype(this->emboss_reserved_anonymous_field_2().low())(); } - [[nodiscard]] ::emboss::support::Maybe has_low() const; + ::emboss::support::Maybe has_low() const; public: - [[nodiscard]] auto mid() const -> decltype(this->emboss_reserved_anonymous_field_2().mid()) { + auto mid() const -> decltype(this->emboss_reserved_anonymous_field_2().mid()) { return has_mid().ValueOrDefault() ? emboss_reserved_anonymous_field_2().mid() : decltype(this->emboss_reserved_anonymous_field_2().mid())(); } - [[nodiscard]] ::emboss::support::Maybe has_mid() const; + ::emboss::support::Maybe has_mid() const; public: - [[nodiscard]] auto high() const -> decltype(this->emboss_reserved_anonymous_field_2().high()) { + auto high() const -> decltype(this->emboss_reserved_anonymous_field_2().high()) { return has_high().ValueOrDefault() ? emboss_reserved_anonymous_field_2().high() : decltype(this->emboss_reserved_anonymous_field_2().high())(); } - [[nodiscard]] ::emboss::support::Maybe has_high() const; + ::emboss::support::Maybe has_high() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -18223,17 +18340,17 @@ class GenericConditionalAnonymousView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - [[nodiscard]] ::std::int32_t Read() const { + ::std::int32_t Read() const { EMBOSS_CHECK(view_.has_IntrinsicSizeInBytes().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - [[nodiscard]] ::std::int32_t UncheckedRead() const { + ::std::int32_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - [[nodiscard]] bool Ok() const { + bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -18246,12 +18363,12 @@ class GenericConditionalAnonymousView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } private: - [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { + ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.x(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::GreaterThan(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(10LL))); @@ -18261,7 +18378,7 @@ class GenericConditionalAnonymousView final { return emboss_reserved_local_subexpr_5; } - [[nodiscard]] static constexpr bool ValueIsOk( + static constexpr bool ValueIsOk( ::std::int32_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -18269,8 +18386,8 @@ class GenericConditionalAnonymousView final { const GenericConditionalAnonymousView view_; }; - [[nodiscard]] EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; - [[nodiscard]] ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; + EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; public: class EmbossReservedDollarVirtualMaxSizeInBytesView final { @@ -18286,9 +18403,9 @@ class GenericConditionalAnonymousView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -18297,13 +18414,13 @@ class GenericConditionalAnonymousView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -18321,9 +18438,9 @@ class GenericConditionalAnonymousView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -18332,13 +18449,13 @@ class GenericConditionalAnonymousView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -18369,7 +18486,7 @@ struct EmbossReservedInternalIsGenericConditionalAnonymousView< }; template -[[nodiscard]] inline GenericConditionalAnonymousView< +inline GenericConditionalAnonymousView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -18384,7 +18501,7 @@ MakeConditionalAnonymousView( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericConditionalAnonymousView> +inline GenericConditionalAnonymousView> MakeConditionalAnonymousView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericConditionalAnonymousView>( @@ -18393,7 +18510,7 @@ MakeConditionalAnonymousView( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericConditionalAnonymousView< +inline GenericConditionalAnonymousView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedConditionalAnonymousView( T *emboss_reserved_local_data, @@ -18464,40 +18581,39 @@ class GenericEmbossReservedAnonymousField1View final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; - { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!enabled().Ok()) return false; - if (!IntrinsicSizeInBits().Ok()) return false; - if (!MaxSizeInBits().Ok()) return false; - if (!MinSizeInBits().Ok()) return false; - } - } + if (!enabled().Ok()) return false; + + if (!IntrinsicSizeInBits().Ok()) return false; + + if (!MaxSizeInBits().Ok()) return false; + + if (!MinSizeInBits().Ok()) return false; + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBits().Ok() && backing_.SizeInBits() >= static_cast( IntrinsicSizeInBits().UncheckedRead()); } - [[nodiscard]] static constexpr ::std::size_t SizeInBits() { + static constexpr ::std::size_t SizeInBits() { return static_cast(IntrinsicSizeInBits().Read()); } - [[nodiscard]] static constexpr bool SizeIsKnown() { + static constexpr bool SizeIsKnown() { return IntrinsicSizeInBits().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericEmbossReservedAnonymousField1View emboss_reserved_local_other) const { if (!has_enabled().Known()) return false; @@ -18518,7 +18634,7 @@ class GenericEmbossReservedAnonymousField1View final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericEmbossReservedAnonymousField1View emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_enabled().ValueOr(false) && @@ -18551,7 +18667,7 @@ class GenericEmbossReservedAnonymousField1View final { emboss_reserved_local_other.IntrinsicSizeInBits().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericEmbossReservedAnonymousField1View emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -18646,15 +18762,15 @@ class GenericEmbossReservedAnonymousField1View final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: - [[nodiscard]] typename ::emboss::prelude::FlagView< + typename ::emboss::prelude::FlagView< /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, typename Storage::template OffsetStorageType> enabled() const; - [[nodiscard]] ::emboss::support::Maybe has_enabled() const; + ::emboss::support::Maybe has_enabled() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBitsView final { @@ -18670,9 +18786,9 @@ class GenericEmbossReservedAnonymousField1View final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBitsView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -18681,13 +18797,13 @@ class GenericEmbossReservedAnonymousField1View final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBitsView IntrinsicSizeInBits() { + static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBitsView IntrinsicSizeInBits() { return EmbossReservedDollarVirtualIntrinsicSizeInBitsView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBits() { + static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBits() { return ::emboss::support::Maybe(true); } @@ -18705,9 +18821,9 @@ class GenericEmbossReservedAnonymousField1View final { default; ~EmbossReservedDollarVirtualMaxSizeInBitsView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -18716,13 +18832,13 @@ class GenericEmbossReservedAnonymousField1View final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBitsView MaxSizeInBits() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBitsView MaxSizeInBits() { return EmbossReservedDollarVirtualMaxSizeInBitsView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBits() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBits() { return ::emboss::support::Maybe(true); } @@ -18740,9 +18856,9 @@ class GenericEmbossReservedAnonymousField1View final { default; ~EmbossReservedDollarVirtualMinSizeInBitsView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -18751,13 +18867,13 @@ class GenericEmbossReservedAnonymousField1View final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBitsView MinSizeInBits() { + static constexpr EmbossReservedDollarVirtualMinSizeInBitsView MinSizeInBits() { return EmbossReservedDollarVirtualMinSizeInBitsView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBits() { + static constexpr ::emboss::support::Maybe has_MinSizeInBits() { return ::emboss::support::Maybe(true); } @@ -18788,7 +18904,7 @@ struct EmbossReservedInternalIsGenericEmbossReservedAnonymousField1View< }; template -[[nodiscard]] inline GenericEmbossReservedAnonymousField1View< +inline GenericEmbossReservedAnonymousField1View< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -18803,7 +18919,7 @@ MakeEmbossReservedAnonymousField1View( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericEmbossReservedAnonymousField1View> +inline GenericEmbossReservedAnonymousField1View> MakeEmbossReservedAnonymousField1View( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericEmbossReservedAnonymousField1View>( @@ -18812,7 +18928,7 @@ MakeEmbossReservedAnonymousField1View( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericEmbossReservedAnonymousField1View< +inline GenericEmbossReservedAnonymousField1View< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedEmbossReservedAnonymousField1View( T *emboss_reserved_local_data, @@ -18873,56 +18989,63 @@ class GenericConditionalOnFlagView final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; const auto emboss_reserved_local_ok_subexpr_1 = ::emboss::support::And(::emboss::support::Maybe(true), ::emboss::support::Maybe(true)); const auto emboss_reserved_local_ok_subexpr_2 = enabled(); const auto emboss_reserved_local_ok_subexpr_3 = (emboss_reserved_local_ok_subexpr_2.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_2.UncheckedRead())) : ::emboss::support::Maybe()); + if (!emboss_reserved_anonymous_field_1().Ok()) return false; + + if (!IntrinsicSizeInBytes().Ok()) return false; + + if (!MaxSizeInBytes().Ok()) return false; + + if (!MinSizeInBytes().Ok()) return false; + { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!emboss_reserved_anonymous_field_1().Ok()) return false; - if (!IntrinsicSizeInBytes().Ok()) return false; - if (!MaxSizeInBytes().Ok()) return false; - if (!MinSizeInBytes().Ok()) return false; - } - } - { + const auto emboss_reserved_cond = emboss_reserved_local_ok_subexpr_1; if (!emboss_reserved_cond.Known()) return false; if (emboss_reserved_cond.ValueOrDefault()) { if (!enabled().Ok()) return false; + + } } + { + const auto emboss_reserved_cond = emboss_reserved_local_ok_subexpr_3; if (!emboss_reserved_cond.Known()) return false; if (emboss_reserved_cond.ValueOrDefault()) { if (!value().Ok()) return false; + + } } + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - [[nodiscard]] ::std::size_t SizeInBytes() const { + ::std::size_t SizeInBytes() const { return static_cast(IntrinsicSizeInBytes().Read()); } - [[nodiscard]] bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericConditionalOnFlagView emboss_reserved_local_other) const { if (!has_emboss_reserved_anonymous_field_1().Known()) return false; @@ -18960,7 +19083,7 @@ class GenericConditionalOnFlagView final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericConditionalOnFlagView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_emboss_reserved_anonymous_field_1().ValueOr(false) && @@ -19007,7 +19130,7 @@ class GenericConditionalOnFlagView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericConditionalOnFlagView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -19140,28 +19263,28 @@ class GenericConditionalOnFlagView final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } private: - [[nodiscard]] typename ::emboss::test::ConditionalOnFlag::GenericEmbossReservedAnonymousField1View>, 8>> + typename ::emboss::test::ConditionalOnFlag::GenericEmbossReservedAnonymousField1View>, 8>> emboss_reserved_anonymous_field_1() const; - [[nodiscard]] ::emboss::support::Maybe has_emboss_reserved_anonymous_field_1() const; + ::emboss::support::Maybe has_emboss_reserved_anonymous_field_1() const; public: - [[nodiscard]] auto enabled() const -> decltype(this->emboss_reserved_anonymous_field_1().enabled()) { + auto enabled() const -> decltype(this->emboss_reserved_anonymous_field_1().enabled()) { return has_enabled().ValueOrDefault() ? emboss_reserved_anonymous_field_1().enabled() : decltype(this->emboss_reserved_anonymous_field_1().enabled())(); } - [[nodiscard]] ::emboss::support::Maybe has_enabled() const; + ::emboss::support::Maybe has_enabled() const; public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> value() const; - [[nodiscard]] ::emboss::support::Maybe has_value() const; + ::emboss::support::Maybe has_value() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -19180,17 +19303,17 @@ class GenericConditionalOnFlagView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - [[nodiscard]] ::std::int32_t Read() const { + ::std::int32_t Read() const { EMBOSS_CHECK(view_.has_IntrinsicSizeInBytes().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - [[nodiscard]] ::std::int32_t UncheckedRead() const { + ::std::int32_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - [[nodiscard]] bool Ok() const { + bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -19203,12 +19326,12 @@ class GenericConditionalOnFlagView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } private: - [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { + ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.enabled(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Choice(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(2LL)), ::emboss::support::Maybe(static_cast(0LL))); @@ -19217,7 +19340,7 @@ class GenericConditionalOnFlagView final { return emboss_reserved_local_subexpr_4; } - [[nodiscard]] static constexpr bool ValueIsOk( + static constexpr bool ValueIsOk( ::std::int32_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -19225,8 +19348,8 @@ class GenericConditionalOnFlagView final { const GenericConditionalOnFlagView view_; }; - [[nodiscard]] EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; - [[nodiscard]] ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; + EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; public: class EmbossReservedDollarVirtualMaxSizeInBytesView final { @@ -19242,9 +19365,9 @@ class GenericConditionalOnFlagView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -19253,13 +19376,13 @@ class GenericConditionalOnFlagView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -19277,9 +19400,9 @@ class GenericConditionalOnFlagView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -19288,13 +19411,13 @@ class GenericConditionalOnFlagView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -19325,7 +19448,7 @@ struct EmbossReservedInternalIsGenericConditionalOnFlagView< }; template -[[nodiscard]] inline GenericConditionalOnFlagView< +inline GenericConditionalOnFlagView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -19340,7 +19463,7 @@ MakeConditionalOnFlagView( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericConditionalOnFlagView> +inline GenericConditionalOnFlagView> MakeConditionalOnFlagView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericConditionalOnFlagView>( @@ -19349,7 +19472,7 @@ MakeConditionalOnFlagView( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericConditionalOnFlagView< +inline GenericConditionalOnFlagView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedConditionalOnFlagView( T *emboss_reserved_local_data, diff --git a/testdata/golden_cpp/dynamic_size.emb.h b/testdata/golden_cpp/dynamic_size.emb.h index 41ce2ea..99212d5 100644 --- a/testdata/golden_cpp/dynamic_size.emb.h +++ b/testdata/golden_cpp/dynamic_size.emb.h @@ -171,43 +171,46 @@ class GenericMessageView final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; - { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!header_length().Ok()) return false; - if (!message_length().Ok()) return false; - if (!padding().Ok()) return false; - if (!message().Ok()) return false; - if (!crc32().Ok()) return false; - if (!IntrinsicSizeInBytes().Ok()) return false; - if (!MaxSizeInBytes().Ok()) return false; - if (!MinSizeInBytes().Ok()) return false; - } - } + if (!header_length().Ok()) return false; + + if (!message_length().Ok()) return false; + + if (!padding().Ok()) return false; + + if (!message().Ok()) return false; + + if (!crc32().Ok()) return false; + + if (!IntrinsicSizeInBytes().Ok()) return false; + + if (!MaxSizeInBytes().Ok()) return false; + + if (!MinSizeInBytes().Ok()) return false; + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - [[nodiscard]] ::std::size_t SizeInBytes() const { + ::std::size_t SizeInBytes() const { return static_cast(IntrinsicSizeInBytes().Read()); } - [[nodiscard]] bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericMessageView emboss_reserved_local_other) const { if (!has_header_length().Known()) return false; @@ -296,7 +299,7 @@ class GenericMessageView final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericMessageView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_header_length().ValueOr(false) && @@ -385,7 +388,7 @@ class GenericMessageView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericMessageView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -632,26 +635,26 @@ class GenericMessageView final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> header_length() const; - [[nodiscard]] ::emboss::support::Maybe has_header_length() const; + ::emboss::support::Maybe has_header_length() const; public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> message_length() const; - [[nodiscard]] ::emboss::support::Maybe has_message_length() const; + ::emboss::support::Maybe has_message_length() const; public: - [[nodiscard]] typename ::emboss::support::GenericArrayView< + typename ::emboss::support::GenericArrayView< typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock::template OffsetStorageType>, 8>> @@ -660,10 +663,10 @@ class GenericMessageView final { 8 > padding() const; - [[nodiscard]] ::emboss::support::Maybe has_padding() const; + ::emboss::support::Maybe has_padding() const; public: - [[nodiscard]] typename ::emboss::support::GenericArrayView< + typename ::emboss::support::GenericArrayView< typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock::template OffsetStorageType>, 8>> @@ -672,15 +675,15 @@ class GenericMessageView final { 8 > message() const; - [[nodiscard]] ::emboss::support::Maybe has_message() const; + ::emboss::support::Maybe has_message() const; public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 32>> crc32() const; - [[nodiscard]] ::emboss::support::Maybe has_crc32() const; + ::emboss::support::Maybe has_crc32() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -699,17 +702,17 @@ class GenericMessageView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - [[nodiscard]] ::std::int32_t Read() const { + ::std::int32_t Read() const { EMBOSS_CHECK(view_.has_IntrinsicSizeInBytes().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - [[nodiscard]] ::std::int32_t UncheckedRead() const { + ::std::int32_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - [[nodiscard]] bool Ok() const { + bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -722,12 +725,12 @@ class GenericMessageView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } private: - [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { + ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.header_length(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Difference(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(2LL))); @@ -744,7 +747,7 @@ class GenericMessageView final { return emboss_reserved_local_subexpr_12; } - [[nodiscard]] static constexpr bool ValueIsOk( + static constexpr bool ValueIsOk( ::std::int32_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -752,8 +755,8 @@ class GenericMessageView final { const GenericMessageView view_; }; - [[nodiscard]] EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; - [[nodiscard]] ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; + EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; public: class EmbossReservedDollarVirtualMaxSizeInBytesView final { @@ -769,9 +772,9 @@ class GenericMessageView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -780,13 +783,13 @@ class GenericMessageView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -804,9 +807,9 @@ class GenericMessageView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -815,13 +818,13 @@ class GenericMessageView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -852,7 +855,7 @@ struct EmbossReservedInternalIsGenericMessageView< }; template -[[nodiscard]] inline GenericMessageView< +inline GenericMessageView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -867,7 +870,7 @@ MakeMessageView( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericMessageView> +inline GenericMessageView> MakeMessageView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericMessageView>( @@ -876,7 +879,7 @@ MakeMessageView( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericMessageView< +inline GenericMessageView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedMessageView( T *emboss_reserved_local_data, @@ -942,40 +945,40 @@ class GenericImageView final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; - { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!size().Ok()) return false; - if (!pixels().Ok()) return false; - if (!IntrinsicSizeInBytes().Ok()) return false; - if (!MaxSizeInBytes().Ok()) return false; - if (!MinSizeInBytes().Ok()) return false; - } - } + if (!size().Ok()) return false; + + if (!pixels().Ok()) return false; + + if (!IntrinsicSizeInBytes().Ok()) return false; + + if (!MaxSizeInBytes().Ok()) return false; + + if (!MinSizeInBytes().Ok()) return false; + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - [[nodiscard]] ::std::size_t SizeInBytes() const { + ::std::size_t SizeInBytes() const { return static_cast(IntrinsicSizeInBytes().Read()); } - [[nodiscard]] bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericImageView emboss_reserved_local_other) const { if (!has_size().Known()) return false; @@ -1013,7 +1016,7 @@ class GenericImageView final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericImageView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_size().ValueOr(false) && @@ -1060,7 +1063,7 @@ class GenericImageView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericImageView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -1193,18 +1196,18 @@ class GenericImageView final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> size() const; - [[nodiscard]] ::emboss::support::Maybe has_size() const; + ::emboss::support::Maybe has_size() const; public: - [[nodiscard]] typename ::emboss::support::GenericArrayView< + typename ::emboss::support::GenericArrayView< typename ::emboss::support::GenericArrayView< typename ::emboss::support::GenericArrayView< typename ::emboss::prelude::UIntView< @@ -1221,7 +1224,7 @@ class GenericImageView final { 8 > pixels() const; - [[nodiscard]] ::emboss::support::Maybe has_pixels() const; + ::emboss::support::Maybe has_pixels() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -1240,17 +1243,17 @@ class GenericImageView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - [[nodiscard]] ::std::int32_t Read() const { + ::std::int32_t Read() const { EMBOSS_CHECK(view_.has_IntrinsicSizeInBytes().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - [[nodiscard]] ::std::int32_t UncheckedRead() const { + ::std::int32_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - [[nodiscard]] bool Ok() const { + bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -1263,12 +1266,12 @@ class GenericImageView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } private: - [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { + ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.size(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Product(::emboss::support::Maybe(static_cast(15LL)), emboss_reserved_local_subexpr_2); @@ -1279,7 +1282,7 @@ class GenericImageView final { return emboss_reserved_local_subexpr_6; } - [[nodiscard]] static constexpr bool ValueIsOk( + static constexpr bool ValueIsOk( ::std::int32_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -1287,8 +1290,8 @@ class GenericImageView final { const GenericImageView view_; }; - [[nodiscard]] EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; - [[nodiscard]] ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; + EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; public: class EmbossReservedDollarVirtualMaxSizeInBytesView final { @@ -1304,9 +1307,9 @@ class GenericImageView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -1315,13 +1318,13 @@ class GenericImageView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -1339,9 +1342,9 @@ class GenericImageView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -1350,13 +1353,13 @@ class GenericImageView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -1387,7 +1390,7 @@ struct EmbossReservedInternalIsGenericImageView< }; template -[[nodiscard]] inline GenericImageView< +inline GenericImageView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -1402,7 +1405,7 @@ MakeImageView( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericImageView> +inline GenericImageView> MakeImageView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericImageView>( @@ -1411,7 +1414,7 @@ MakeImageView( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericImageView< +inline GenericImageView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedImageView( T *emboss_reserved_local_data, @@ -1481,44 +1484,48 @@ class GenericTwoRegionsView final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; - { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!b_end().Ok()) return false; - if (!b_start().Ok()) return false; - if (!a_size().Ok()) return false; - if (!a_start().Ok()) return false; - if (!region_a().Ok()) return false; - if (!region_b().Ok()) return false; - if (!IntrinsicSizeInBytes().Ok()) return false; - if (!MaxSizeInBytes().Ok()) return false; - if (!MinSizeInBytes().Ok()) return false; - } - } + if (!b_end().Ok()) return false; + + if (!b_start().Ok()) return false; + + if (!a_size().Ok()) return false; + + if (!a_start().Ok()) return false; + + if (!region_a().Ok()) return false; + + if (!region_b().Ok()) return false; + + if (!IntrinsicSizeInBytes().Ok()) return false; + + if (!MaxSizeInBytes().Ok()) return false; + + if (!MinSizeInBytes().Ok()) return false; + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - [[nodiscard]] ::std::size_t SizeInBytes() const { + ::std::size_t SizeInBytes() const { return static_cast(IntrinsicSizeInBytes().Read()); } - [[nodiscard]] bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericTwoRegionsView emboss_reserved_local_other) const { if (!has_b_end().Known()) return false; @@ -1624,7 +1631,7 @@ class GenericTwoRegionsView final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericTwoRegionsView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_b_end().ValueOr(false) && @@ -1727,7 +1734,7 @@ class GenericTwoRegionsView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericTwoRegionsView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -2012,42 +2019,42 @@ class GenericTwoRegionsView final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> b_end() const; - [[nodiscard]] ::emboss::support::Maybe has_b_end() const; + ::emboss::support::Maybe has_b_end() const; public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> b_start() const; - [[nodiscard]] ::emboss::support::Maybe has_b_start() const; + ::emboss::support::Maybe has_b_start() const; public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> a_size() const; - [[nodiscard]] ::emboss::support::Maybe has_a_size() const; + ::emboss::support::Maybe has_a_size() const; public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> a_start() const; - [[nodiscard]] ::emboss::support::Maybe has_a_start() const; + ::emboss::support::Maybe has_a_start() const; public: - [[nodiscard]] typename ::emboss::support::GenericArrayView< + typename ::emboss::support::GenericArrayView< typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock::template OffsetStorageType>, 8>> @@ -2056,10 +2063,10 @@ class GenericTwoRegionsView final { 8 > region_a() const; - [[nodiscard]] ::emboss::support::Maybe has_region_a() const; + ::emboss::support::Maybe has_region_a() const; public: - [[nodiscard]] typename ::emboss::support::GenericArrayView< + typename ::emboss::support::GenericArrayView< typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock::template OffsetStorageType>, 8>> @@ -2068,7 +2075,7 @@ class GenericTwoRegionsView final { 8 > region_b() const; - [[nodiscard]] ::emboss::support::Maybe has_region_b() const; + ::emboss::support::Maybe has_region_b() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -2087,17 +2094,17 @@ class GenericTwoRegionsView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - [[nodiscard]] ::std::int32_t Read() const { + ::std::int32_t Read() const { EMBOSS_CHECK(view_.has_IntrinsicSizeInBytes().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - [[nodiscard]] ::std::int32_t UncheckedRead() const { + ::std::int32_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - [[nodiscard]] bool Ok() const { + bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -2110,12 +2117,12 @@ class GenericTwoRegionsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } private: - [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { + ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.a_start(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = view_.a_size(); @@ -2134,7 +2141,7 @@ class GenericTwoRegionsView final { return emboss_reserved_local_subexpr_14; } - [[nodiscard]] static constexpr bool ValueIsOk( + static constexpr bool ValueIsOk( ::std::int32_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -2142,8 +2149,8 @@ class GenericTwoRegionsView final { const GenericTwoRegionsView view_; }; - [[nodiscard]] EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; - [[nodiscard]] ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; + EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; public: class EmbossReservedDollarVirtualMaxSizeInBytesView final { @@ -2159,9 +2166,9 @@ class GenericTwoRegionsView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -2170,13 +2177,13 @@ class GenericTwoRegionsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -2194,9 +2201,9 @@ class GenericTwoRegionsView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -2205,13 +2212,13 @@ class GenericTwoRegionsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -2242,7 +2249,7 @@ struct EmbossReservedInternalIsGenericTwoRegionsView< }; template -[[nodiscard]] inline GenericTwoRegionsView< +inline GenericTwoRegionsView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -2257,7 +2264,7 @@ MakeTwoRegionsView( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericTwoRegionsView> +inline GenericTwoRegionsView> MakeTwoRegionsView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericTwoRegionsView>( @@ -2266,7 +2273,7 @@ MakeTwoRegionsView( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericTwoRegionsView< +inline GenericTwoRegionsView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedTwoRegionsView( T *emboss_reserved_local_data, @@ -2333,41 +2340,42 @@ class GenericMultipliedSizeView final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; - { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!width().Ok()) return false; - if (!height().Ok()) return false; - if (!data().Ok()) return false; - if (!IntrinsicSizeInBytes().Ok()) return false; - if (!MaxSizeInBytes().Ok()) return false; - if (!MinSizeInBytes().Ok()) return false; - } - } + if (!width().Ok()) return false; + + if (!height().Ok()) return false; + + if (!data().Ok()) return false; + + if (!IntrinsicSizeInBytes().Ok()) return false; + + if (!MaxSizeInBytes().Ok()) return false; + + if (!MinSizeInBytes().Ok()) return false; + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - [[nodiscard]] ::std::size_t SizeInBytes() const { + ::std::size_t SizeInBytes() const { return static_cast(IntrinsicSizeInBytes().Read()); } - [[nodiscard]] bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericMultipliedSizeView emboss_reserved_local_other) const { if (!has_width().Known()) return false; @@ -2422,7 +2430,7 @@ class GenericMultipliedSizeView final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericMultipliedSizeView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_width().ValueOr(false) && @@ -2483,7 +2491,7 @@ class GenericMultipliedSizeView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericMultipliedSizeView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -2654,26 +2662,26 @@ class GenericMultipliedSizeView final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> width() const; - [[nodiscard]] ::emboss::support::Maybe has_width() const; + ::emboss::support::Maybe has_width() const; public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> height() const; - [[nodiscard]] ::emboss::support::Maybe has_height() const; + ::emboss::support::Maybe has_height() const; public: - [[nodiscard]] typename ::emboss::support::GenericArrayView< + typename ::emboss::support::GenericArrayView< typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock::template OffsetStorageType>, 8>> @@ -2682,7 +2690,7 @@ class GenericMultipliedSizeView final { 8 > data() const; - [[nodiscard]] ::emboss::support::Maybe has_data() const; + ::emboss::support::Maybe has_data() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -2701,17 +2709,17 @@ class GenericMultipliedSizeView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - [[nodiscard]] ::std::int32_t Read() const { + ::std::int32_t Read() const { EMBOSS_CHECK(view_.has_IntrinsicSizeInBytes().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - [[nodiscard]] ::std::int32_t UncheckedRead() const { + ::std::int32_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - [[nodiscard]] bool Ok() const { + bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -2724,12 +2732,12 @@ class GenericMultipliedSizeView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } private: - [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { + ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.width(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = view_.height(); @@ -2742,7 +2750,7 @@ class GenericMultipliedSizeView final { return emboss_reserved_local_subexpr_8; } - [[nodiscard]] static constexpr bool ValueIsOk( + static constexpr bool ValueIsOk( ::std::int32_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -2750,8 +2758,8 @@ class GenericMultipliedSizeView final { const GenericMultipliedSizeView view_; }; - [[nodiscard]] EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; - [[nodiscard]] ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; + EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; public: class EmbossReservedDollarVirtualMaxSizeInBytesView final { @@ -2767,9 +2775,9 @@ class GenericMultipliedSizeView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -2778,13 +2786,13 @@ class GenericMultipliedSizeView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -2802,9 +2810,9 @@ class GenericMultipliedSizeView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -2813,13 +2821,13 @@ class GenericMultipliedSizeView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -2850,7 +2858,7 @@ struct EmbossReservedInternalIsGenericMultipliedSizeView< }; template -[[nodiscard]] inline GenericMultipliedSizeView< +inline GenericMultipliedSizeView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -2865,7 +2873,7 @@ MakeMultipliedSizeView( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericMultipliedSizeView> +inline GenericMultipliedSizeView> MakeMultipliedSizeView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericMultipliedSizeView>( @@ -2874,7 +2882,7 @@ MakeMultipliedSizeView( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericMultipliedSizeView< +inline GenericMultipliedSizeView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedMultipliedSizeView( T *emboss_reserved_local_data, @@ -2947,47 +2955,54 @@ class GenericNegativeTermsInSizesView final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; - { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!a().Ok()) return false; - if (!b().Ok()) return false; - if (!c().Ok()) return false; - if (!a_minus_b().Ok()) return false; - if (!a_minus_2b().Ok()) return false; - if (!a_minus_b_minus_c().Ok()) return false; - if (!ten_minus_a().Ok()) return false; - if (!a_minus_2c().Ok()) return false; - if (!a_minus_c().Ok()) return false; - if (!IntrinsicSizeInBytes().Ok()) return false; - if (!MaxSizeInBytes().Ok()) return false; - if (!MinSizeInBytes().Ok()) return false; - } - } + if (!a().Ok()) return false; + + if (!b().Ok()) return false; + + if (!c().Ok()) return false; + + if (!a_minus_b().Ok()) return false; + + if (!a_minus_2b().Ok()) return false; + + if (!a_minus_b_minus_c().Ok()) return false; + + if (!ten_minus_a().Ok()) return false; + + if (!a_minus_2c().Ok()) return false; + + if (!a_minus_c().Ok()) return false; + + if (!IntrinsicSizeInBytes().Ok()) return false; + + if (!MaxSizeInBytes().Ok()) return false; + + if (!MinSizeInBytes().Ok()) return false; + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - [[nodiscard]] ::std::size_t SizeInBytes() const { + ::std::size_t SizeInBytes() const { return static_cast(IntrinsicSizeInBytes().Read()); } - [[nodiscard]] bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericNegativeTermsInSizesView emboss_reserved_local_other) const { if (!has_a().Known()) return false; @@ -3144,7 +3159,7 @@ class GenericNegativeTermsInSizesView final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericNegativeTermsInSizesView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_a().ValueOr(false) && @@ -3289,7 +3304,7 @@ class GenericNegativeTermsInSizesView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericNegativeTermsInSizesView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -3688,34 +3703,34 @@ class GenericNegativeTermsInSizesView final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> a() const; - [[nodiscard]] ::emboss::support::Maybe has_a() const; + ::emboss::support::Maybe has_a() const; public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> b() const; - [[nodiscard]] ::emboss::support::Maybe has_b() const; + ::emboss::support::Maybe has_b() const; public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> c() const; - [[nodiscard]] ::emboss::support::Maybe has_c() const; + ::emboss::support::Maybe has_c() const; public: - [[nodiscard]] typename ::emboss::support::GenericArrayView< + typename ::emboss::support::GenericArrayView< typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock::template OffsetStorageType>, 8>> @@ -3724,10 +3739,10 @@ class GenericNegativeTermsInSizesView final { 8 > a_minus_b() const; - [[nodiscard]] ::emboss::support::Maybe has_a_minus_b() const; + ::emboss::support::Maybe has_a_minus_b() const; public: - [[nodiscard]] typename ::emboss::support::GenericArrayView< + typename ::emboss::support::GenericArrayView< typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock::template OffsetStorageType>, 8>> @@ -3736,10 +3751,10 @@ class GenericNegativeTermsInSizesView final { 8 > a_minus_2b() const; - [[nodiscard]] ::emboss::support::Maybe has_a_minus_2b() const; + ::emboss::support::Maybe has_a_minus_2b() const; public: - [[nodiscard]] typename ::emboss::support::GenericArrayView< + typename ::emboss::support::GenericArrayView< typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock::template OffsetStorageType>, 8>> @@ -3748,10 +3763,10 @@ class GenericNegativeTermsInSizesView final { 8 > a_minus_b_minus_c() const; - [[nodiscard]] ::emboss::support::Maybe has_a_minus_b_minus_c() const; + ::emboss::support::Maybe has_a_minus_b_minus_c() const; public: - [[nodiscard]] typename ::emboss::support::GenericArrayView< + typename ::emboss::support::GenericArrayView< typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock::template OffsetStorageType>, 8>> @@ -3760,10 +3775,10 @@ class GenericNegativeTermsInSizesView final { 8 > ten_minus_a() const; - [[nodiscard]] ::emboss::support::Maybe has_ten_minus_a() const; + ::emboss::support::Maybe has_ten_minus_a() const; public: - [[nodiscard]] typename ::emboss::support::GenericArrayView< + typename ::emboss::support::GenericArrayView< typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock::template OffsetStorageType>, 8>> @@ -3772,10 +3787,10 @@ class GenericNegativeTermsInSizesView final { 8 > a_minus_2c() const; - [[nodiscard]] ::emboss::support::Maybe has_a_minus_2c() const; + ::emboss::support::Maybe has_a_minus_2c() const; public: - [[nodiscard]] typename ::emboss::support::GenericArrayView< + typename ::emboss::support::GenericArrayView< typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock::template OffsetStorageType>, 8>> @@ -3784,7 +3799,7 @@ class GenericNegativeTermsInSizesView final { 8 > a_minus_c() const; - [[nodiscard]] ::emboss::support::Maybe has_a_minus_c() const; + ::emboss::support::Maybe has_a_minus_c() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -3803,17 +3818,17 @@ class GenericNegativeTermsInSizesView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - [[nodiscard]] ::std::int32_t Read() const { + ::std::int32_t Read() const { EMBOSS_CHECK(view_.has_IntrinsicSizeInBytes().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - [[nodiscard]] ::std::int32_t UncheckedRead() const { + ::std::int32_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - [[nodiscard]] bool Ok() const { + bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -3826,12 +3841,12 @@ class GenericNegativeTermsInSizesView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } private: - [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { + ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.a(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = view_.b(); @@ -3868,7 +3883,7 @@ class GenericNegativeTermsInSizesView final { return emboss_reserved_local_subexpr_32; } - [[nodiscard]] static constexpr bool ValueIsOk( + static constexpr bool ValueIsOk( ::std::int32_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -3876,8 +3891,8 @@ class GenericNegativeTermsInSizesView final { const GenericNegativeTermsInSizesView view_; }; - [[nodiscard]] EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; - [[nodiscard]] ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; + EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; public: class EmbossReservedDollarVirtualMaxSizeInBytesView final { @@ -3893,9 +3908,9 @@ class GenericNegativeTermsInSizesView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -3904,13 +3919,13 @@ class GenericNegativeTermsInSizesView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -3928,9 +3943,9 @@ class GenericNegativeTermsInSizesView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -3939,13 +3954,13 @@ class GenericNegativeTermsInSizesView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -3976,7 +3991,7 @@ struct EmbossReservedInternalIsGenericNegativeTermsInSizesView< }; template -[[nodiscard]] inline GenericNegativeTermsInSizesView< +inline GenericNegativeTermsInSizesView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -3991,7 +4006,7 @@ MakeNegativeTermsInSizesView( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericNegativeTermsInSizesView> +inline GenericNegativeTermsInSizesView> MakeNegativeTermsInSizesView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericNegativeTermsInSizesView>( @@ -4000,7 +4015,7 @@ MakeNegativeTermsInSizesView( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericNegativeTermsInSizesView< +inline GenericNegativeTermsInSizesView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedNegativeTermsInSizesView( T *emboss_reserved_local_data, @@ -4066,40 +4081,40 @@ class GenericNegativeTermInLocationView final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; - { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!a().Ok()) return false; - if (!b().Ok()) return false; - if (!IntrinsicSizeInBytes().Ok()) return false; - if (!MaxSizeInBytes().Ok()) return false; - if (!MinSizeInBytes().Ok()) return false; - } - } + if (!a().Ok()) return false; + + if (!b().Ok()) return false; + + if (!IntrinsicSizeInBytes().Ok()) return false; + + if (!MaxSizeInBytes().Ok()) return false; + + if (!MinSizeInBytes().Ok()) return false; + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - [[nodiscard]] ::std::size_t SizeInBytes() const { + ::std::size_t SizeInBytes() const { return static_cast(IntrinsicSizeInBytes().Read()); } - [[nodiscard]] bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericNegativeTermInLocationView emboss_reserved_local_other) const { if (!has_a().Known()) return false; @@ -4137,7 +4152,7 @@ class GenericNegativeTermInLocationView final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericNegativeTermInLocationView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_a().ValueOr(false) && @@ -4184,7 +4199,7 @@ class GenericNegativeTermInLocationView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericNegativeTermInLocationView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -4317,23 +4332,23 @@ class GenericNegativeTermInLocationView final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> a() const; - [[nodiscard]] ::emboss::support::Maybe has_a() const; + ::emboss::support::Maybe has_a() const; public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> b() const; - [[nodiscard]] ::emboss::support::Maybe has_b() const; + ::emboss::support::Maybe has_b() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -4352,17 +4367,17 @@ class GenericNegativeTermInLocationView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - [[nodiscard]] ::std::int32_t Read() const { + ::std::int32_t Read() const { EMBOSS_CHECK(view_.has_IntrinsicSizeInBytes().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - [[nodiscard]] ::std::int32_t UncheckedRead() const { + ::std::int32_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - [[nodiscard]] bool Ok() const { + bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -4375,12 +4390,12 @@ class GenericNegativeTermInLocationView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } private: - [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { + ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.a(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Difference(::emboss::support::Maybe(static_cast(10LL)), emboss_reserved_local_subexpr_2); @@ -4391,7 +4406,7 @@ class GenericNegativeTermInLocationView final { return emboss_reserved_local_subexpr_6; } - [[nodiscard]] static constexpr bool ValueIsOk( + static constexpr bool ValueIsOk( ::std::int32_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -4399,8 +4414,8 @@ class GenericNegativeTermInLocationView final { const GenericNegativeTermInLocationView view_; }; - [[nodiscard]] EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; - [[nodiscard]] ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; + EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; public: class EmbossReservedDollarVirtualMaxSizeInBytesView final { @@ -4416,9 +4431,9 @@ class GenericNegativeTermInLocationView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -4427,13 +4442,13 @@ class GenericNegativeTermInLocationView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -4451,9 +4466,9 @@ class GenericNegativeTermInLocationView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -4462,13 +4477,13 @@ class GenericNegativeTermInLocationView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -4499,7 +4514,7 @@ struct EmbossReservedInternalIsGenericNegativeTermInLocationView< }; template -[[nodiscard]] inline GenericNegativeTermInLocationView< +inline GenericNegativeTermInLocationView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -4514,7 +4529,7 @@ MakeNegativeTermInLocationView( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericNegativeTermInLocationView> +inline GenericNegativeTermInLocationView> MakeNegativeTermInLocationView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericNegativeTermInLocationView>( @@ -4523,7 +4538,7 @@ MakeNegativeTermInLocationView( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericNegativeTermInLocationView< +inline GenericNegativeTermInLocationView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedNegativeTermInLocationView( T *emboss_reserved_local_data, @@ -4591,42 +4606,44 @@ class GenericChainedSizeView final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; - { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!a().Ok()) return false; - if (!b().Ok()) return false; - if (!c().Ok()) return false; - if (!d().Ok()) return false; - if (!IntrinsicSizeInBytes().Ok()) return false; - if (!MaxSizeInBytes().Ok()) return false; - if (!MinSizeInBytes().Ok()) return false; - } - } + if (!a().Ok()) return false; + + if (!b().Ok()) return false; + + if (!c().Ok()) return false; + + if (!d().Ok()) return false; + + if (!IntrinsicSizeInBytes().Ok()) return false; + + if (!MaxSizeInBytes().Ok()) return false; + + if (!MinSizeInBytes().Ok()) return false; + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - [[nodiscard]] ::std::size_t SizeInBytes() const { + ::std::size_t SizeInBytes() const { return static_cast(IntrinsicSizeInBytes().Read()); } - [[nodiscard]] bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericChainedSizeView emboss_reserved_local_other) const { if (!has_a().Known()) return false; @@ -4698,7 +4715,7 @@ class GenericChainedSizeView final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericChainedSizeView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_a().ValueOr(false) && @@ -4773,7 +4790,7 @@ class GenericChainedSizeView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericChainedSizeView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -4982,39 +4999,39 @@ class GenericChainedSizeView final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> a() const; - [[nodiscard]] ::emboss::support::Maybe has_a() const; + ::emboss::support::Maybe has_a() const; public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> b() const; - [[nodiscard]] ::emboss::support::Maybe has_b() const; + ::emboss::support::Maybe has_b() const; public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> c() const; - [[nodiscard]] ::emboss::support::Maybe has_c() const; + ::emboss::support::Maybe has_c() const; public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> d() const; - [[nodiscard]] ::emboss::support::Maybe has_d() const; + ::emboss::support::Maybe has_d() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -5033,17 +5050,17 @@ class GenericChainedSizeView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - [[nodiscard]] ::std::int32_t Read() const { + ::std::int32_t Read() const { EMBOSS_CHECK(view_.has_IntrinsicSizeInBytes().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - [[nodiscard]] ::std::int32_t UncheckedRead() const { + ::std::int32_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - [[nodiscard]] bool Ok() const { + bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -5056,12 +5073,12 @@ class GenericChainedSizeView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } private: - [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { + ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.a(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Sum(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(1LL))); @@ -5079,7 +5096,7 @@ class GenericChainedSizeView final { return emboss_reserved_local_subexpr_13; } - [[nodiscard]] static constexpr bool ValueIsOk( + static constexpr bool ValueIsOk( ::std::int32_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -5087,8 +5104,8 @@ class GenericChainedSizeView final { const GenericChainedSizeView view_; }; - [[nodiscard]] EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; - [[nodiscard]] ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; + EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; public: class EmbossReservedDollarVirtualMaxSizeInBytesView final { @@ -5104,9 +5121,9 @@ class GenericChainedSizeView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -5115,13 +5132,13 @@ class GenericChainedSizeView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -5139,9 +5156,9 @@ class GenericChainedSizeView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -5150,13 +5167,13 @@ class GenericChainedSizeView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -5187,7 +5204,7 @@ struct EmbossReservedInternalIsGenericChainedSizeView< }; template -[[nodiscard]] inline GenericChainedSizeView< +inline GenericChainedSizeView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -5202,7 +5219,7 @@ MakeChainedSizeView( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericChainedSizeView> +inline GenericChainedSizeView> MakeChainedSizeView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericChainedSizeView>( @@ -5211,7 +5228,7 @@ MakeChainedSizeView( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericChainedSizeView< +inline GenericChainedSizeView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedChainedSizeView( T *emboss_reserved_local_data, @@ -5278,42 +5295,43 @@ class GenericFinalFieldOverlapsView final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; - { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!a().Ok()) return false; - if (!b().Ok()) return false; - if (!c().Ok()) return false; - if (!IntrinsicSizeInBytes().Ok()) return false; - if (!MaxSizeInBytes().Ok()) return false; - if (!MinSizeInBytes().Ok()) return false; - } - } + if (!a().Ok()) return false; + + if (!b().Ok()) return false; + + if (!c().Ok()) return false; + + if (!IntrinsicSizeInBytes().Ok()) return false; + + if (!MaxSizeInBytes().Ok()) return false; + + if (!MinSizeInBytes().Ok()) return false; + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { + static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - [[nodiscard]] static constexpr bool SizeIsKnown() { + static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericFinalFieldOverlapsView emboss_reserved_local_other) const { if (!has_a().Known()) return false; @@ -5368,7 +5386,7 @@ class GenericFinalFieldOverlapsView final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericFinalFieldOverlapsView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_a().ValueOr(false) && @@ -5429,7 +5447,7 @@ class GenericFinalFieldOverlapsView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericFinalFieldOverlapsView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -5600,31 +5618,31 @@ class GenericFinalFieldOverlapsView final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> a() const; - [[nodiscard]] ::emboss::support::Maybe has_a() const; + ::emboss::support::Maybe has_a() const; public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 32>> b() const; - [[nodiscard]] ::emboss::support::Maybe has_b() const; + ::emboss::support::Maybe has_b() const; public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<16, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 16>> c() const; - [[nodiscard]] ::emboss::support::Maybe has_c() const; + ::emboss::support::Maybe has_c() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -5640,9 +5658,9 @@ class GenericFinalFieldOverlapsView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -5651,13 +5669,13 @@ class GenericFinalFieldOverlapsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -5675,9 +5693,9 @@ class GenericFinalFieldOverlapsView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -5686,13 +5704,13 @@ class GenericFinalFieldOverlapsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -5710,9 +5728,9 @@ class GenericFinalFieldOverlapsView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -5721,13 +5739,13 @@ class GenericFinalFieldOverlapsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -5758,7 +5776,7 @@ struct EmbossReservedInternalIsGenericFinalFieldOverlapsView< }; template -[[nodiscard]] inline GenericFinalFieldOverlapsView< +inline GenericFinalFieldOverlapsView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -5773,7 +5791,7 @@ MakeFinalFieldOverlapsView( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericFinalFieldOverlapsView> +inline GenericFinalFieldOverlapsView> MakeFinalFieldOverlapsView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericFinalFieldOverlapsView>( @@ -5782,7 +5800,7 @@ MakeFinalFieldOverlapsView( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericFinalFieldOverlapsView< +inline GenericFinalFieldOverlapsView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedFinalFieldOverlapsView( T *emboss_reserved_local_data, @@ -5850,42 +5868,44 @@ class GenericDynamicFinalFieldOverlapsView final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; - { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!a().Ok()) return false; - if (!b().Ok()) return false; - if (!c().Ok()) return false; - if (!d().Ok()) return false; - if (!IntrinsicSizeInBytes().Ok()) return false; - if (!MaxSizeInBytes().Ok()) return false; - if (!MinSizeInBytes().Ok()) return false; - } - } + if (!a().Ok()) return false; + + if (!b().Ok()) return false; + + if (!c().Ok()) return false; + + if (!d().Ok()) return false; + + if (!IntrinsicSizeInBytes().Ok()) return false; + + if (!MaxSizeInBytes().Ok()) return false; + + if (!MinSizeInBytes().Ok()) return false; + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - [[nodiscard]] ::std::size_t SizeInBytes() const { + ::std::size_t SizeInBytes() const { return static_cast(IntrinsicSizeInBytes().Read()); } - [[nodiscard]] bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericDynamicFinalFieldOverlapsView emboss_reserved_local_other) const { if (!has_a().Known()) return false; @@ -5957,7 +5977,7 @@ class GenericDynamicFinalFieldOverlapsView final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericDynamicFinalFieldOverlapsView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_a().ValueOr(false) && @@ -6032,7 +6052,7 @@ class GenericDynamicFinalFieldOverlapsView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericDynamicFinalFieldOverlapsView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -6241,39 +6261,39 @@ class GenericDynamicFinalFieldOverlapsView final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> a() const; - [[nodiscard]] ::emboss::support::Maybe has_a() const; + ::emboss::support::Maybe has_a() const; public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> b() const; - [[nodiscard]] ::emboss::support::Maybe has_b() const; + ::emboss::support::Maybe has_b() const; public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<16, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 16>> c() const; - [[nodiscard]] ::emboss::support::Maybe has_c() const; + ::emboss::support::Maybe has_c() const; public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> d() const; - [[nodiscard]] ::emboss::support::Maybe has_d() const; + ::emboss::support::Maybe has_d() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -6292,17 +6312,17 @@ class GenericDynamicFinalFieldOverlapsView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - [[nodiscard]] ::std::int32_t Read() const { + ::std::int32_t Read() const { EMBOSS_CHECK(view_.has_IntrinsicSizeInBytes().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - [[nodiscard]] ::std::int32_t UncheckedRead() const { + ::std::int32_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - [[nodiscard]] bool Ok() const { + bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -6315,12 +6335,12 @@ class GenericDynamicFinalFieldOverlapsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } private: - [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { + ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.a(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Sum(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(2LL))); @@ -6333,7 +6353,7 @@ class GenericDynamicFinalFieldOverlapsView final { return emboss_reserved_local_subexpr_8; } - [[nodiscard]] static constexpr bool ValueIsOk( + static constexpr bool ValueIsOk( ::std::int32_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -6341,8 +6361,8 @@ class GenericDynamicFinalFieldOverlapsView final { const GenericDynamicFinalFieldOverlapsView view_; }; - [[nodiscard]] EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; - [[nodiscard]] ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; + EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; public: class EmbossReservedDollarVirtualMaxSizeInBytesView final { @@ -6358,9 +6378,9 @@ class GenericDynamicFinalFieldOverlapsView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -6369,13 +6389,13 @@ class GenericDynamicFinalFieldOverlapsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -6393,9 +6413,9 @@ class GenericDynamicFinalFieldOverlapsView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -6404,13 +6424,13 @@ class GenericDynamicFinalFieldOverlapsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -6441,7 +6461,7 @@ struct EmbossReservedInternalIsGenericDynamicFinalFieldOverlapsView< }; template -[[nodiscard]] inline GenericDynamicFinalFieldOverlapsView< +inline GenericDynamicFinalFieldOverlapsView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -6456,7 +6476,7 @@ MakeDynamicFinalFieldOverlapsView( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericDynamicFinalFieldOverlapsView> +inline GenericDynamicFinalFieldOverlapsView> MakeDynamicFinalFieldOverlapsView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericDynamicFinalFieldOverlapsView>( @@ -6465,7 +6485,7 @@ MakeDynamicFinalFieldOverlapsView( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericDynamicFinalFieldOverlapsView< +inline GenericDynamicFinalFieldOverlapsView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedDynamicFinalFieldOverlapsView( T *emboss_reserved_local_data, @@ -6531,40 +6551,40 @@ class GenericDynamicFieldDependsOnLaterFieldView final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; - { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!a().Ok()) return false; - if (!b().Ok()) return false; - if (!IntrinsicSizeInBytes().Ok()) return false; - if (!MaxSizeInBytes().Ok()) return false; - if (!MinSizeInBytes().Ok()) return false; - } - } + if (!a().Ok()) return false; + + if (!b().Ok()) return false; + + if (!IntrinsicSizeInBytes().Ok()) return false; + + if (!MaxSizeInBytes().Ok()) return false; + + if (!MinSizeInBytes().Ok()) return false; + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - [[nodiscard]] ::std::size_t SizeInBytes() const { + ::std::size_t SizeInBytes() const { return static_cast(IntrinsicSizeInBytes().Read()); } - [[nodiscard]] bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericDynamicFieldDependsOnLaterFieldView emboss_reserved_local_other) const { if (!has_a().Known()) return false; @@ -6602,7 +6622,7 @@ class GenericDynamicFieldDependsOnLaterFieldView final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericDynamicFieldDependsOnLaterFieldView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_a().ValueOr(false) && @@ -6649,7 +6669,7 @@ class GenericDynamicFieldDependsOnLaterFieldView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericDynamicFieldDependsOnLaterFieldView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -6782,23 +6802,23 @@ class GenericDynamicFieldDependsOnLaterFieldView final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> a() const; - [[nodiscard]] ::emboss::support::Maybe has_a() const; + ::emboss::support::Maybe has_a() const; public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> b() const; - [[nodiscard]] ::emboss::support::Maybe has_b() const; + ::emboss::support::Maybe has_b() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -6817,17 +6837,17 @@ class GenericDynamicFieldDependsOnLaterFieldView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - [[nodiscard]] ::std::int32_t Read() const { + ::std::int32_t Read() const { EMBOSS_CHECK(view_.has_IntrinsicSizeInBytes().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - [[nodiscard]] ::std::int32_t UncheckedRead() const { + ::std::int32_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - [[nodiscard]] bool Ok() const { + bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -6840,12 +6860,12 @@ class GenericDynamicFieldDependsOnLaterFieldView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } private: - [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { + ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.a(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Sum(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(1LL))); @@ -6856,7 +6876,7 @@ class GenericDynamicFieldDependsOnLaterFieldView final { return emboss_reserved_local_subexpr_6; } - [[nodiscard]] static constexpr bool ValueIsOk( + static constexpr bool ValueIsOk( ::std::int32_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -6864,8 +6884,8 @@ class GenericDynamicFieldDependsOnLaterFieldView final { const GenericDynamicFieldDependsOnLaterFieldView view_; }; - [[nodiscard]] EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; - [[nodiscard]] ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; + EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; public: class EmbossReservedDollarVirtualMaxSizeInBytesView final { @@ -6881,9 +6901,9 @@ class GenericDynamicFieldDependsOnLaterFieldView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -6892,13 +6912,13 @@ class GenericDynamicFieldDependsOnLaterFieldView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -6916,9 +6936,9 @@ class GenericDynamicFieldDependsOnLaterFieldView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -6927,13 +6947,13 @@ class GenericDynamicFieldDependsOnLaterFieldView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -6964,7 +6984,7 @@ struct EmbossReservedInternalIsGenericDynamicFieldDependsOnLaterFieldView< }; template -[[nodiscard]] inline GenericDynamicFieldDependsOnLaterFieldView< +inline GenericDynamicFieldDependsOnLaterFieldView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -6979,7 +6999,7 @@ MakeDynamicFieldDependsOnLaterFieldView( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericDynamicFieldDependsOnLaterFieldView> +inline GenericDynamicFieldDependsOnLaterFieldView> MakeDynamicFieldDependsOnLaterFieldView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericDynamicFieldDependsOnLaterFieldView>( @@ -6988,7 +7008,7 @@ MakeDynamicFieldDependsOnLaterFieldView( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericDynamicFieldDependsOnLaterFieldView< +inline GenericDynamicFieldDependsOnLaterFieldView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedDynamicFieldDependsOnLaterFieldView( T *emboss_reserved_local_data, @@ -7055,42 +7075,43 @@ class GenericDynamicFieldDoesNotAffectSizeView final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; - { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!a().Ok()) return false; - if (!b().Ok()) return false; - if (!c().Ok()) return false; - if (!IntrinsicSizeInBytes().Ok()) return false; - if (!MaxSizeInBytes().Ok()) return false; - if (!MinSizeInBytes().Ok()) return false; - } - } + if (!a().Ok()) return false; + + if (!b().Ok()) return false; + + if (!c().Ok()) return false; + + if (!IntrinsicSizeInBytes().Ok()) return false; + + if (!MaxSizeInBytes().Ok()) return false; + + if (!MinSizeInBytes().Ok()) return false; + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { + static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - [[nodiscard]] static constexpr bool SizeIsKnown() { + static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericDynamicFieldDoesNotAffectSizeView emboss_reserved_local_other) const { if (!has_a().Known()) return false; @@ -7145,7 +7166,7 @@ class GenericDynamicFieldDoesNotAffectSizeView final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericDynamicFieldDoesNotAffectSizeView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_a().ValueOr(false) && @@ -7206,7 +7227,7 @@ class GenericDynamicFieldDoesNotAffectSizeView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericDynamicFieldDoesNotAffectSizeView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -7377,31 +7398,31 @@ class GenericDynamicFieldDoesNotAffectSizeView final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> a() const; - [[nodiscard]] ::emboss::support::Maybe has_a() const; + ::emboss::support::Maybe has_a() const; public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> b() const; - [[nodiscard]] ::emboss::support::Maybe has_b() const; + ::emboss::support::Maybe has_b() const; public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> c() const; - [[nodiscard]] ::emboss::support::Maybe has_c() const; + ::emboss::support::Maybe has_c() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -7417,9 +7438,9 @@ class GenericDynamicFieldDoesNotAffectSizeView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -7428,13 +7449,13 @@ class GenericDynamicFieldDoesNotAffectSizeView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -7452,9 +7473,9 @@ class GenericDynamicFieldDoesNotAffectSizeView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -7463,13 +7484,13 @@ class GenericDynamicFieldDoesNotAffectSizeView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -7487,9 +7508,9 @@ class GenericDynamicFieldDoesNotAffectSizeView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -7498,13 +7519,13 @@ class GenericDynamicFieldDoesNotAffectSizeView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -7535,7 +7556,7 @@ struct EmbossReservedInternalIsGenericDynamicFieldDoesNotAffectSizeView< }; template -[[nodiscard]] inline GenericDynamicFieldDoesNotAffectSizeView< +inline GenericDynamicFieldDoesNotAffectSizeView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -7550,7 +7571,7 @@ MakeDynamicFieldDoesNotAffectSizeView( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericDynamicFieldDoesNotAffectSizeView> +inline GenericDynamicFieldDoesNotAffectSizeView> MakeDynamicFieldDoesNotAffectSizeView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericDynamicFieldDoesNotAffectSizeView>( @@ -7559,7 +7580,7 @@ MakeDynamicFieldDoesNotAffectSizeView( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericDynamicFieldDoesNotAffectSizeView< +inline GenericDynamicFieldDoesNotAffectSizeView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedDynamicFieldDoesNotAffectSizeView( T *emboss_reserved_local_data, diff --git a/testdata/golden_cpp/enum.emb.h b/testdata/golden_cpp/enum.emb.h index ddd45bf..57b9e87 100644 --- a/testdata/golden_cpp/enum.emb.h +++ b/testdata/golden_cpp/enum.emb.h @@ -136,46 +136,46 @@ class GenericConstantsView final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; - { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!sprocket().Ok()) return false; - if (!geegaw().Ok()) return false; - if (!IntrinsicSizeInBytes().Ok()) return false; - if (!MaxSizeInBytes().Ok()) return false; - if (!MinSizeInBytes().Ok()) return false; - } - } + if (!sprocket().Ok()) return false; + + if (!geegaw().Ok()) return false; + + if (!IntrinsicSizeInBytes().Ok()) return false; + + if (!MaxSizeInBytes().Ok()) return false; + + if (!MinSizeInBytes().Ok()) return false; + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { + static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - [[nodiscard]] static constexpr bool SizeIsKnown() { + static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericConstantsView emboss_reserved_local_other) const { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericConstantsView emboss_reserved_local_other) const { return true; } @@ -195,7 +195,7 @@ class GenericConstantsView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericConstantsView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -291,7 +291,7 @@ class GenericConstantsView final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: class EmbossReservedVirtualSprocketView final { @@ -307,9 +307,9 @@ class GenericConstantsView final { default; ~EmbossReservedVirtualSprocketView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -318,13 +318,13 @@ class GenericConstantsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedVirtualSprocketView sprocket() { + static constexpr EmbossReservedVirtualSprocketView sprocket() { return EmbossReservedVirtualSprocketView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_sprocket() { + static constexpr ::emboss::support::Maybe has_sprocket() { return ::emboss::support::Maybe(true); } @@ -342,9 +342,9 @@ class GenericConstantsView final { default; ~EmbossReservedVirtualGeegawView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -353,13 +353,13 @@ class GenericConstantsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedVirtualGeegawView geegaw() { + static constexpr EmbossReservedVirtualGeegawView geegaw() { return EmbossReservedVirtualGeegawView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_geegaw() { + static constexpr ::emboss::support::Maybe has_geegaw() { return ::emboss::support::Maybe(true); } @@ -377,9 +377,9 @@ class GenericConstantsView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -388,13 +388,13 @@ class GenericConstantsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -412,9 +412,9 @@ class GenericConstantsView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -423,13 +423,13 @@ class GenericConstantsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -447,9 +447,9 @@ class GenericConstantsView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -458,13 +458,13 @@ class GenericConstantsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -495,7 +495,7 @@ struct EmbossReservedInternalIsGenericConstantsView< }; template -[[nodiscard]] inline GenericConstantsView< +inline GenericConstantsView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -510,7 +510,7 @@ MakeConstantsView( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericConstantsView> +inline GenericConstantsView> MakeConstantsView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericConstantsView>( @@ -519,7 +519,7 @@ MakeConstantsView( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericConstantsView< +inline GenericConstantsView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedConstantsView( T *emboss_reserved_local_data, @@ -1535,40 +1535,39 @@ class GenericEmbossReservedAnonymousField1View final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; - { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!wide_kind_in_bits().Ok()) return false; - if (!IntrinsicSizeInBits().Ok()) return false; - if (!MaxSizeInBits().Ok()) return false; - if (!MinSizeInBits().Ok()) return false; - } - } + if (!wide_kind_in_bits().Ok()) return false; + + if (!IntrinsicSizeInBits().Ok()) return false; + + if (!MaxSizeInBits().Ok()) return false; + + if (!MinSizeInBits().Ok()) return false; + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBits().Ok() && backing_.SizeInBits() >= static_cast( IntrinsicSizeInBits().UncheckedRead()); } - [[nodiscard]] static constexpr ::std::size_t SizeInBits() { + static constexpr ::std::size_t SizeInBits() { return static_cast(IntrinsicSizeInBits().Read()); } - [[nodiscard]] static constexpr bool SizeIsKnown() { + static constexpr bool SizeIsKnown() { return IntrinsicSizeInBits().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericEmbossReservedAnonymousField1View emboss_reserved_local_other) const { if (!has_wide_kind_in_bits().Known()) return false; @@ -1589,7 +1588,7 @@ class GenericEmbossReservedAnonymousField1View final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericEmbossReservedAnonymousField1View emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_wide_kind_in_bits().ValueOr(false) && @@ -1622,7 +1621,7 @@ class GenericEmbossReservedAnonymousField1View final { emboss_reserved_local_other.IntrinsicSizeInBits().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericEmbossReservedAnonymousField1View emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -1717,16 +1716,16 @@ class GenericEmbossReservedAnonymousField1View final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: - [[nodiscard]] typename ::emboss::support::EnumView< + typename ::emboss::support::EnumView< /**/ ::emboss::test::Kind, ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, typename Storage::template OffsetStorageType> wide_kind_in_bits() const; - [[nodiscard]] ::emboss::support::Maybe has_wide_kind_in_bits() const; + ::emboss::support::Maybe has_wide_kind_in_bits() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBitsView final { @@ -1742,9 +1741,9 @@ class GenericEmbossReservedAnonymousField1View final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBitsView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -1753,13 +1752,13 @@ class GenericEmbossReservedAnonymousField1View final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBitsView IntrinsicSizeInBits() { + static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBitsView IntrinsicSizeInBits() { return EmbossReservedDollarVirtualIntrinsicSizeInBitsView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBits() { + static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBits() { return ::emboss::support::Maybe(true); } @@ -1777,9 +1776,9 @@ class GenericEmbossReservedAnonymousField1View final { default; ~EmbossReservedDollarVirtualMaxSizeInBitsView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -1788,13 +1787,13 @@ class GenericEmbossReservedAnonymousField1View final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBitsView MaxSizeInBits() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBitsView MaxSizeInBits() { return EmbossReservedDollarVirtualMaxSizeInBitsView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBits() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBits() { return ::emboss::support::Maybe(true); } @@ -1812,9 +1811,9 @@ class GenericEmbossReservedAnonymousField1View final { default; ~EmbossReservedDollarVirtualMinSizeInBitsView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -1823,13 +1822,13 @@ class GenericEmbossReservedAnonymousField1View final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBitsView MinSizeInBits() { + static constexpr EmbossReservedDollarVirtualMinSizeInBitsView MinSizeInBits() { return EmbossReservedDollarVirtualMinSizeInBitsView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBits() { + static constexpr ::emboss::support::Maybe has_MinSizeInBits() { return ::emboss::support::Maybe(true); } @@ -1860,7 +1859,7 @@ struct EmbossReservedInternalIsGenericEmbossReservedAnonymousField1View< }; template -[[nodiscard]] inline GenericEmbossReservedAnonymousField1View< +inline GenericEmbossReservedAnonymousField1View< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -1875,7 +1874,7 @@ MakeEmbossReservedAnonymousField1View( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericEmbossReservedAnonymousField1View> +inline GenericEmbossReservedAnonymousField1View> MakeEmbossReservedAnonymousField1View( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericEmbossReservedAnonymousField1View>( @@ -1884,7 +1883,7 @@ MakeEmbossReservedAnonymousField1View( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericEmbossReservedAnonymousField1View< +inline GenericEmbossReservedAnonymousField1View< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedEmbossReservedAnonymousField1View( T *emboss_reserved_local_data, @@ -1945,51 +1944,57 @@ class GenericManifestEntryView final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; const auto emboss_reserved_local_ok_subexpr_1 = ::emboss::support::And(::emboss::support::Maybe(true), ::emboss::support::Maybe(true)); + if (!kind().Ok()) return false; + + if (!count().Ok()) return false; + + if (!wide_kind().Ok()) return false; + + if (!emboss_reserved_anonymous_field_1().Ok()) return false; + + if (!IntrinsicSizeInBytes().Ok()) return false; + + if (!MaxSizeInBytes().Ok()) return false; + + if (!MinSizeInBytes().Ok()) return false; + { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!kind().Ok()) return false; - if (!count().Ok()) return false; - if (!wide_kind().Ok()) return false; - if (!emboss_reserved_anonymous_field_1().Ok()) return false; - if (!IntrinsicSizeInBytes().Ok()) return false; - if (!MaxSizeInBytes().Ok()) return false; - if (!MinSizeInBytes().Ok()) return false; - } - } - { + const auto emboss_reserved_cond = emboss_reserved_local_ok_subexpr_1; if (!emboss_reserved_cond.Known()) return false; if (emboss_reserved_cond.ValueOrDefault()) { if (!wide_kind_in_bits().Ok()) return false; + + } } + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { + static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - [[nodiscard]] static constexpr bool SizeIsKnown() { + static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericManifestEntryView emboss_reserved_local_other) const { if (!has_kind().Known()) return false; @@ -2061,7 +2066,7 @@ class GenericManifestEntryView final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericManifestEntryView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_kind().ValueOr(false) && @@ -2136,7 +2141,7 @@ class GenericManifestEntryView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericManifestEntryView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -2345,46 +2350,46 @@ class GenericManifestEntryView final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: - [[nodiscard]] typename ::emboss::support::EnumView< + typename ::emboss::support::EnumView< /**/ ::emboss::test::Kind, ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> kind() const; - [[nodiscard]] ::emboss::support::Maybe has_kind() const; + ::emboss::support::Maybe has_kind() const; public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 32>> count() const; - [[nodiscard]] ::emboss::support::Maybe has_count() const; + ::emboss::support::Maybe has_count() const; public: - [[nodiscard]] typename ::emboss::support::EnumView< + typename ::emboss::support::EnumView< /**/ ::emboss::test::Kind, ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 32>> wide_kind() const; - [[nodiscard]] ::emboss::support::Maybe has_wide_kind() const; + ::emboss::support::Maybe has_wide_kind() const; private: - [[nodiscard]] typename ::emboss::test::ManifestEntry::GenericEmbossReservedAnonymousField1View>, 40>> + typename ::emboss::test::ManifestEntry::GenericEmbossReservedAnonymousField1View>, 40>> emboss_reserved_anonymous_field_1() const; - [[nodiscard]] ::emboss::support::Maybe has_emboss_reserved_anonymous_field_1() const; + ::emboss::support::Maybe has_emboss_reserved_anonymous_field_1() const; public: - [[nodiscard]] auto wide_kind_in_bits() const -> decltype(this->emboss_reserved_anonymous_field_1().wide_kind_in_bits()) { + auto wide_kind_in_bits() const -> decltype(this->emboss_reserved_anonymous_field_1().wide_kind_in_bits()) { return has_wide_kind_in_bits().ValueOrDefault() ? emboss_reserved_anonymous_field_1().wide_kind_in_bits() : decltype(this->emboss_reserved_anonymous_field_1().wide_kind_in_bits())(); } - [[nodiscard]] ::emboss::support::Maybe has_wide_kind_in_bits() const; + ::emboss::support::Maybe has_wide_kind_in_bits() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -2400,9 +2405,9 @@ class GenericManifestEntryView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -2411,13 +2416,13 @@ class GenericManifestEntryView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -2435,9 +2440,9 @@ class GenericManifestEntryView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -2446,13 +2451,13 @@ class GenericManifestEntryView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -2470,9 +2475,9 @@ class GenericManifestEntryView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -2481,13 +2486,13 @@ class GenericManifestEntryView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -2518,7 +2523,7 @@ struct EmbossReservedInternalIsGenericManifestEntryView< }; template -[[nodiscard]] inline GenericManifestEntryView< +inline GenericManifestEntryView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -2533,7 +2538,7 @@ MakeManifestEntryView( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericManifestEntryView> +inline GenericManifestEntryView> MakeManifestEntryView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericManifestEntryView>( @@ -2542,7 +2547,7 @@ MakeManifestEntryView( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericManifestEntryView< +inline GenericManifestEntryView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedManifestEntryView( T *emboss_reserved_local_data, @@ -2694,40 +2699,39 @@ class GenericStructContainingEnumView final { using Status = ::emboss::test::StructContainingEnum::Status; - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; - { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!bar().Ok()) return false; - if (!IntrinsicSizeInBytes().Ok()) return false; - if (!MaxSizeInBytes().Ok()) return false; - if (!MinSizeInBytes().Ok()) return false; - } - } + if (!bar().Ok()) return false; + + if (!IntrinsicSizeInBytes().Ok()) return false; + + if (!MaxSizeInBytes().Ok()) return false; + + if (!MinSizeInBytes().Ok()) return false; + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { + static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - [[nodiscard]] static constexpr bool SizeIsKnown() { + static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericStructContainingEnumView emboss_reserved_local_other) const { if (!has_bar().Known()) return false; @@ -2748,7 +2752,7 @@ class GenericStructContainingEnumView final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericStructContainingEnumView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_bar().ValueOr(false) && @@ -2781,7 +2785,7 @@ class GenericStructContainingEnumView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericStructContainingEnumView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -2876,15 +2880,15 @@ class GenericStructContainingEnumView final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> bar() const; - [[nodiscard]] ::emboss::support::Maybe has_bar() const; + ::emboss::support::Maybe has_bar() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -2900,9 +2904,9 @@ class GenericStructContainingEnumView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -2911,13 +2915,13 @@ class GenericStructContainingEnumView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -2935,9 +2939,9 @@ class GenericStructContainingEnumView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -2946,13 +2950,13 @@ class GenericStructContainingEnumView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -2970,9 +2974,9 @@ class GenericStructContainingEnumView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -2981,13 +2985,13 @@ class GenericStructContainingEnumView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -3018,7 +3022,7 @@ struct EmbossReservedInternalIsGenericStructContainingEnumView< }; template -[[nodiscard]] inline GenericStructContainingEnumView< +inline GenericStructContainingEnumView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -3033,7 +3037,7 @@ MakeStructContainingEnumView( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericStructContainingEnumView> +inline GenericStructContainingEnumView> MakeStructContainingEnumView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericStructContainingEnumView>( @@ -3042,7 +3046,7 @@ MakeStructContainingEnumView( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericStructContainingEnumView< +inline GenericStructContainingEnumView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedStructContainingEnumView( T *emboss_reserved_local_data, diff --git a/testdata/golden_cpp/enum_case.emb.h b/testdata/golden_cpp/enum_case.emb.h index 6ef116a..116ffc1 100644 --- a/testdata/golden_cpp/enum_case.emb.h +++ b/testdata/golden_cpp/enum_case.emb.h @@ -331,42 +331,43 @@ class GenericUseKCamelEnumCaseView final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; - { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!v().Ok()) return false; - if (!first().Ok()) return false; - if (!v_is_first().Ok()) return false; - if (!IntrinsicSizeInBytes().Ok()) return false; - if (!MaxSizeInBytes().Ok()) return false; - if (!MinSizeInBytes().Ok()) return false; - } - } + if (!v().Ok()) return false; + + if (!first().Ok()) return false; + + if (!v_is_first().Ok()) return false; + + if (!IntrinsicSizeInBytes().Ok()) return false; + + if (!MaxSizeInBytes().Ok()) return false; + + if (!MinSizeInBytes().Ok()) return false; + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { + static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - [[nodiscard]] static constexpr bool SizeIsKnown() { + static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericUseKCamelEnumCaseView emboss_reserved_local_other) const { if (!has_v().Known()) return false; @@ -387,7 +388,7 @@ class GenericUseKCamelEnumCaseView final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericUseKCamelEnumCaseView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_v().ValueOr(false) && @@ -420,7 +421,7 @@ class GenericUseKCamelEnumCaseView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericUseKCamelEnumCaseView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -553,16 +554,16 @@ class GenericUseKCamelEnumCaseView final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: - [[nodiscard]] typename ::emboss::support::EnumView< + typename ::emboss::support::EnumView< /**/ ::emboss::test::EnumDefault, ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 32>> v() const; - [[nodiscard]] ::emboss::support::Maybe has_v() const; + ::emboss::support::Maybe has_v() const; public: class EmbossReservedVirtualFirstView final { @@ -578,9 +579,9 @@ class GenericUseKCamelEnumCaseView final { default; ~EmbossReservedVirtualFirstView() = default; - [[nodiscard]] static constexpr ::emboss::test::EnumDefault Read(); - [[nodiscard]] static constexpr ::emboss::test::EnumDefault UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::emboss::test::EnumDefault Read(); + static constexpr ::emboss::test::EnumDefault UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -589,13 +590,13 @@ class GenericUseKCamelEnumCaseView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedVirtualFirstView first() { + static constexpr EmbossReservedVirtualFirstView first() { return EmbossReservedVirtualFirstView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_first() { + static constexpr ::emboss::support::Maybe has_first() { return ::emboss::support::Maybe(true); } @@ -616,17 +617,17 @@ class GenericUseKCamelEnumCaseView final { default; ~EmbossReservedVirtualVIsFirstView() = default; - [[nodiscard]] bool Read() const { + bool Read() const { EMBOSS_CHECK(view_.has_v_is_first().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - [[nodiscard]] bool UncheckedRead() const { + bool UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - [[nodiscard]] bool Ok() const { + bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -639,12 +640,12 @@ class GenericUseKCamelEnumCaseView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } private: - [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { + ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.v(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(0))); @@ -652,7 +653,7 @@ class GenericUseKCamelEnumCaseView final { return emboss_reserved_local_subexpr_3; } - [[nodiscard]] static constexpr bool ValueIsOk( + static constexpr bool ValueIsOk( bool emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -660,8 +661,8 @@ class GenericUseKCamelEnumCaseView final { const GenericUseKCamelEnumCaseView view_; }; - [[nodiscard]] EmbossReservedVirtualVIsFirstView v_is_first() const; - [[nodiscard]] ::emboss::support::Maybe has_v_is_first() const; + EmbossReservedVirtualVIsFirstView v_is_first() const; + ::emboss::support::Maybe has_v_is_first() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -677,9 +678,9 @@ class GenericUseKCamelEnumCaseView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -688,13 +689,13 @@ class GenericUseKCamelEnumCaseView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -712,9 +713,9 @@ class GenericUseKCamelEnumCaseView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -723,13 +724,13 @@ class GenericUseKCamelEnumCaseView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -747,9 +748,9 @@ class GenericUseKCamelEnumCaseView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -758,13 +759,13 @@ class GenericUseKCamelEnumCaseView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -795,7 +796,7 @@ struct EmbossReservedInternalIsGenericUseKCamelEnumCaseView< }; template -[[nodiscard]] inline GenericUseKCamelEnumCaseView< +inline GenericUseKCamelEnumCaseView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -810,7 +811,7 @@ MakeUseKCamelEnumCaseView( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericUseKCamelEnumCaseView> +inline GenericUseKCamelEnumCaseView> MakeUseKCamelEnumCaseView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericUseKCamelEnumCaseView>( @@ -819,7 +820,7 @@ MakeUseKCamelEnumCaseView( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericUseKCamelEnumCaseView< +inline GenericUseKCamelEnumCaseView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedUseKCamelEnumCaseView( T *emboss_reserved_local_data, diff --git a/testdata/golden_cpp/explicit_sizes.emb.h b/testdata/golden_cpp/explicit_sizes.emb.h index 566dcf7..9003688 100644 --- a/testdata/golden_cpp/explicit_sizes.emb.h +++ b/testdata/golden_cpp/explicit_sizes.emb.h @@ -115,42 +115,43 @@ class GenericSizedUIntArraysView final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; - { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!one_nibble().Ok()) return false; - if (!two_nibble().Ok()) return false; - if (!four_nibble().Ok()) return false; - if (!IntrinsicSizeInBits().Ok()) return false; - if (!MaxSizeInBits().Ok()) return false; - if (!MinSizeInBits().Ok()) return false; - } - } + if (!one_nibble().Ok()) return false; + + if (!two_nibble().Ok()) return false; + + if (!four_nibble().Ok()) return false; + + if (!IntrinsicSizeInBits().Ok()) return false; + + if (!MaxSizeInBits().Ok()) return false; + + if (!MinSizeInBits().Ok()) return false; + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBits().Ok() && backing_.SizeInBits() >= static_cast( IntrinsicSizeInBits().UncheckedRead()); } - [[nodiscard]] static constexpr ::std::size_t SizeInBits() { + static constexpr ::std::size_t SizeInBits() { return static_cast(IntrinsicSizeInBits().Read()); } - [[nodiscard]] static constexpr bool SizeIsKnown() { + static constexpr bool SizeIsKnown() { return IntrinsicSizeInBits().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericSizedUIntArraysView emboss_reserved_local_other) const { if (!has_one_nibble().Known()) return false; @@ -205,7 +206,7 @@ class GenericSizedUIntArraysView final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericSizedUIntArraysView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_one_nibble().ValueOr(false) && @@ -266,7 +267,7 @@ class GenericSizedUIntArraysView final { emboss_reserved_local_other.IntrinsicSizeInBits().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericSizedUIntArraysView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -437,10 +438,10 @@ class GenericSizedUIntArraysView final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: - [[nodiscard]] typename ::emboss::support::GenericArrayView< + typename ::emboss::support::GenericArrayView< typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<4, ::emboss::support::AllValuesAreOk>, typename Storage::template OffsetStorageType::template OffsetStorageType> @@ -449,10 +450,10 @@ class GenericSizedUIntArraysView final { 1 > one_nibble() const; - [[nodiscard]] ::emboss::support::Maybe has_one_nibble() const; + ::emboss::support::Maybe has_one_nibble() const; public: - [[nodiscard]] typename ::emboss::support::GenericArrayView< + typename ::emboss::support::GenericArrayView< typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename Storage::template OffsetStorageType::template OffsetStorageType> @@ -461,10 +462,10 @@ class GenericSizedUIntArraysView final { 1 > two_nibble() const; - [[nodiscard]] ::emboss::support::Maybe has_two_nibble() const; + ::emboss::support::Maybe has_two_nibble() const; public: - [[nodiscard]] typename ::emboss::support::GenericArrayView< + typename ::emboss::support::GenericArrayView< typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<16, ::emboss::support::AllValuesAreOk>, typename Storage::template OffsetStorageType::template OffsetStorageType> @@ -473,7 +474,7 @@ class GenericSizedUIntArraysView final { 1 > four_nibble() const; - [[nodiscard]] ::emboss::support::Maybe has_four_nibble() const; + ::emboss::support::Maybe has_four_nibble() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBitsView final { @@ -489,9 +490,9 @@ class GenericSizedUIntArraysView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBitsView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -500,13 +501,13 @@ class GenericSizedUIntArraysView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBitsView IntrinsicSizeInBits() { + static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBitsView IntrinsicSizeInBits() { return EmbossReservedDollarVirtualIntrinsicSizeInBitsView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBits() { + static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBits() { return ::emboss::support::Maybe(true); } @@ -524,9 +525,9 @@ class GenericSizedUIntArraysView final { default; ~EmbossReservedDollarVirtualMaxSizeInBitsView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -535,13 +536,13 @@ class GenericSizedUIntArraysView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBitsView MaxSizeInBits() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBitsView MaxSizeInBits() { return EmbossReservedDollarVirtualMaxSizeInBitsView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBits() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBits() { return ::emboss::support::Maybe(true); } @@ -559,9 +560,9 @@ class GenericSizedUIntArraysView final { default; ~EmbossReservedDollarVirtualMinSizeInBitsView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -570,13 +571,13 @@ class GenericSizedUIntArraysView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBitsView MinSizeInBits() { + static constexpr EmbossReservedDollarVirtualMinSizeInBitsView MinSizeInBits() { return EmbossReservedDollarVirtualMinSizeInBitsView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBits() { + static constexpr ::emboss::support::Maybe has_MinSizeInBits() { return ::emboss::support::Maybe(true); } @@ -607,7 +608,7 @@ struct EmbossReservedInternalIsGenericSizedUIntArraysView< }; template -[[nodiscard]] inline GenericSizedUIntArraysView< +inline GenericSizedUIntArraysView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -622,7 +623,7 @@ MakeSizedUIntArraysView( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericSizedUIntArraysView> +inline GenericSizedUIntArraysView> MakeSizedUIntArraysView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericSizedUIntArraysView>( @@ -631,7 +632,7 @@ MakeSizedUIntArraysView( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericSizedUIntArraysView< +inline GenericSizedUIntArraysView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedSizedUIntArraysView( T *emboss_reserved_local_data, @@ -698,42 +699,43 @@ class GenericSizedIntArraysView final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; - { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!one_nibble().Ok()) return false; - if (!two_nibble().Ok()) return false; - if (!four_nibble().Ok()) return false; - if (!IntrinsicSizeInBits().Ok()) return false; - if (!MaxSizeInBits().Ok()) return false; - if (!MinSizeInBits().Ok()) return false; - } - } + if (!one_nibble().Ok()) return false; + + if (!two_nibble().Ok()) return false; + + if (!four_nibble().Ok()) return false; + + if (!IntrinsicSizeInBits().Ok()) return false; + + if (!MaxSizeInBits().Ok()) return false; + + if (!MinSizeInBits().Ok()) return false; + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBits().Ok() && backing_.SizeInBits() >= static_cast( IntrinsicSizeInBits().UncheckedRead()); } - [[nodiscard]] static constexpr ::std::size_t SizeInBits() { + static constexpr ::std::size_t SizeInBits() { return static_cast(IntrinsicSizeInBits().Read()); } - [[nodiscard]] static constexpr bool SizeIsKnown() { + static constexpr bool SizeIsKnown() { return IntrinsicSizeInBits().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericSizedIntArraysView emboss_reserved_local_other) const { if (!has_one_nibble().Known()) return false; @@ -788,7 +790,7 @@ class GenericSizedIntArraysView final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericSizedIntArraysView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_one_nibble().ValueOr(false) && @@ -849,7 +851,7 @@ class GenericSizedIntArraysView final { emboss_reserved_local_other.IntrinsicSizeInBits().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericSizedIntArraysView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -1020,10 +1022,10 @@ class GenericSizedIntArraysView final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: - [[nodiscard]] typename ::emboss::support::GenericArrayView< + typename ::emboss::support::GenericArrayView< typename ::emboss::prelude::IntView< /**/ ::emboss::support::FixedSizeViewParameters<4, ::emboss::support::AllValuesAreOk>, typename Storage::template OffsetStorageType::template OffsetStorageType> @@ -1032,10 +1034,10 @@ class GenericSizedIntArraysView final { 1 > one_nibble() const; - [[nodiscard]] ::emboss::support::Maybe has_one_nibble() const; + ::emboss::support::Maybe has_one_nibble() const; public: - [[nodiscard]] typename ::emboss::support::GenericArrayView< + typename ::emboss::support::GenericArrayView< typename ::emboss::prelude::IntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename Storage::template OffsetStorageType::template OffsetStorageType> @@ -1044,10 +1046,10 @@ class GenericSizedIntArraysView final { 1 > two_nibble() const; - [[nodiscard]] ::emboss::support::Maybe has_two_nibble() const; + ::emboss::support::Maybe has_two_nibble() const; public: - [[nodiscard]] typename ::emboss::support::GenericArrayView< + typename ::emboss::support::GenericArrayView< typename ::emboss::prelude::IntView< /**/ ::emboss::support::FixedSizeViewParameters<16, ::emboss::support::AllValuesAreOk>, typename Storage::template OffsetStorageType::template OffsetStorageType> @@ -1056,7 +1058,7 @@ class GenericSizedIntArraysView final { 1 > four_nibble() const; - [[nodiscard]] ::emboss::support::Maybe has_four_nibble() const; + ::emboss::support::Maybe has_four_nibble() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBitsView final { @@ -1072,9 +1074,9 @@ class GenericSizedIntArraysView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBitsView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -1083,13 +1085,13 @@ class GenericSizedIntArraysView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBitsView IntrinsicSizeInBits() { + static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBitsView IntrinsicSizeInBits() { return EmbossReservedDollarVirtualIntrinsicSizeInBitsView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBits() { + static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBits() { return ::emboss::support::Maybe(true); } @@ -1107,9 +1109,9 @@ class GenericSizedIntArraysView final { default; ~EmbossReservedDollarVirtualMaxSizeInBitsView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -1118,13 +1120,13 @@ class GenericSizedIntArraysView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBitsView MaxSizeInBits() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBitsView MaxSizeInBits() { return EmbossReservedDollarVirtualMaxSizeInBitsView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBits() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBits() { return ::emboss::support::Maybe(true); } @@ -1142,9 +1144,9 @@ class GenericSizedIntArraysView final { default; ~EmbossReservedDollarVirtualMinSizeInBitsView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -1153,13 +1155,13 @@ class GenericSizedIntArraysView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBitsView MinSizeInBits() { + static constexpr EmbossReservedDollarVirtualMinSizeInBitsView MinSizeInBits() { return EmbossReservedDollarVirtualMinSizeInBitsView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBits() { + static constexpr ::emboss::support::Maybe has_MinSizeInBits() { return ::emboss::support::Maybe(true); } @@ -1190,7 +1192,7 @@ struct EmbossReservedInternalIsGenericSizedIntArraysView< }; template -[[nodiscard]] inline GenericSizedIntArraysView< +inline GenericSizedIntArraysView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -1205,7 +1207,7 @@ MakeSizedIntArraysView( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericSizedIntArraysView> +inline GenericSizedIntArraysView> MakeSizedIntArraysView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericSizedIntArraysView>( @@ -1214,7 +1216,7 @@ MakeSizedIntArraysView( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericSizedIntArraysView< +inline GenericSizedIntArraysView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedSizedIntArraysView( T *emboss_reserved_local_data, @@ -1281,42 +1283,43 @@ class GenericSizedEnumArraysView final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; - { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!one_nibble().Ok()) return false; - if (!two_nibble().Ok()) return false; - if (!four_nibble().Ok()) return false; - if (!IntrinsicSizeInBits().Ok()) return false; - if (!MaxSizeInBits().Ok()) return false; - if (!MinSizeInBits().Ok()) return false; - } - } + if (!one_nibble().Ok()) return false; + + if (!two_nibble().Ok()) return false; + + if (!four_nibble().Ok()) return false; + + if (!IntrinsicSizeInBits().Ok()) return false; + + if (!MaxSizeInBits().Ok()) return false; + + if (!MinSizeInBits().Ok()) return false; + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBits().Ok() && backing_.SizeInBits() >= static_cast( IntrinsicSizeInBits().UncheckedRead()); } - [[nodiscard]] static constexpr ::std::size_t SizeInBits() { + static constexpr ::std::size_t SizeInBits() { return static_cast(IntrinsicSizeInBits().Read()); } - [[nodiscard]] static constexpr bool SizeIsKnown() { + static constexpr bool SizeIsKnown() { return IntrinsicSizeInBits().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericSizedEnumArraysView emboss_reserved_local_other) const { if (!has_one_nibble().Known()) return false; @@ -1371,7 +1374,7 @@ class GenericSizedEnumArraysView final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericSizedEnumArraysView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_one_nibble().ValueOr(false) && @@ -1432,7 +1435,7 @@ class GenericSizedEnumArraysView final { emboss_reserved_local_other.IntrinsicSizeInBits().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericSizedEnumArraysView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -1603,10 +1606,10 @@ class GenericSizedEnumArraysView final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: - [[nodiscard]] typename ::emboss::support::GenericArrayView< + typename ::emboss::support::GenericArrayView< typename ::emboss::support::EnumView< /**/ ::emboss::test::Enum, ::emboss::support::FixedSizeViewParameters<4, ::emboss::support::AllValuesAreOk>, @@ -1616,10 +1619,10 @@ class GenericSizedEnumArraysView final { 1 > one_nibble() const; - [[nodiscard]] ::emboss::support::Maybe has_one_nibble() const; + ::emboss::support::Maybe has_one_nibble() const; public: - [[nodiscard]] typename ::emboss::support::GenericArrayView< + typename ::emboss::support::GenericArrayView< typename ::emboss::support::EnumView< /**/ ::emboss::test::Enum, ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, @@ -1629,10 +1632,10 @@ class GenericSizedEnumArraysView final { 1 > two_nibble() const; - [[nodiscard]] ::emboss::support::Maybe has_two_nibble() const; + ::emboss::support::Maybe has_two_nibble() const; public: - [[nodiscard]] typename ::emboss::support::GenericArrayView< + typename ::emboss::support::GenericArrayView< typename ::emboss::support::EnumView< /**/ ::emboss::test::Enum, ::emboss::support::FixedSizeViewParameters<16, ::emboss::support::AllValuesAreOk>, @@ -1642,7 +1645,7 @@ class GenericSizedEnumArraysView final { 1 > four_nibble() const; - [[nodiscard]] ::emboss::support::Maybe has_four_nibble() const; + ::emboss::support::Maybe has_four_nibble() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBitsView final { @@ -1658,9 +1661,9 @@ class GenericSizedEnumArraysView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBitsView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -1669,13 +1672,13 @@ class GenericSizedEnumArraysView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBitsView IntrinsicSizeInBits() { + static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBitsView IntrinsicSizeInBits() { return EmbossReservedDollarVirtualIntrinsicSizeInBitsView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBits() { + static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBits() { return ::emboss::support::Maybe(true); } @@ -1693,9 +1696,9 @@ class GenericSizedEnumArraysView final { default; ~EmbossReservedDollarVirtualMaxSizeInBitsView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -1704,13 +1707,13 @@ class GenericSizedEnumArraysView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBitsView MaxSizeInBits() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBitsView MaxSizeInBits() { return EmbossReservedDollarVirtualMaxSizeInBitsView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBits() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBits() { return ::emboss::support::Maybe(true); } @@ -1728,9 +1731,9 @@ class GenericSizedEnumArraysView final { default; ~EmbossReservedDollarVirtualMinSizeInBitsView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -1739,13 +1742,13 @@ class GenericSizedEnumArraysView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBitsView MinSizeInBits() { + static constexpr EmbossReservedDollarVirtualMinSizeInBitsView MinSizeInBits() { return EmbossReservedDollarVirtualMinSizeInBitsView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBits() { + static constexpr ::emboss::support::Maybe has_MinSizeInBits() { return ::emboss::support::Maybe(true); } @@ -1776,7 +1779,7 @@ struct EmbossReservedInternalIsGenericSizedEnumArraysView< }; template -[[nodiscard]] inline GenericSizedEnumArraysView< +inline GenericSizedEnumArraysView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -1791,7 +1794,7 @@ MakeSizedEnumArraysView( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericSizedEnumArraysView> +inline GenericSizedEnumArraysView> MakeSizedEnumArraysView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericSizedEnumArraysView>( @@ -1800,7 +1803,7 @@ MakeSizedEnumArraysView( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericSizedEnumArraysView< +inline GenericSizedEnumArraysView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedSizedEnumArraysView( T *emboss_reserved_local_data, @@ -1865,40 +1868,39 @@ class GenericBitArrayContainerView final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; - { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!uint_arrays().Ok()) return false; - if (!IntrinsicSizeInBytes().Ok()) return false; - if (!MaxSizeInBytes().Ok()) return false; - if (!MinSizeInBytes().Ok()) return false; - } - } + if (!uint_arrays().Ok()) return false; + + if (!IntrinsicSizeInBytes().Ok()) return false; + + if (!MaxSizeInBytes().Ok()) return false; + + if (!MinSizeInBytes().Ok()) return false; + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { + static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - [[nodiscard]] static constexpr bool SizeIsKnown() { + static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericBitArrayContainerView emboss_reserved_local_other) const { if (!has_uint_arrays().Known()) return false; @@ -1919,7 +1921,7 @@ class GenericBitArrayContainerView final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericBitArrayContainerView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_uint_arrays().ValueOr(false) && @@ -1952,7 +1954,7 @@ class GenericBitArrayContainerView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericBitArrayContainerView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -2047,13 +2049,13 @@ class GenericBitArrayContainerView final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: - [[nodiscard]] typename ::emboss::test::GenericSizedUIntArraysView>, 56>> + typename ::emboss::test::GenericSizedUIntArraysView>, 56>> uint_arrays() const; - [[nodiscard]] ::emboss::support::Maybe has_uint_arrays() const; + ::emboss::support::Maybe has_uint_arrays() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -2069,9 +2071,9 @@ class GenericBitArrayContainerView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -2080,13 +2082,13 @@ class GenericBitArrayContainerView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -2104,9 +2106,9 @@ class GenericBitArrayContainerView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -2115,13 +2117,13 @@ class GenericBitArrayContainerView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -2139,9 +2141,9 @@ class GenericBitArrayContainerView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -2150,13 +2152,13 @@ class GenericBitArrayContainerView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -2187,7 +2189,7 @@ struct EmbossReservedInternalIsGenericBitArrayContainerView< }; template -[[nodiscard]] inline GenericBitArrayContainerView< +inline GenericBitArrayContainerView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -2202,7 +2204,7 @@ MakeBitArrayContainerView( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericBitArrayContainerView> +inline GenericBitArrayContainerView> MakeBitArrayContainerView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericBitArrayContainerView>( @@ -2211,7 +2213,7 @@ MakeBitArrayContainerView( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericBitArrayContainerView< +inline GenericBitArrayContainerView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedBitArrayContainerView( T *emboss_reserved_local_data, diff --git a/testdata/golden_cpp/float.emb.h b/testdata/golden_cpp/float.emb.h index 1e5e869..2fa85bc 100644 --- a/testdata/golden_cpp/float.emb.h +++ b/testdata/golden_cpp/float.emb.h @@ -96,41 +96,41 @@ class GenericFloatsView final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; - { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!float_little_endian().Ok()) return false; - if (!float_big_endian().Ok()) return false; - if (!IntrinsicSizeInBytes().Ok()) return false; - if (!MaxSizeInBytes().Ok()) return false; - if (!MinSizeInBytes().Ok()) return false; - } - } + if (!float_little_endian().Ok()) return false; + + if (!float_big_endian().Ok()) return false; + + if (!IntrinsicSizeInBytes().Ok()) return false; + + if (!MaxSizeInBytes().Ok()) return false; + + if (!MinSizeInBytes().Ok()) return false; + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { + static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - [[nodiscard]] static constexpr bool SizeIsKnown() { + static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericFloatsView emboss_reserved_local_other) const { if (!has_float_little_endian().Known()) return false; @@ -168,7 +168,7 @@ class GenericFloatsView final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericFloatsView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_float_little_endian().ValueOr(false) && @@ -215,7 +215,7 @@ class GenericFloatsView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericFloatsView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -348,23 +348,23 @@ class GenericFloatsView final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: - [[nodiscard]] typename ::emboss::prelude::FloatView< + typename ::emboss::prelude::FloatView< /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 32>> float_little_endian() const; - [[nodiscard]] ::emboss::support::Maybe has_float_little_endian() const; + ::emboss::support::Maybe has_float_little_endian() const; public: - [[nodiscard]] typename ::emboss::prelude::FloatView< + typename ::emboss::prelude::FloatView< /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 32>> float_big_endian() const; - [[nodiscard]] ::emboss::support::Maybe has_float_big_endian() const; + ::emboss::support::Maybe has_float_big_endian() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -380,9 +380,9 @@ class GenericFloatsView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -391,13 +391,13 @@ class GenericFloatsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -415,9 +415,9 @@ class GenericFloatsView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -426,13 +426,13 @@ class GenericFloatsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -450,9 +450,9 @@ class GenericFloatsView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -461,13 +461,13 @@ class GenericFloatsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -498,7 +498,7 @@ struct EmbossReservedInternalIsGenericFloatsView< }; template -[[nodiscard]] inline GenericFloatsView< +inline GenericFloatsView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -513,7 +513,7 @@ MakeFloatsView( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericFloatsView> +inline GenericFloatsView> MakeFloatsView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericFloatsView>( @@ -522,7 +522,7 @@ MakeFloatsView( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericFloatsView< +inline GenericFloatsView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedFloatsView( T *emboss_reserved_local_data, @@ -588,41 +588,41 @@ class GenericDoublesView final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; - { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!double_little_endian().Ok()) return false; - if (!double_big_endian().Ok()) return false; - if (!IntrinsicSizeInBytes().Ok()) return false; - if (!MaxSizeInBytes().Ok()) return false; - if (!MinSizeInBytes().Ok()) return false; - } - } + if (!double_little_endian().Ok()) return false; + + if (!double_big_endian().Ok()) return false; + + if (!IntrinsicSizeInBytes().Ok()) return false; + + if (!MaxSizeInBytes().Ok()) return false; + + if (!MinSizeInBytes().Ok()) return false; + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { + static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - [[nodiscard]] static constexpr bool SizeIsKnown() { + static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericDoublesView emboss_reserved_local_other) const { if (!has_double_little_endian().Known()) return false; @@ -660,7 +660,7 @@ class GenericDoublesView final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericDoublesView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_double_little_endian().ValueOr(false) && @@ -707,7 +707,7 @@ class GenericDoublesView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericDoublesView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -840,23 +840,23 @@ class GenericDoublesView final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: - [[nodiscard]] typename ::emboss::prelude::FloatView< + typename ::emboss::prelude::FloatView< /**/ ::emboss::support::FixedSizeViewParameters<64, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 64>> double_little_endian() const; - [[nodiscard]] ::emboss::support::Maybe has_double_little_endian() const; + ::emboss::support::Maybe has_double_little_endian() const; public: - [[nodiscard]] typename ::emboss::prelude::FloatView< + typename ::emboss::prelude::FloatView< /**/ ::emboss::support::FixedSizeViewParameters<64, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 64>> double_big_endian() const; - [[nodiscard]] ::emboss::support::Maybe has_double_big_endian() const; + ::emboss::support::Maybe has_double_big_endian() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -872,9 +872,9 @@ class GenericDoublesView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -883,13 +883,13 @@ class GenericDoublesView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -907,9 +907,9 @@ class GenericDoublesView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -918,13 +918,13 @@ class GenericDoublesView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -942,9 +942,9 @@ class GenericDoublesView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -953,13 +953,13 @@ class GenericDoublesView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -990,7 +990,7 @@ struct EmbossReservedInternalIsGenericDoublesView< }; template -[[nodiscard]] inline GenericDoublesView< +inline GenericDoublesView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -1005,7 +1005,7 @@ MakeDoublesView( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericDoublesView> +inline GenericDoublesView> MakeDoublesView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericDoublesView>( @@ -1014,7 +1014,7 @@ MakeDoublesView( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericDoublesView< +inline GenericDoublesView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedDoublesView( T *emboss_reserved_local_data, diff --git a/testdata/golden_cpp/imported.emb.h b/testdata/golden_cpp/imported.emb.h index 840712a..7a96fce 100644 --- a/testdata/golden_cpp/imported.emb.h +++ b/testdata/golden_cpp/imported.emb.h @@ -87,40 +87,39 @@ class GenericInnerView final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; - { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!value().Ok()) return false; - if (!IntrinsicSizeInBytes().Ok()) return false; - if (!MaxSizeInBytes().Ok()) return false; - if (!MinSizeInBytes().Ok()) return false; - } - } + if (!value().Ok()) return false; + + if (!IntrinsicSizeInBytes().Ok()) return false; + + if (!MaxSizeInBytes().Ok()) return false; + + if (!MinSizeInBytes().Ok()) return false; + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { + static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - [[nodiscard]] static constexpr bool SizeIsKnown() { + static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericInnerView emboss_reserved_local_other) const { if (!has_value().Known()) return false; @@ -141,7 +140,7 @@ class GenericInnerView final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericInnerView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_value().ValueOr(false) && @@ -174,7 +173,7 @@ class GenericInnerView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericInnerView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -269,15 +268,15 @@ class GenericInnerView final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<64, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 64>> value() const; - [[nodiscard]] ::emboss::support::Maybe has_value() const; + ::emboss::support::Maybe has_value() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -293,9 +292,9 @@ class GenericInnerView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -304,13 +303,13 @@ class GenericInnerView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -328,9 +327,9 @@ class GenericInnerView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -339,13 +338,13 @@ class GenericInnerView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -363,9 +362,9 @@ class GenericInnerView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -374,13 +373,13 @@ class GenericInnerView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -411,7 +410,7 @@ struct EmbossReservedInternalIsGenericInnerView< }; template -[[nodiscard]] inline GenericInnerView< +inline GenericInnerView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -426,7 +425,7 @@ MakeInnerView( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericInnerView> +inline GenericInnerView> MakeInnerView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericInnerView>( @@ -435,7 +434,7 @@ MakeInnerView( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericInnerView< +inline GenericInnerView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedInnerView( T *emboss_reserved_local_data, diff --git a/testdata/golden_cpp/imported_genfiles.emb.h b/testdata/golden_cpp/imported_genfiles.emb.h index cc5384f..82cfef1 100644 --- a/testdata/golden_cpp/imported_genfiles.emb.h +++ b/testdata/golden_cpp/imported_genfiles.emb.h @@ -88,40 +88,39 @@ class GenericInnerView final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; - { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!value().Ok()) return false; - if (!IntrinsicSizeInBytes().Ok()) return false; - if (!MaxSizeInBytes().Ok()) return false; - if (!MinSizeInBytes().Ok()) return false; - } - } + if (!value().Ok()) return false; + + if (!IntrinsicSizeInBytes().Ok()) return false; + + if (!MaxSizeInBytes().Ok()) return false; + + if (!MinSizeInBytes().Ok()) return false; + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { + static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - [[nodiscard]] static constexpr bool SizeIsKnown() { + static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericInnerView emboss_reserved_local_other) const { if (!has_value().Known()) return false; @@ -142,7 +141,7 @@ class GenericInnerView final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericInnerView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_value().ValueOr(false) && @@ -175,7 +174,7 @@ class GenericInnerView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericInnerView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -270,15 +269,15 @@ class GenericInnerView final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<64, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 64>> value() const; - [[nodiscard]] ::emboss::support::Maybe has_value() const; + ::emboss::support::Maybe has_value() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -294,9 +293,9 @@ class GenericInnerView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -305,13 +304,13 @@ class GenericInnerView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -329,9 +328,9 @@ class GenericInnerView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -340,13 +339,13 @@ class GenericInnerView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -364,9 +363,9 @@ class GenericInnerView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -375,13 +374,13 @@ class GenericInnerView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -412,7 +411,7 @@ struct EmbossReservedInternalIsGenericInnerView< }; template -[[nodiscard]] inline GenericInnerView< +inline GenericInnerView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -427,7 +426,7 @@ MakeInnerView( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericInnerView> +inline GenericInnerView> MakeInnerView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericInnerView>( @@ -436,7 +435,7 @@ MakeInnerView( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericInnerView< +inline GenericInnerView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedInnerView( T *emboss_reserved_local_data, diff --git a/testdata/golden_cpp/importer.emb.h b/testdata/golden_cpp/importer.emb.h index f209c6c..6172391 100644 --- a/testdata/golden_cpp/importer.emb.h +++ b/testdata/golden_cpp/importer.emb.h @@ -92,41 +92,41 @@ class GenericOuterView final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; - { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!inner().Ok()) return false; - if (!inner_gen().Ok()) return false; - if (!IntrinsicSizeInBytes().Ok()) return false; - if (!MaxSizeInBytes().Ok()) return false; - if (!MinSizeInBytes().Ok()) return false; - } - } + if (!inner().Ok()) return false; + + if (!inner_gen().Ok()) return false; + + if (!IntrinsicSizeInBytes().Ok()) return false; + + if (!MaxSizeInBytes().Ok()) return false; + + if (!MinSizeInBytes().Ok()) return false; + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { + static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - [[nodiscard]] static constexpr bool SizeIsKnown() { + static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericOuterView emboss_reserved_local_other) const { if (!has_inner().Known()) return false; @@ -164,7 +164,7 @@ class GenericOuterView final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericOuterView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_inner().ValueOr(false) && @@ -211,7 +211,7 @@ class GenericOuterView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericOuterView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -344,19 +344,19 @@ class GenericOuterView final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: - [[nodiscard]] typename ::emboss::test::GenericInnerView> + typename ::emboss::test::GenericInnerView> inner() const; - [[nodiscard]] ::emboss::support::Maybe has_inner() const; + ::emboss::support::Maybe has_inner() const; public: - [[nodiscard]] typename ::emboss::test::generated::GenericInnerView> + typename ::emboss::test::generated::GenericInnerView> inner_gen() const; - [[nodiscard]] ::emboss::support::Maybe has_inner_gen() const; + ::emboss::support::Maybe has_inner_gen() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -372,9 +372,9 @@ class GenericOuterView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -383,13 +383,13 @@ class GenericOuterView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -407,9 +407,9 @@ class GenericOuterView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -418,13 +418,13 @@ class GenericOuterView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -442,9 +442,9 @@ class GenericOuterView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -453,13 +453,13 @@ class GenericOuterView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -490,7 +490,7 @@ struct EmbossReservedInternalIsGenericOuterView< }; template -[[nodiscard]] inline GenericOuterView< +inline GenericOuterView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -505,7 +505,7 @@ MakeOuterView( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericOuterView> +inline GenericOuterView> MakeOuterView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericOuterView>( @@ -514,7 +514,7 @@ MakeOuterView( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericOuterView< +inline GenericOuterView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedOuterView( T *emboss_reserved_local_data, diff --git a/testdata/golden_cpp/importer2.emb.h b/testdata/golden_cpp/importer2.emb.h index b4107d1..ec86583 100644 --- a/testdata/golden_cpp/importer2.emb.h +++ b/testdata/golden_cpp/importer2.emb.h @@ -89,40 +89,39 @@ class GenericOuter2View final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; - { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!outer().Ok()) return false; - if (!IntrinsicSizeInBytes().Ok()) return false; - if (!MaxSizeInBytes().Ok()) return false; - if (!MinSizeInBytes().Ok()) return false; - } - } + if (!outer().Ok()) return false; + + if (!IntrinsicSizeInBytes().Ok()) return false; + + if (!MaxSizeInBytes().Ok()) return false; + + if (!MinSizeInBytes().Ok()) return false; + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { + static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - [[nodiscard]] static constexpr bool SizeIsKnown() { + static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericOuter2View emboss_reserved_local_other) const { if (!has_outer().Known()) return false; @@ -143,7 +142,7 @@ class GenericOuter2View final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericOuter2View emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_outer().ValueOr(false) && @@ -176,7 +175,7 @@ class GenericOuter2View final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericOuter2View emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -271,13 +270,13 @@ class GenericOuter2View final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: - [[nodiscard]] typename ::emboss::test::GenericOuterView> + typename ::emboss::test::GenericOuterView> outer() const; - [[nodiscard]] ::emboss::support::Maybe has_outer() const; + ::emboss::support::Maybe has_outer() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -293,9 +292,9 @@ class GenericOuter2View final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -304,13 +303,13 @@ class GenericOuter2View final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -328,9 +327,9 @@ class GenericOuter2View final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -339,13 +338,13 @@ class GenericOuter2View final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -363,9 +362,9 @@ class GenericOuter2View final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -374,13 +373,13 @@ class GenericOuter2View final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -411,7 +410,7 @@ struct EmbossReservedInternalIsGenericOuter2View< }; template -[[nodiscard]] inline GenericOuter2View< +inline GenericOuter2View< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -426,7 +425,7 @@ MakeOuter2View( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericOuter2View> +inline GenericOuter2View> MakeOuter2View( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericOuter2View>( @@ -435,7 +434,7 @@ MakeOuter2View( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericOuter2View< +inline GenericOuter2View< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedOuter2View( T *emboss_reserved_local_data, diff --git a/testdata/golden_cpp/inline_type.emb.h b/testdata/golden_cpp/inline_type.emb.h index f55d002..85efe19 100644 --- a/testdata/golden_cpp/inline_type.emb.h +++ b/testdata/golden_cpp/inline_type.emb.h @@ -269,41 +269,41 @@ class GenericFooView final { using Status = ::emboss::test::Foo::Status; using SecondaryStatus = ::emboss::test::Foo::SecondaryStatus; - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; - { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!status().Ok()) return false; - if (!secondary_status().Ok()) return false; - if (!IntrinsicSizeInBytes().Ok()) return false; - if (!MaxSizeInBytes().Ok()) return false; - if (!MinSizeInBytes().Ok()) return false; - } - } + if (!status().Ok()) return false; + + if (!secondary_status().Ok()) return false; + + if (!IntrinsicSizeInBytes().Ok()) return false; + + if (!MaxSizeInBytes().Ok()) return false; + + if (!MinSizeInBytes().Ok()) return false; + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { + static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - [[nodiscard]] static constexpr bool SizeIsKnown() { + static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericFooView emboss_reserved_local_other) const { if (!has_status().Known()) return false; @@ -341,7 +341,7 @@ class GenericFooView final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericFooView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_status().ValueOr(false) && @@ -388,7 +388,7 @@ class GenericFooView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericFooView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -521,25 +521,25 @@ class GenericFooView final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: - [[nodiscard]] typename ::emboss::support::EnumView< + typename ::emboss::support::EnumView< /**/ ::emboss::test::Foo::Status, ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> status() const; - [[nodiscard]] ::emboss::support::Maybe has_status() const; + ::emboss::support::Maybe has_status() const; public: - [[nodiscard]] typename ::emboss::support::EnumView< + typename ::emboss::support::EnumView< /**/ ::emboss::test::Foo::SecondaryStatus, ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> secondary_status() const; - [[nodiscard]] ::emboss::support::Maybe has_secondary_status() const; + ::emboss::support::Maybe has_secondary_status() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -555,9 +555,9 @@ class GenericFooView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -566,13 +566,13 @@ class GenericFooView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -590,9 +590,9 @@ class GenericFooView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -601,13 +601,13 @@ class GenericFooView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -625,9 +625,9 @@ class GenericFooView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -636,13 +636,13 @@ class GenericFooView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -673,7 +673,7 @@ struct EmbossReservedInternalIsGenericFooView< }; template -[[nodiscard]] inline GenericFooView< +inline GenericFooView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -688,7 +688,7 @@ MakeFooView( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericFooView> +inline GenericFooView> MakeFooView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericFooView>( @@ -697,7 +697,7 @@ MakeFooView( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericFooView< +inline GenericFooView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedFooView( T *emboss_reserved_local_data, diff --git a/testdata/golden_cpp/int_sizes.emb.h b/testdata/golden_cpp/int_sizes.emb.h index 956706f..3b5c2d9 100644 --- a/testdata/golden_cpp/int_sizes.emb.h +++ b/testdata/golden_cpp/int_sizes.emb.h @@ -94,47 +94,53 @@ class GenericSizesView final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; - { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!one_byte().Ok()) return false; - if (!two_byte().Ok()) return false; - if (!three_byte().Ok()) return false; - if (!four_byte().Ok()) return false; - if (!five_byte().Ok()) return false; - if (!six_byte().Ok()) return false; - if (!seven_byte().Ok()) return false; - if (!eight_byte().Ok()) return false; - if (!IntrinsicSizeInBytes().Ok()) return false; - if (!MaxSizeInBytes().Ok()) return false; - if (!MinSizeInBytes().Ok()) return false; - } - } + if (!one_byte().Ok()) return false; + + if (!two_byte().Ok()) return false; + + if (!three_byte().Ok()) return false; + + if (!four_byte().Ok()) return false; + + if (!five_byte().Ok()) return false; + + if (!six_byte().Ok()) return false; + + if (!seven_byte().Ok()) return false; + + if (!eight_byte().Ok()) return false; + + if (!IntrinsicSizeInBytes().Ok()) return false; + + if (!MaxSizeInBytes().Ok()) return false; + + if (!MinSizeInBytes().Ok()) return false; + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { + static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - [[nodiscard]] static constexpr bool SizeIsKnown() { + static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericSizesView emboss_reserved_local_other) const { if (!has_one_byte().Known()) return false; @@ -274,7 +280,7 @@ class GenericSizesView final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericSizesView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_one_byte().ValueOr(false) && @@ -405,7 +411,7 @@ class GenericSizesView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericSizesView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -766,71 +772,71 @@ class GenericSizesView final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: - [[nodiscard]] typename ::emboss::prelude::IntView< + typename ::emboss::prelude::IntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> one_byte() const; - [[nodiscard]] ::emboss::support::Maybe has_one_byte() const; + ::emboss::support::Maybe has_one_byte() const; public: - [[nodiscard]] typename ::emboss::prelude::IntView< + typename ::emboss::prelude::IntView< /**/ ::emboss::support::FixedSizeViewParameters<16, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 16>> two_byte() const; - [[nodiscard]] ::emboss::support::Maybe has_two_byte() const; + ::emboss::support::Maybe has_two_byte() const; public: - [[nodiscard]] typename ::emboss::prelude::IntView< + typename ::emboss::prelude::IntView< /**/ ::emboss::support::FixedSizeViewParameters<24, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 24>> three_byte() const; - [[nodiscard]] ::emboss::support::Maybe has_three_byte() const; + ::emboss::support::Maybe has_three_byte() const; public: - [[nodiscard]] typename ::emboss::prelude::IntView< + typename ::emboss::prelude::IntView< /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 32>> four_byte() const; - [[nodiscard]] ::emboss::support::Maybe has_four_byte() const; + ::emboss::support::Maybe has_four_byte() const; public: - [[nodiscard]] typename ::emboss::prelude::IntView< + typename ::emboss::prelude::IntView< /**/ ::emboss::support::FixedSizeViewParameters<40, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 40>> five_byte() const; - [[nodiscard]] ::emboss::support::Maybe has_five_byte() const; + ::emboss::support::Maybe has_five_byte() const; public: - [[nodiscard]] typename ::emboss::prelude::IntView< + typename ::emboss::prelude::IntView< /**/ ::emboss::support::FixedSizeViewParameters<48, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 48>> six_byte() const; - [[nodiscard]] ::emboss::support::Maybe has_six_byte() const; + ::emboss::support::Maybe has_six_byte() const; public: - [[nodiscard]] typename ::emboss::prelude::IntView< + typename ::emboss::prelude::IntView< /**/ ::emboss::support::FixedSizeViewParameters<56, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 56>> seven_byte() const; - [[nodiscard]] ::emboss::support::Maybe has_seven_byte() const; + ::emboss::support::Maybe has_seven_byte() const; public: - [[nodiscard]] typename ::emboss::prelude::IntView< + typename ::emboss::prelude::IntView< /**/ ::emboss::support::FixedSizeViewParameters<64, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 64>> eight_byte() const; - [[nodiscard]] ::emboss::support::Maybe has_eight_byte() const; + ::emboss::support::Maybe has_eight_byte() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -846,9 +852,9 @@ class GenericSizesView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -857,13 +863,13 @@ class GenericSizesView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -881,9 +887,9 @@ class GenericSizesView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -892,13 +898,13 @@ class GenericSizesView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -916,9 +922,9 @@ class GenericSizesView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -927,13 +933,13 @@ class GenericSizesView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -964,7 +970,7 @@ struct EmbossReservedInternalIsGenericSizesView< }; template -[[nodiscard]] inline GenericSizesView< +inline GenericSizesView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -979,7 +985,7 @@ MakeSizesView( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericSizesView> +inline GenericSizesView> MakeSizesView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericSizesView>( @@ -988,7 +994,7 @@ MakeSizesView( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericSizesView< +inline GenericSizesView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedSizesView( T *emboss_reserved_local_data, diff --git a/testdata/golden_cpp/large_array.emb.h b/testdata/golden_cpp/large_array.emb.h index 9985afe..a76ec98 100644 --- a/testdata/golden_cpp/large_array.emb.h +++ b/testdata/golden_cpp/large_array.emb.h @@ -88,40 +88,40 @@ class GenericUIntArrayView final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; - { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!element_count().Ok()) return false; - if (!elements().Ok()) return false; - if (!IntrinsicSizeInBytes().Ok()) return false; - if (!MaxSizeInBytes().Ok()) return false; - if (!MinSizeInBytes().Ok()) return false; - } - } + if (!element_count().Ok()) return false; + + if (!elements().Ok()) return false; + + if (!IntrinsicSizeInBytes().Ok()) return false; + + if (!MaxSizeInBytes().Ok()) return false; + + if (!MinSizeInBytes().Ok()) return false; + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - [[nodiscard]] ::std::size_t SizeInBytes() const { + ::std::size_t SizeInBytes() const { return static_cast(IntrinsicSizeInBytes().Read()); } - [[nodiscard]] bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericUIntArrayView emboss_reserved_local_other) const { if (!has_element_count().Known()) return false; @@ -159,7 +159,7 @@ class GenericUIntArrayView final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericUIntArrayView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_element_count().ValueOr(false) && @@ -206,7 +206,7 @@ class GenericUIntArrayView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericUIntArrayView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -339,18 +339,18 @@ class GenericUIntArrayView final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 32>> element_count() const; - [[nodiscard]] ::emboss::support::Maybe has_element_count() const; + ::emboss::support::Maybe has_element_count() const; public: - [[nodiscard]] typename ::emboss::support::GenericArrayView< + typename ::emboss::support::GenericArrayView< typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock::template OffsetStorageType>, 32>> @@ -359,7 +359,7 @@ class GenericUIntArrayView final { 8 > elements() const; - [[nodiscard]] ::emboss::support::Maybe has_elements() const; + ::emboss::support::Maybe has_elements() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -378,17 +378,17 @@ class GenericUIntArrayView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - [[nodiscard]] ::std::int64_t Read() const { + ::std::int64_t Read() const { EMBOSS_CHECK(view_.has_IntrinsicSizeInBytes().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - [[nodiscard]] ::std::int64_t UncheckedRead() const { + ::std::int64_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - [[nodiscard]] bool Ok() const { + bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -401,12 +401,12 @@ class GenericUIntArrayView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } private: - [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { + ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.element_count(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Product(::emboss::support::Maybe(static_cast(4LL)), emboss_reserved_local_subexpr_2); @@ -417,7 +417,7 @@ class GenericUIntArrayView final { return emboss_reserved_local_subexpr_6; } - [[nodiscard]] static constexpr bool ValueIsOk( + static constexpr bool ValueIsOk( ::std::int64_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -425,8 +425,8 @@ class GenericUIntArrayView final { const GenericUIntArrayView view_; }; - [[nodiscard]] EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; - [[nodiscard]] ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; + EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; public: class EmbossReservedDollarVirtualMaxSizeInBytesView final { @@ -442,9 +442,9 @@ class GenericUIntArrayView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int64_t Read(); - [[nodiscard]] static constexpr ::std::int64_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int64_t Read(); + static constexpr ::std::int64_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -453,13 +453,13 @@ class GenericUIntArrayView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -477,9 +477,9 @@ class GenericUIntArrayView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -488,13 +488,13 @@ class GenericUIntArrayView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -525,7 +525,7 @@ struct EmbossReservedInternalIsGenericUIntArrayView< }; template -[[nodiscard]] inline GenericUIntArrayView< +inline GenericUIntArrayView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -540,7 +540,7 @@ MakeUIntArrayView( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericUIntArrayView> +inline GenericUIntArrayView> MakeUIntArrayView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericUIntArrayView>( @@ -549,7 +549,7 @@ MakeUIntArrayView( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericUIntArrayView< +inline GenericUIntArrayView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedUIntArrayView( T *emboss_reserved_local_data, diff --git a/testdata/golden_cpp/nested_structure.emb.h b/testdata/golden_cpp/nested_structure.emb.h index 2b37ffd..c17dcb6 100644 --- a/testdata/golden_cpp/nested_structure.emb.h +++ b/testdata/golden_cpp/nested_structure.emb.h @@ -105,42 +105,43 @@ class GenericContainerView final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; - { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!weight().Ok()) return false; - if (!important_box().Ok()) return false; - if (!other_box().Ok()) return false; - if (!IntrinsicSizeInBytes().Ok()) return false; - if (!MaxSizeInBytes().Ok()) return false; - if (!MinSizeInBytes().Ok()) return false; - } - } + if (!weight().Ok()) return false; + + if (!important_box().Ok()) return false; + + if (!other_box().Ok()) return false; + + if (!IntrinsicSizeInBytes().Ok()) return false; + + if (!MaxSizeInBytes().Ok()) return false; + + if (!MinSizeInBytes().Ok()) return false; + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { + static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - [[nodiscard]] static constexpr bool SizeIsKnown() { + static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericContainerView emboss_reserved_local_other) const { if (!has_weight().Known()) return false; @@ -195,7 +196,7 @@ class GenericContainerView final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericContainerView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_weight().ValueOr(false) && @@ -256,7 +257,7 @@ class GenericContainerView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericContainerView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -427,27 +428,27 @@ class GenericContainerView final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 32>> weight() const; - [[nodiscard]] ::emboss::support::Maybe has_weight() const; + ::emboss::support::Maybe has_weight() const; public: - [[nodiscard]] typename ::emboss::test::GenericBoxView> + typename ::emboss::test::GenericBoxView> important_box() const; - [[nodiscard]] ::emboss::support::Maybe has_important_box() const; + ::emboss::support::Maybe has_important_box() const; public: - [[nodiscard]] typename ::emboss::test::GenericBoxView> + typename ::emboss::test::GenericBoxView> other_box() const; - [[nodiscard]] ::emboss::support::Maybe has_other_box() const; + ::emboss::support::Maybe has_other_box() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -463,9 +464,9 @@ class GenericContainerView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -474,13 +475,13 @@ class GenericContainerView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -498,9 +499,9 @@ class GenericContainerView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -509,13 +510,13 @@ class GenericContainerView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -533,9 +534,9 @@ class GenericContainerView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -544,13 +545,13 @@ class GenericContainerView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -581,7 +582,7 @@ struct EmbossReservedInternalIsGenericContainerView< }; template -[[nodiscard]] inline GenericContainerView< +inline GenericContainerView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -596,7 +597,7 @@ MakeContainerView( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericContainerView> +inline GenericContainerView> MakeContainerView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericContainerView>( @@ -605,7 +606,7 @@ MakeContainerView( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericContainerView< +inline GenericContainerView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedContainerView( T *emboss_reserved_local_data, @@ -671,41 +672,41 @@ class GenericBoxView final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; - { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!id().Ok()) return false; - if (!count().Ok()) return false; - if (!IntrinsicSizeInBytes().Ok()) return false; - if (!MaxSizeInBytes().Ok()) return false; - if (!MinSizeInBytes().Ok()) return false; - } - } + if (!id().Ok()) return false; + + if (!count().Ok()) return false; + + if (!IntrinsicSizeInBytes().Ok()) return false; + + if (!MaxSizeInBytes().Ok()) return false; + + if (!MinSizeInBytes().Ok()) return false; + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { + static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - [[nodiscard]] static constexpr bool SizeIsKnown() { + static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericBoxView emboss_reserved_local_other) const { if (!has_id().Known()) return false; @@ -743,7 +744,7 @@ class GenericBoxView final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericBoxView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_id().ValueOr(false) && @@ -790,7 +791,7 @@ class GenericBoxView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericBoxView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -923,23 +924,23 @@ class GenericBoxView final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 32>> id() const; - [[nodiscard]] ::emboss::support::Maybe has_id() const; + ::emboss::support::Maybe has_id() const; public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 32>> count() const; - [[nodiscard]] ::emboss::support::Maybe has_count() const; + ::emboss::support::Maybe has_count() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -955,9 +956,9 @@ class GenericBoxView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -966,13 +967,13 @@ class GenericBoxView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -990,9 +991,9 @@ class GenericBoxView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -1001,13 +1002,13 @@ class GenericBoxView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -1025,9 +1026,9 @@ class GenericBoxView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -1036,13 +1037,13 @@ class GenericBoxView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -1073,7 +1074,7 @@ struct EmbossReservedInternalIsGenericBoxView< }; template -[[nodiscard]] inline GenericBoxView< +inline GenericBoxView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -1088,7 +1089,7 @@ MakeBoxView( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericBoxView> +inline GenericBoxView> MakeBoxView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericBoxView>( @@ -1097,7 +1098,7 @@ MakeBoxView( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericBoxView< +inline GenericBoxView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedBoxView( T *emboss_reserved_local_data, @@ -1163,41 +1164,41 @@ class GenericTruckView final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; - { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!id().Ok()) return false; - if (!cargo().Ok()) return false; - if (!IntrinsicSizeInBytes().Ok()) return false; - if (!MaxSizeInBytes().Ok()) return false; - if (!MinSizeInBytes().Ok()) return false; - } - } + if (!id().Ok()) return false; + + if (!cargo().Ok()) return false; + + if (!IntrinsicSizeInBytes().Ok()) return false; + + if (!MaxSizeInBytes().Ok()) return false; + + if (!MinSizeInBytes().Ok()) return false; + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { + static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - [[nodiscard]] static constexpr bool SizeIsKnown() { + static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericTruckView emboss_reserved_local_other) const { if (!has_id().Known()) return false; @@ -1235,7 +1236,7 @@ class GenericTruckView final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericTruckView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_id().ValueOr(false) && @@ -1282,7 +1283,7 @@ class GenericTruckView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericTruckView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -1415,25 +1416,25 @@ class GenericTruckView final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 32>> id() const; - [[nodiscard]] ::emboss::support::Maybe has_id() const; + ::emboss::support::Maybe has_id() const; public: - [[nodiscard]] typename ::emboss::support::GenericArrayView< + typename ::emboss::support::GenericArrayView< typename ::emboss::test::GenericContainerView::template OffsetStorageType> , typename Storage::template OffsetStorageType, 20, 8 > cargo() const; - [[nodiscard]] ::emboss::support::Maybe has_cargo() const; + ::emboss::support::Maybe has_cargo() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -1449,9 +1450,9 @@ class GenericTruckView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -1460,13 +1461,13 @@ class GenericTruckView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -1484,9 +1485,9 @@ class GenericTruckView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -1495,13 +1496,13 @@ class GenericTruckView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -1519,9 +1520,9 @@ class GenericTruckView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -1530,13 +1531,13 @@ class GenericTruckView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -1567,7 +1568,7 @@ struct EmbossReservedInternalIsGenericTruckView< }; template -[[nodiscard]] inline GenericTruckView< +inline GenericTruckView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -1582,7 +1583,7 @@ MakeTruckView( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericTruckView> +inline GenericTruckView> MakeTruckView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericTruckView>( @@ -1591,7 +1592,7 @@ MakeTruckView( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericTruckView< +inline GenericTruckView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedTruckView( T *emboss_reserved_local_data, diff --git a/testdata/golden_cpp/next_keyword.emb.h b/testdata/golden_cpp/next_keyword.emb.h index a6988e3..40a2c9a 100644 --- a/testdata/golden_cpp/next_keyword.emb.h +++ b/testdata/golden_cpp/next_keyword.emb.h @@ -90,43 +90,45 @@ class GenericNextKeywordView final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; - { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!value32().Ok()) return false; - if (!value16().Ok()) return false; - if (!value8().Ok()) return false; - if (!value8_offset().Ok()) return false; - if (!IntrinsicSizeInBytes().Ok()) return false; - if (!MaxSizeInBytes().Ok()) return false; - if (!MinSizeInBytes().Ok()) return false; - } - } + if (!value32().Ok()) return false; + + if (!value16().Ok()) return false; + + if (!value8().Ok()) return false; + + if (!value8_offset().Ok()) return false; + + if (!IntrinsicSizeInBytes().Ok()) return false; + + if (!MaxSizeInBytes().Ok()) return false; + + if (!MinSizeInBytes().Ok()) return false; + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { + static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - [[nodiscard]] static constexpr bool SizeIsKnown() { + static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericNextKeywordView emboss_reserved_local_other) const { if (!has_value32().Known()) return false; @@ -198,7 +200,7 @@ class GenericNextKeywordView final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericNextKeywordView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_value32().ValueOr(false) && @@ -273,7 +275,7 @@ class GenericNextKeywordView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericNextKeywordView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -482,39 +484,39 @@ class GenericNextKeywordView final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 32>> value32() const; - [[nodiscard]] ::emboss::support::Maybe has_value32() const; + ::emboss::support::Maybe has_value32() const; public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<16, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 16>> value16() const; - [[nodiscard]] ::emboss::support::Maybe has_value16() const; + ::emboss::support::Maybe has_value16() const; public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> value8() const; - [[nodiscard]] ::emboss::support::Maybe has_value8() const; + ::emboss::support::Maybe has_value8() const; public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> value8_offset() const; - [[nodiscard]] ::emboss::support::Maybe has_value8_offset() const; + ::emboss::support::Maybe has_value8_offset() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -530,9 +532,9 @@ class GenericNextKeywordView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -541,13 +543,13 @@ class GenericNextKeywordView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -565,9 +567,9 @@ class GenericNextKeywordView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -576,13 +578,13 @@ class GenericNextKeywordView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -600,9 +602,9 @@ class GenericNextKeywordView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -611,13 +613,13 @@ class GenericNextKeywordView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -648,7 +650,7 @@ struct EmbossReservedInternalIsGenericNextKeywordView< }; template -[[nodiscard]] inline GenericNextKeywordView< +inline GenericNextKeywordView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -663,7 +665,7 @@ MakeNextKeywordView( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericNextKeywordView> +inline GenericNextKeywordView> MakeNextKeywordView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericNextKeywordView>( @@ -672,7 +674,7 @@ MakeNextKeywordView( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericNextKeywordView< +inline GenericNextKeywordView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedNextKeywordView( T *emboss_reserved_local_data, diff --git a/testdata/golden_cpp/no_enum_traits.emb.h b/testdata/golden_cpp/no_enum_traits.emb.h index 0c3b29f..af60cfc 100644 --- a/testdata/golden_cpp/no_enum_traits.emb.h +++ b/testdata/golden_cpp/no_enum_traits.emb.h @@ -89,40 +89,39 @@ class GenericBarView final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; - { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!foo().Ok()) return false; - if (!IntrinsicSizeInBytes().Ok()) return false; - if (!MaxSizeInBytes().Ok()) return false; - if (!MinSizeInBytes().Ok()) return false; - } - } + if (!foo().Ok()) return false; + + if (!IntrinsicSizeInBytes().Ok()) return false; + + if (!MaxSizeInBytes().Ok()) return false; + + if (!MinSizeInBytes().Ok()) return false; + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { + static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - [[nodiscard]] static constexpr bool SizeIsKnown() { + static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericBarView emboss_reserved_local_other) const { if (!has_foo().Known()) return false; @@ -143,7 +142,7 @@ class GenericBarView final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericBarView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_foo().ValueOr(false) && @@ -176,7 +175,7 @@ class GenericBarView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericBarView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -185,16 +184,16 @@ class GenericBarView final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: - [[nodiscard]] typename ::emboss::support::EnumView< + typename ::emboss::support::EnumView< /**/ ::emboss::test::Foo, ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> foo() const; - [[nodiscard]] ::emboss::support::Maybe has_foo() const; + ::emboss::support::Maybe has_foo() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -210,9 +209,9 @@ class GenericBarView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -221,13 +220,13 @@ class GenericBarView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -245,9 +244,9 @@ class GenericBarView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -256,13 +255,13 @@ class GenericBarView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -280,9 +279,9 @@ class GenericBarView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -291,13 +290,13 @@ class GenericBarView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -328,7 +327,7 @@ struct EmbossReservedInternalIsGenericBarView< }; template -[[nodiscard]] inline GenericBarView< +inline GenericBarView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -343,7 +342,7 @@ MakeBarView( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericBarView> +inline GenericBarView> MakeBarView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericBarView>( @@ -352,7 +351,7 @@ MakeBarView( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericBarView< +inline GenericBarView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedBarView( T *emboss_reserved_local_data, diff --git a/testdata/golden_cpp/parameters.emb.h b/testdata/golden_cpp/parameters.emb.h index 03e4169..a40f998 100644 --- a/testdata/golden_cpp/parameters.emb.h +++ b/testdata/golden_cpp/parameters.emb.h @@ -385,7 +385,7 @@ class GenericMultiVersionView final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; if (!parameters_initialized_) return false; const auto emboss_reserved_local_ok_subexpr_1 = message_id(); @@ -396,54 +396,62 @@ if (!parameters_initialized_) return false; const auto emboss_reserved_local_ok_subexpr_6 = ::emboss::support::Equal(emboss_reserved_local_ok_subexpr_2, ::emboss::support::Maybe(static_cast(1))); const auto emboss_reserved_local_ok_subexpr_7 = ::emboss::support::And(emboss_reserved_local_ok_subexpr_5, emboss_reserved_local_ok_subexpr_6); + if (!message_id().Ok()) return false; + + if (!IntrinsicSizeInBytes().Ok()) return false; + + if (!MaxSizeInBytes().Ok()) return false; + + if (!MinSizeInBytes().Ok()) return false; + { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!message_id().Ok()) return false; - if (!IntrinsicSizeInBytes().Ok()) return false; - if (!MaxSizeInBytes().Ok()) return false; - if (!MinSizeInBytes().Ok()) return false; - } - } - { + const auto emboss_reserved_switch_discrim = emboss_reserved_local_ok_subexpr_2; if (!emboss_reserved_switch_discrim.Known()) return false; switch (emboss_reserved_switch_discrim.ValueOrDefault()) { case static_cast(0): if (!axes().Ok()) return false; break; + case static_cast(1): if (!config().Ok()) return false; break; + + } } + { + const auto emboss_reserved_cond = emboss_reserved_local_ok_subexpr_7; if (!emboss_reserved_cond.Known()) return false; if (emboss_reserved_cond.ValueOrDefault()) { if (!config_vx().Ok()) return false; + + } } + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - [[nodiscard]] ::std::size_t SizeInBytes() const { + ::std::size_t SizeInBytes() const { return static_cast(IntrinsicSizeInBytes().Read()); } - [[nodiscard]] bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericMultiVersionView emboss_reserved_local_other) const { if (!has_product().Known()) return false; @@ -532,7 +540,7 @@ if (!parameters_initialized_) return false; return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericMultiVersionView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_product().ValueOr(false) && @@ -621,7 +629,7 @@ if (!parameters_initialized_) return false; emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericMultiVersionView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -830,46 +838,46 @@ if (!parameters_initialized_) return false; - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } private: - [[nodiscard]] constexpr ::emboss::support::MaybeConstantView + constexpr ::emboss::support::MaybeConstantView product() const { return parameters_initialized_ ? ::emboss::support::MaybeConstantView( product_) : ::emboss::support::MaybeConstantView(); } - [[nodiscard]] constexpr ::emboss::support::Maybe has_product() const { + constexpr ::emboss::support::Maybe has_product() const { return ::emboss::support::Maybe(parameters_initialized_); } public: - [[nodiscard]] typename ::emboss::support::EnumView< + typename ::emboss::support::EnumView< /**/ ::emboss::test::MessageId, ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> message_id() const; - [[nodiscard]] ::emboss::support::Maybe has_message_id() const; + ::emboss::support::Maybe has_message_id() const; public: - [[nodiscard]] typename ::emboss::test::GenericAxesView> + typename ::emboss::test::GenericAxesView> axes() const; - [[nodiscard]] ::emboss::support::Maybe has_axes() const; + ::emboss::support::Maybe has_axes() const; public: - [[nodiscard]] typename ::emboss::test::GenericConfigView>, 32>> + typename ::emboss::test::GenericConfigView>, 32>> config() const; - [[nodiscard]] ::emboss::support::Maybe has_config() const; + ::emboss::support::Maybe has_config() const; public: - [[nodiscard]] typename ::emboss::test::GenericConfigVXView> + typename ::emboss::test::GenericConfigVXView> config_vx() const; - [[nodiscard]] ::emboss::support::Maybe has_config_vx() const; + ::emboss::support::Maybe has_config_vx() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -888,17 +896,17 @@ if (!parameters_initialized_) return false; default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - [[nodiscard]] ::std::int32_t Read() const { + ::std::int32_t Read() const { EMBOSS_CHECK(view_.has_IntrinsicSizeInBytes().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - [[nodiscard]] ::std::int32_t UncheckedRead() const { + ::std::int32_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - [[nodiscard]] bool Ok() const { + bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -911,12 +919,12 @@ if (!parameters_initialized_) return false; this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } private: - [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { + ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.message_id(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(0))); @@ -933,7 +941,7 @@ if (!parameters_initialized_) return false; return emboss_reserved_local_subexpr_12; } - [[nodiscard]] static constexpr bool ValueIsOk( + static constexpr bool ValueIsOk( ::std::int32_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -941,8 +949,8 @@ if (!parameters_initialized_) return false; const GenericMultiVersionView view_; }; - [[nodiscard]] EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; - [[nodiscard]] ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; + EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; public: class EmbossReservedDollarVirtualMaxSizeInBytesView final { @@ -958,9 +966,9 @@ if (!parameters_initialized_) return false; default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -969,13 +977,13 @@ if (!parameters_initialized_) return false; this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -993,9 +1001,9 @@ if (!parameters_initialized_) return false; default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -1004,13 +1012,13 @@ if (!parameters_initialized_) return false; this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -1041,7 +1049,7 @@ struct EmbossReservedInternalIsGenericMultiVersionView< }; template -[[nodiscard]] inline GenericMultiVersionView< +inline GenericMultiVersionView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -1056,7 +1064,7 @@ MakeMultiVersionView(::emboss::test::Product product, T &&emboss_reserved_local } template -[[nodiscard]] inline GenericMultiVersionView> +inline GenericMultiVersionView> MakeMultiVersionView(::emboss::test::Product product, T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericMultiVersionView>( @@ -1065,7 +1073,7 @@ MakeMultiVersionView(::emboss::test::Product product, T *emboss_reserved_local_ } template -[[nodiscard]] inline GenericMultiVersionView< +inline GenericMultiVersionView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedMultiVersionView( ::emboss::test::Product product, T *emboss_reserved_local_data, @@ -1135,7 +1143,7 @@ class GenericAxesView final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; if (!parameters_initialized_) return false; const auto emboss_reserved_local_ok_subexpr_1 = axes(); @@ -1144,57 +1152,69 @@ if (!parameters_initialized_) return false; const auto emboss_reserved_local_ok_subexpr_4 = ::emboss::support::GreaterThan(emboss_reserved_local_ok_subexpr_2, ::emboss::support::Maybe(static_cast(1LL))); const auto emboss_reserved_local_ok_subexpr_5 = ::emboss::support::GreaterThan(emboss_reserved_local_ok_subexpr_2, ::emboss::support::Maybe(static_cast(2LL))); + if (!values().Ok()) return false; + + if (!axis_count_plus_one().Ok()) return false; + + if (!IntrinsicSizeInBytes().Ok()) return false; + + if (!MaxSizeInBytes().Ok()) return false; + + if (!MinSizeInBytes().Ok()) return false; + { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!values().Ok()) return false; - if (!axis_count_plus_one().Ok()) return false; - if (!IntrinsicSizeInBytes().Ok()) return false; - if (!MaxSizeInBytes().Ok()) return false; - if (!MinSizeInBytes().Ok()) return false; - } - } - { + const auto emboss_reserved_cond = emboss_reserved_local_ok_subexpr_3; if (!emboss_reserved_cond.Known()) return false; if (emboss_reserved_cond.ValueOrDefault()) { if (!x().Ok()) return false; + + } } + { + const auto emboss_reserved_cond = emboss_reserved_local_ok_subexpr_4; if (!emboss_reserved_cond.Known()) return false; if (emboss_reserved_cond.ValueOrDefault()) { if (!y().Ok()) return false; + + } } + { + const auto emboss_reserved_cond = emboss_reserved_local_ok_subexpr_5; if (!emboss_reserved_cond.Known()) return false; if (emboss_reserved_cond.ValueOrDefault()) { if (!z().Ok()) return false; + + } } + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - [[nodiscard]] ::std::size_t SizeInBytes() const { + ::std::size_t SizeInBytes() const { return static_cast(IntrinsicSizeInBytes().Read()); } - [[nodiscard]] bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericAxesView emboss_reserved_local_other) const { if (!has_axes().Known()) return false; @@ -1283,7 +1303,7 @@ if (!parameters_initialized_) return false; return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericAxesView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_axes().ValueOr(false) && @@ -1372,7 +1392,7 @@ if (!parameters_initialized_) return false; emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericAxesView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -1600,47 +1620,47 @@ if (!parameters_initialized_) return false; - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } private: - [[nodiscard]] constexpr ::emboss::support::MaybeConstantView + constexpr ::emboss::support::MaybeConstantView axes() const { return parameters_initialized_ ? ::emboss::support::MaybeConstantView( axes_) : ::emboss::support::MaybeConstantView(); } - [[nodiscard]] constexpr ::emboss::support::Maybe has_axes() const { + constexpr ::emboss::support::Maybe has_axes() const { return ::emboss::support::Maybe(parameters_initialized_); } public: - [[nodiscard]] typename ::emboss::support::GenericArrayView< + typename ::emboss::support::GenericArrayView< typename ::emboss::test::GenericAxisView::template OffsetStorageType> , typename Storage::template OffsetStorageType, 4, 8 , ::emboss::test::AxisType> values() const; - [[nodiscard]] ::emboss::support::Maybe has_values() const; + ::emboss::support::Maybe has_values() const; public: - [[nodiscard]] typename ::emboss::test::GenericAxisView> + typename ::emboss::test::GenericAxisView> x() const; - [[nodiscard]] ::emboss::support::Maybe has_x() const; + ::emboss::support::Maybe has_x() const; public: - [[nodiscard]] typename ::emboss::test::GenericAxisView> + typename ::emboss::test::GenericAxisView> y() const; - [[nodiscard]] ::emboss::support::Maybe has_y() const; + ::emboss::support::Maybe has_y() const; public: - [[nodiscard]] typename ::emboss::test::GenericAxisView> + typename ::emboss::test::GenericAxisView> z() const; - [[nodiscard]] ::emboss::support::Maybe has_z() const; + ::emboss::support::Maybe has_z() const; public: class EmbossReservedVirtualAxisCountPlusOneView final { @@ -1659,17 +1679,17 @@ if (!parameters_initialized_) return false; default; ~EmbossReservedVirtualAxisCountPlusOneView() = default; - [[nodiscard]] ::std::int32_t Read() const { + ::std::int32_t Read() const { EMBOSS_CHECK(view_.has_axis_count_plus_one().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - [[nodiscard]] ::std::int32_t UncheckedRead() const { + ::std::int32_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - [[nodiscard]] bool Ok() const { + bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -1682,12 +1702,12 @@ if (!parameters_initialized_) return false; this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } private: - [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { + ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.axes(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Sum(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(1LL))); @@ -1695,7 +1715,7 @@ if (!parameters_initialized_) return false; return emboss_reserved_local_subexpr_3; } - [[nodiscard]] static constexpr bool ValueIsOk( + static constexpr bool ValueIsOk( ::std::int32_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -1703,8 +1723,8 @@ if (!parameters_initialized_) return false; const GenericAxesView view_; }; - [[nodiscard]] EmbossReservedVirtualAxisCountPlusOneView axis_count_plus_one() const; - [[nodiscard]] ::emboss::support::Maybe has_axis_count_plus_one() const; + EmbossReservedVirtualAxisCountPlusOneView axis_count_plus_one() const; + ::emboss::support::Maybe has_axis_count_plus_one() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -1723,17 +1743,17 @@ if (!parameters_initialized_) return false; default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - [[nodiscard]] ::std::int32_t Read() const { + ::std::int32_t Read() const { EMBOSS_CHECK(view_.has_IntrinsicSizeInBytes().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - [[nodiscard]] ::std::int32_t UncheckedRead() const { + ::std::int32_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - [[nodiscard]] bool Ok() const { + bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -1746,12 +1766,12 @@ if (!parameters_initialized_) return false; this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } private: - [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { + ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.axes(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Product(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(4LL))); @@ -1768,7 +1788,7 @@ if (!parameters_initialized_) return false; return emboss_reserved_local_subexpr_12; } - [[nodiscard]] static constexpr bool ValueIsOk( + static constexpr bool ValueIsOk( ::std::int32_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -1776,8 +1796,8 @@ if (!parameters_initialized_) return false; const GenericAxesView view_; }; - [[nodiscard]] EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; - [[nodiscard]] ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; + EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; public: class EmbossReservedDollarVirtualMaxSizeInBytesView final { @@ -1793,9 +1813,9 @@ if (!parameters_initialized_) return false; default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -1804,13 +1824,13 @@ if (!parameters_initialized_) return false; this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -1828,9 +1848,9 @@ if (!parameters_initialized_) return false; default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -1839,13 +1859,13 @@ if (!parameters_initialized_) return false; this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -1876,7 +1896,7 @@ struct EmbossReservedInternalIsGenericAxesView< }; template -[[nodiscard]] inline GenericAxesView< +inline GenericAxesView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -1891,7 +1911,7 @@ MakeAxesView(::std::int32_t axes, T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericAxesView> +inline GenericAxesView> MakeAxesView(::std::int32_t axes, T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericAxesView>( @@ -1900,7 +1920,7 @@ MakeAxesView(::std::int32_t axes, T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericAxesView< +inline GenericAxesView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedAxesView( ::std::int32_t axes, T *emboss_reserved_local_data, @@ -1973,43 +1993,45 @@ class GenericAxisPairView final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; if (!parameters_initialized_) return false; - { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!axis_type_a().Ok()) return false; - if (!axis_a().Ok()) return false; - if (!axis_type_b().Ok()) return false; - if (!axis_b().Ok()) return false; - if (!IntrinsicSizeInBytes().Ok()) return false; - if (!MaxSizeInBytes().Ok()) return false; - if (!MinSizeInBytes().Ok()) return false; - } - } + if (!axis_type_a().Ok()) return false; + + if (!axis_a().Ok()) return false; + + if (!axis_type_b().Ok()) return false; + + if (!axis_b().Ok()) return false; + + if (!IntrinsicSizeInBytes().Ok()) return false; + + if (!MaxSizeInBytes().Ok()) return false; + + if (!MinSizeInBytes().Ok()) return false; + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { + static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - [[nodiscard]] static constexpr bool SizeIsKnown() { + static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericAxisPairView emboss_reserved_local_other) const { if (!has_axis_type_a_parameter().Known()) return false; @@ -2081,7 +2103,7 @@ if (!parameters_initialized_) return false; return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericAxisPairView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_axis_type_a_parameter().ValueOr(false) && @@ -2156,7 +2178,7 @@ if (!parameters_initialized_) return false; emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericAxisPairView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -2327,29 +2349,29 @@ if (!parameters_initialized_) return false; - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } private: - [[nodiscard]] constexpr ::emboss::support::MaybeConstantView + constexpr ::emboss::support::MaybeConstantView axis_type_a_parameter() const { return parameters_initialized_ ? ::emboss::support::MaybeConstantView( axis_type_a_parameter_) : ::emboss::support::MaybeConstantView(); } - [[nodiscard]] constexpr ::emboss::support::Maybe has_axis_type_a_parameter() const { + constexpr ::emboss::support::Maybe has_axis_type_a_parameter() const { return ::emboss::support::Maybe(parameters_initialized_); } private: - [[nodiscard]] constexpr ::emboss::support::MaybeConstantView + constexpr ::emboss::support::MaybeConstantView axis_type_b_parameter() const { return parameters_initialized_ ? ::emboss::support::MaybeConstantView( axis_type_b_parameter_) : ::emboss::support::MaybeConstantView(); } - [[nodiscard]] constexpr ::emboss::support::Maybe has_axis_type_b_parameter() const { + constexpr ::emboss::support::Maybe has_axis_type_b_parameter() const { return ::emboss::support::Maybe(parameters_initialized_); } @@ -2370,17 +2392,17 @@ if (!parameters_initialized_) return false; default; ~EmbossReservedVirtualAxisTypeAView() = default; - [[nodiscard]] ::emboss::test::AxisType Read() const { + ::emboss::test::AxisType Read() const { EMBOSS_CHECK(view_.has_axis_type_a().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - [[nodiscard]] ::emboss::test::AxisType UncheckedRead() const { + ::emboss::test::AxisType UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - [[nodiscard]] bool Ok() const { + bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -2393,19 +2415,19 @@ if (!parameters_initialized_) return false; this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } private: - [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { + ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.axis_type_a_parameter(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); return emboss_reserved_local_subexpr_2; } - [[nodiscard]] static constexpr bool ValueIsOk( + static constexpr bool ValueIsOk( ::emboss::test::AxisType emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -2413,14 +2435,14 @@ if (!parameters_initialized_) return false; const GenericAxisPairView view_; }; - [[nodiscard]] EmbossReservedVirtualAxisTypeAView axis_type_a() const; - [[nodiscard]] ::emboss::support::Maybe has_axis_type_a() const; + EmbossReservedVirtualAxisTypeAView axis_type_a() const; + ::emboss::support::Maybe has_axis_type_a() const; public: - [[nodiscard]] typename ::emboss::test::GenericAxisView> + typename ::emboss::test::GenericAxisView> axis_a() const; - [[nodiscard]] ::emboss::support::Maybe has_axis_a() const; + ::emboss::support::Maybe has_axis_a() const; public: class EmbossReservedVirtualAxisTypeBView final { @@ -2439,17 +2461,17 @@ if (!parameters_initialized_) return false; default; ~EmbossReservedVirtualAxisTypeBView() = default; - [[nodiscard]] ::emboss::test::AxisType Read() const { + ::emboss::test::AxisType Read() const { EMBOSS_CHECK(view_.has_axis_type_b().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - [[nodiscard]] ::emboss::test::AxisType UncheckedRead() const { + ::emboss::test::AxisType UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - [[nodiscard]] bool Ok() const { + bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -2462,19 +2484,19 @@ if (!parameters_initialized_) return false; this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } private: - [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { + ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.axis_type_b_parameter(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); return emboss_reserved_local_subexpr_2; } - [[nodiscard]] static constexpr bool ValueIsOk( + static constexpr bool ValueIsOk( ::emboss::test::AxisType emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -2482,14 +2504,14 @@ if (!parameters_initialized_) return false; const GenericAxisPairView view_; }; - [[nodiscard]] EmbossReservedVirtualAxisTypeBView axis_type_b() const; - [[nodiscard]] ::emboss::support::Maybe has_axis_type_b() const; + EmbossReservedVirtualAxisTypeBView axis_type_b() const; + ::emboss::support::Maybe has_axis_type_b() const; public: - [[nodiscard]] typename ::emboss::test::GenericAxisView> + typename ::emboss::test::GenericAxisView> axis_b() const; - [[nodiscard]] ::emboss::support::Maybe has_axis_b() const; + ::emboss::support::Maybe has_axis_b() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -2505,9 +2527,9 @@ if (!parameters_initialized_) return false; default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -2516,13 +2538,13 @@ if (!parameters_initialized_) return false; this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -2540,9 +2562,9 @@ if (!parameters_initialized_) return false; default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -2551,13 +2573,13 @@ if (!parameters_initialized_) return false; this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -2575,9 +2597,9 @@ if (!parameters_initialized_) return false; default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -2586,13 +2608,13 @@ if (!parameters_initialized_) return false; this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -2624,7 +2646,7 @@ struct EmbossReservedInternalIsGenericAxisPairView< }; template -[[nodiscard]] inline GenericAxisPairView< +inline GenericAxisPairView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -2639,7 +2661,7 @@ MakeAxisPairView(::emboss::test::AxisType axis_type_a_parameter, ::emboss::test: } template -[[nodiscard]] inline GenericAxisPairView> +inline GenericAxisPairView> MakeAxisPairView(::emboss::test::AxisType axis_type_a_parameter, ::emboss::test::AxisType axis_type_b_parameter, T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericAxisPairView>( @@ -2648,7 +2670,7 @@ MakeAxisPairView(::emboss::test::AxisType axis_type_a_parameter, ::emboss::test: } template -[[nodiscard]] inline GenericAxisPairView< +inline GenericAxisPairView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedAxisPairView( ::emboss::test::AxisType axis_type_a_parameter, ::emboss::test::AxisType axis_type_b_parameter, T *emboss_reserved_local_data, @@ -2714,40 +2736,40 @@ class GenericAxesEnvelopeView final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; - { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!axis_count().Ok()) return false; - if (!axes().Ok()) return false; - if (!IntrinsicSizeInBytes().Ok()) return false; - if (!MaxSizeInBytes().Ok()) return false; - if (!MinSizeInBytes().Ok()) return false; - } - } + if (!axis_count().Ok()) return false; + + if (!axes().Ok()) return false; + + if (!IntrinsicSizeInBytes().Ok()) return false; + + if (!MaxSizeInBytes().Ok()) return false; + + if (!MinSizeInBytes().Ok()) return false; + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - [[nodiscard]] ::std::size_t SizeInBytes() const { + ::std::size_t SizeInBytes() const { return static_cast(IntrinsicSizeInBytes().Read()); } - [[nodiscard]] bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericAxesEnvelopeView emboss_reserved_local_other) const { if (!has_axis_count().Known()) return false; @@ -2785,7 +2807,7 @@ class GenericAxesEnvelopeView final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericAxesEnvelopeView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_axis_count().ValueOr(false) && @@ -2832,7 +2854,7 @@ class GenericAxesEnvelopeView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericAxesEnvelopeView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -2965,21 +2987,21 @@ class GenericAxesEnvelopeView final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> axis_count() const; - [[nodiscard]] ::emboss::support::Maybe has_axis_count() const; + ::emboss::support::Maybe has_axis_count() const; public: - [[nodiscard]] typename ::emboss::test::GenericAxesView> + typename ::emboss::test::GenericAxesView> axes() const; - [[nodiscard]] ::emboss::support::Maybe has_axes() const; + ::emboss::support::Maybe has_axes() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -2998,17 +3020,17 @@ class GenericAxesEnvelopeView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - [[nodiscard]] ::std::int32_t Read() const { + ::std::int32_t Read() const { EMBOSS_CHECK(view_.has_IntrinsicSizeInBytes().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - [[nodiscard]] ::std::int32_t UncheckedRead() const { + ::std::int32_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - [[nodiscard]] bool Ok() const { + bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -3021,12 +3043,12 @@ class GenericAxesEnvelopeView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } private: - [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { + ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.axis_count(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Product(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(4LL))); @@ -3037,7 +3059,7 @@ class GenericAxesEnvelopeView final { return emboss_reserved_local_subexpr_6; } - [[nodiscard]] static constexpr bool ValueIsOk( + static constexpr bool ValueIsOk( ::std::int32_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -3045,8 +3067,8 @@ class GenericAxesEnvelopeView final { const GenericAxesEnvelopeView view_; }; - [[nodiscard]] EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; - [[nodiscard]] ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; + EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; public: class EmbossReservedDollarVirtualMaxSizeInBytesView final { @@ -3062,9 +3084,9 @@ class GenericAxesEnvelopeView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -3073,13 +3095,13 @@ class GenericAxesEnvelopeView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -3097,9 +3119,9 @@ class GenericAxesEnvelopeView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -3108,13 +3130,13 @@ class GenericAxesEnvelopeView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -3145,7 +3167,7 @@ struct EmbossReservedInternalIsGenericAxesEnvelopeView< }; template -[[nodiscard]] inline GenericAxesEnvelopeView< +inline GenericAxesEnvelopeView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -3160,7 +3182,7 @@ MakeAxesEnvelopeView( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericAxesEnvelopeView> +inline GenericAxesEnvelopeView> MakeAxesEnvelopeView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericAxesEnvelopeView>( @@ -3169,7 +3191,7 @@ MakeAxesEnvelopeView( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericAxesEnvelopeView< +inline GenericAxesEnvelopeView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedAxesEnvelopeView( T *emboss_reserved_local_data, @@ -3346,58 +3368,64 @@ class GenericAxisView final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; if (!parameters_initialized_) return false; const auto emboss_reserved_local_ok_subexpr_1 = axis_type(); const auto emboss_reserved_local_ok_subexpr_2 = (emboss_reserved_local_ok_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + if (!value().Ok()) return false; + + if (!axis_type().Ok()) return false; + + if (!IntrinsicSizeInBytes().Ok()) return false; + + if (!MaxSizeInBytes().Ok()) return false; + + if (!MinSizeInBytes().Ok()) return false; + { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!value().Ok()) return false; - if (!axis_type().Ok()) return false; - if (!IntrinsicSizeInBytes().Ok()) return false; - if (!MaxSizeInBytes().Ok()) return false; - if (!MinSizeInBytes().Ok()) return false; - } - } - { + const auto emboss_reserved_switch_discrim = emboss_reserved_local_ok_subexpr_2; if (!emboss_reserved_switch_discrim.Known()) return false; switch (emboss_reserved_switch_discrim.ValueOrDefault()) { case static_cast(1): if (!x().Ok()) return false; break; + case static_cast(2): if (!y().Ok()) return false; break; + case static_cast(3): if (!z().Ok()) return false; break; + + } } + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { + static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - [[nodiscard]] static constexpr bool SizeIsKnown() { + static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericAxisView emboss_reserved_local_other) const { if (!has_axis_type_parameter().Known()) return false; @@ -3486,7 +3514,7 @@ if (!parameters_initialized_) return false; return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericAxisView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_axis_type_parameter().ValueOr(false) && @@ -3575,7 +3603,7 @@ if (!parameters_initialized_) return false; emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericAxisView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -3803,27 +3831,27 @@ if (!parameters_initialized_) return false; - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } private: - [[nodiscard]] constexpr ::emboss::support::MaybeConstantView + constexpr ::emboss::support::MaybeConstantView axis_type_parameter() const { return parameters_initialized_ ? ::emboss::support::MaybeConstantView( axis_type_parameter_) : ::emboss::support::MaybeConstantView(); } - [[nodiscard]] constexpr ::emboss::support::Maybe has_axis_type_parameter() const { + constexpr ::emboss::support::Maybe has_axis_type_parameter() const { return ::emboss::support::Maybe(parameters_initialized_); } public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 32>> value() const; - [[nodiscard]] ::emboss::support::Maybe has_value() const; + ::emboss::support::Maybe has_value() const; public: class EmbossReservedVirtualAxisTypeView final { @@ -3842,17 +3870,17 @@ if (!parameters_initialized_) return false; default; ~EmbossReservedVirtualAxisTypeView() = default; - [[nodiscard]] ::emboss::test::AxisType Read() const { + ::emboss::test::AxisType Read() const { EMBOSS_CHECK(view_.has_axis_type().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - [[nodiscard]] ::emboss::test::AxisType UncheckedRead() const { + ::emboss::test::AxisType UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - [[nodiscard]] bool Ok() const { + bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -3865,19 +3893,19 @@ if (!parameters_initialized_) return false; this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } private: - [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { + ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.axis_type_parameter(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); return emboss_reserved_local_subexpr_2; } - [[nodiscard]] static constexpr bool ValueIsOk( + static constexpr bool ValueIsOk( ::emboss::test::AxisType emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -3885,32 +3913,32 @@ if (!parameters_initialized_) return false; const GenericAxisView view_; }; - [[nodiscard]] EmbossReservedVirtualAxisTypeView axis_type() const; - [[nodiscard]] ::emboss::support::Maybe has_axis_type() const; + EmbossReservedVirtualAxisTypeView axis_type() const; + ::emboss::support::Maybe has_axis_type() const; public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 32>> x() const; - [[nodiscard]] ::emboss::support::Maybe has_x() const; + ::emboss::support::Maybe has_x() const; public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 32>> y() const; - [[nodiscard]] ::emboss::support::Maybe has_y() const; + ::emboss::support::Maybe has_y() const; public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 32>> z() const; - [[nodiscard]] ::emboss::support::Maybe has_z() const; + ::emboss::support::Maybe has_z() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -3926,9 +3954,9 @@ if (!parameters_initialized_) return false; default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -3937,13 +3965,13 @@ if (!parameters_initialized_) return false; this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -3961,9 +3989,9 @@ if (!parameters_initialized_) return false; default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -3972,13 +4000,13 @@ if (!parameters_initialized_) return false; this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -3996,9 +4024,9 @@ if (!parameters_initialized_) return false; default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -4007,13 +4035,13 @@ if (!parameters_initialized_) return false; this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -4044,7 +4072,7 @@ struct EmbossReservedInternalIsGenericAxisView< }; template -[[nodiscard]] inline GenericAxisView< +inline GenericAxisView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -4059,7 +4087,7 @@ MakeAxisView(::emboss::test::AxisType axis_type_parameter, T &&emboss_reserved_ } template -[[nodiscard]] inline GenericAxisView> +inline GenericAxisView> MakeAxisView(::emboss::test::AxisType axis_type_parameter, T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericAxisView>( @@ -4068,7 +4096,7 @@ MakeAxisView(::emboss::test::AxisType axis_type_parameter, T *emboss_reserved_l } template -[[nodiscard]] inline GenericAxisView< +inline GenericAxisView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedAxisView( ::emboss::test::AxisType axis_type_parameter, T *emboss_reserved_local_data, @@ -4133,40 +4161,39 @@ class GenericConfigView final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; - { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!power().Ok()) return false; - if (!IntrinsicSizeInBits().Ok()) return false; - if (!MaxSizeInBits().Ok()) return false; - if (!MinSizeInBits().Ok()) return false; - } - } + if (!power().Ok()) return false; + + if (!IntrinsicSizeInBits().Ok()) return false; + + if (!MaxSizeInBits().Ok()) return false; + + if (!MinSizeInBits().Ok()) return false; + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBits().Ok() && backing_.SizeInBits() >= static_cast( IntrinsicSizeInBits().UncheckedRead()); } - [[nodiscard]] static constexpr ::std::size_t SizeInBits() { + static constexpr ::std::size_t SizeInBits() { return static_cast(IntrinsicSizeInBits().Read()); } - [[nodiscard]] static constexpr bool SizeIsKnown() { + static constexpr bool SizeIsKnown() { return IntrinsicSizeInBits().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericConfigView emboss_reserved_local_other) const { if (!has_power().Known()) return false; @@ -4187,7 +4214,7 @@ class GenericConfigView final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericConfigView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_power().ValueOr(false) && @@ -4220,7 +4247,7 @@ class GenericConfigView final { emboss_reserved_local_other.IntrinsicSizeInBits().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericConfigView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -4315,15 +4342,15 @@ class GenericConfigView final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: - [[nodiscard]] typename ::emboss::prelude::FlagView< + typename ::emboss::prelude::FlagView< /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, typename Storage::template OffsetStorageType> power() const; - [[nodiscard]] ::emboss::support::Maybe has_power() const; + ::emboss::support::Maybe has_power() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBitsView final { @@ -4339,9 +4366,9 @@ class GenericConfigView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBitsView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -4350,13 +4377,13 @@ class GenericConfigView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBitsView IntrinsicSizeInBits() { + static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBitsView IntrinsicSizeInBits() { return EmbossReservedDollarVirtualIntrinsicSizeInBitsView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBits() { + static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBits() { return ::emboss::support::Maybe(true); } @@ -4374,9 +4401,9 @@ class GenericConfigView final { default; ~EmbossReservedDollarVirtualMaxSizeInBitsView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -4385,13 +4412,13 @@ class GenericConfigView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBitsView MaxSizeInBits() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBitsView MaxSizeInBits() { return EmbossReservedDollarVirtualMaxSizeInBitsView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBits() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBits() { return ::emboss::support::Maybe(true); } @@ -4409,9 +4436,9 @@ class GenericConfigView final { default; ~EmbossReservedDollarVirtualMinSizeInBitsView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -4420,13 +4447,13 @@ class GenericConfigView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBitsView MinSizeInBits() { + static constexpr EmbossReservedDollarVirtualMinSizeInBitsView MinSizeInBits() { return EmbossReservedDollarVirtualMinSizeInBitsView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBits() { + static constexpr ::emboss::support::Maybe has_MinSizeInBits() { return ::emboss::support::Maybe(true); } @@ -4457,7 +4484,7 @@ struct EmbossReservedInternalIsGenericConfigView< }; template -[[nodiscard]] inline GenericConfigView< +inline GenericConfigView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -4472,7 +4499,7 @@ MakeConfigView( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericConfigView> +inline GenericConfigView> MakeConfigView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericConfigView>( @@ -4481,7 +4508,7 @@ MakeConfigView( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericConfigView< +inline GenericConfigView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedConfigView( T *emboss_reserved_local_data, @@ -4552,40 +4579,39 @@ class GenericEmbossReservedAnonymousField1View final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; - { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!power().Ok()) return false; - if (!IntrinsicSizeInBits().Ok()) return false; - if (!MaxSizeInBits().Ok()) return false; - if (!MinSizeInBits().Ok()) return false; - } - } + if (!power().Ok()) return false; + + if (!IntrinsicSizeInBits().Ok()) return false; + + if (!MaxSizeInBits().Ok()) return false; + + if (!MinSizeInBits().Ok()) return false; + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBits().Ok() && backing_.SizeInBits() >= static_cast( IntrinsicSizeInBits().UncheckedRead()); } - [[nodiscard]] static constexpr ::std::size_t SizeInBits() { + static constexpr ::std::size_t SizeInBits() { return static_cast(IntrinsicSizeInBits().Read()); } - [[nodiscard]] static constexpr bool SizeIsKnown() { + static constexpr bool SizeIsKnown() { return IntrinsicSizeInBits().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericEmbossReservedAnonymousField1View emboss_reserved_local_other) const { if (!has_power().Known()) return false; @@ -4606,7 +4632,7 @@ class GenericEmbossReservedAnonymousField1View final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericEmbossReservedAnonymousField1View emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_power().ValueOr(false) && @@ -4639,7 +4665,7 @@ class GenericEmbossReservedAnonymousField1View final { emboss_reserved_local_other.IntrinsicSizeInBits().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericEmbossReservedAnonymousField1View emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -4734,15 +4760,15 @@ class GenericEmbossReservedAnonymousField1View final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: - [[nodiscard]] typename ::emboss::prelude::FlagView< + typename ::emboss::prelude::FlagView< /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, typename Storage::template OffsetStorageType> power() const; - [[nodiscard]] ::emboss::support::Maybe has_power() const; + ::emboss::support::Maybe has_power() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBitsView final { @@ -4758,9 +4784,9 @@ class GenericEmbossReservedAnonymousField1View final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBitsView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -4769,13 +4795,13 @@ class GenericEmbossReservedAnonymousField1View final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBitsView IntrinsicSizeInBits() { + static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBitsView IntrinsicSizeInBits() { return EmbossReservedDollarVirtualIntrinsicSizeInBitsView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBits() { + static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBits() { return ::emboss::support::Maybe(true); } @@ -4793,9 +4819,9 @@ class GenericEmbossReservedAnonymousField1View final { default; ~EmbossReservedDollarVirtualMaxSizeInBitsView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -4804,13 +4830,13 @@ class GenericEmbossReservedAnonymousField1View final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBitsView MaxSizeInBits() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBitsView MaxSizeInBits() { return EmbossReservedDollarVirtualMaxSizeInBitsView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBits() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBits() { return ::emboss::support::Maybe(true); } @@ -4828,9 +4854,9 @@ class GenericEmbossReservedAnonymousField1View final { default; ~EmbossReservedDollarVirtualMinSizeInBitsView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -4839,13 +4865,13 @@ class GenericEmbossReservedAnonymousField1View final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBitsView MinSizeInBits() { + static constexpr EmbossReservedDollarVirtualMinSizeInBitsView MinSizeInBits() { return EmbossReservedDollarVirtualMinSizeInBitsView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBits() { + static constexpr ::emboss::support::Maybe has_MinSizeInBits() { return ::emboss::support::Maybe(true); } @@ -4876,7 +4902,7 @@ struct EmbossReservedInternalIsGenericEmbossReservedAnonymousField1View< }; template -[[nodiscard]] inline GenericEmbossReservedAnonymousField1View< +inline GenericEmbossReservedAnonymousField1View< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -4891,7 +4917,7 @@ MakeEmbossReservedAnonymousField1View( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericEmbossReservedAnonymousField1View> +inline GenericEmbossReservedAnonymousField1View> MakeEmbossReservedAnonymousField1View( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericEmbossReservedAnonymousField1View>( @@ -4900,7 +4926,7 @@ MakeEmbossReservedAnonymousField1View( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericEmbossReservedAnonymousField1View< +inline GenericEmbossReservedAnonymousField1View< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedEmbossReservedAnonymousField1View( T *emboss_reserved_local_data, @@ -4961,49 +4987,53 @@ class GenericConfigVXView final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; const auto emboss_reserved_local_ok_subexpr_1 = ::emboss::support::And(::emboss::support::Maybe(true), ::emboss::support::Maybe(true)); + if (!emboss_reserved_anonymous_field_1().Ok()) return false; + + if (!gain().Ok()) return false; + + if (!IntrinsicSizeInBytes().Ok()) return false; + + if (!MaxSizeInBytes().Ok()) return false; + + if (!MinSizeInBytes().Ok()) return false; + { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!emboss_reserved_anonymous_field_1().Ok()) return false; - if (!gain().Ok()) return false; - if (!IntrinsicSizeInBytes().Ok()) return false; - if (!MaxSizeInBytes().Ok()) return false; - if (!MinSizeInBytes().Ok()) return false; - } - } - { + const auto emboss_reserved_cond = emboss_reserved_local_ok_subexpr_1; if (!emboss_reserved_cond.Known()) return false; if (emboss_reserved_cond.ValueOrDefault()) { if (!power().Ok()) return false; + + } } + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { + static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - [[nodiscard]] static constexpr bool SizeIsKnown() { + static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericConfigVXView emboss_reserved_local_other) const { if (!has_emboss_reserved_anonymous_field_1().Known()) return false; @@ -5041,7 +5071,7 @@ class GenericConfigVXView final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericConfigVXView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_emboss_reserved_anonymous_field_1().ValueOr(false) && @@ -5088,7 +5118,7 @@ class GenericConfigVXView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericConfigVXView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -5221,28 +5251,28 @@ class GenericConfigVXView final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } private: - [[nodiscard]] typename ::emboss::test::ConfigVX::GenericEmbossReservedAnonymousField1View>, 32>> + typename ::emboss::test::ConfigVX::GenericEmbossReservedAnonymousField1View>, 32>> emboss_reserved_anonymous_field_1() const; - [[nodiscard]] ::emboss::support::Maybe has_emboss_reserved_anonymous_field_1() const; + ::emboss::support::Maybe has_emboss_reserved_anonymous_field_1() const; public: - [[nodiscard]] auto power() const -> decltype(this->emboss_reserved_anonymous_field_1().power()) { + auto power() const -> decltype(this->emboss_reserved_anonymous_field_1().power()) { return has_power().ValueOrDefault() ? emboss_reserved_anonymous_field_1().power() : decltype(this->emboss_reserved_anonymous_field_1().power())(); } - [[nodiscard]] ::emboss::support::Maybe has_power() const; + ::emboss::support::Maybe has_power() const; public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 32>> gain() const; - [[nodiscard]] ::emboss::support::Maybe has_gain() const; + ::emboss::support::Maybe has_gain() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -5258,9 +5288,9 @@ class GenericConfigVXView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -5269,13 +5299,13 @@ class GenericConfigVXView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -5293,9 +5323,9 @@ class GenericConfigVXView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -5304,13 +5334,13 @@ class GenericConfigVXView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -5328,9 +5358,9 @@ class GenericConfigVXView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -5339,13 +5369,13 @@ class GenericConfigVXView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -5376,7 +5406,7 @@ struct EmbossReservedInternalIsGenericConfigVXView< }; template -[[nodiscard]] inline GenericConfigVXView< +inline GenericConfigVXView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -5391,7 +5421,7 @@ MakeConfigVXView( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericConfigVXView> +inline GenericConfigVXView> MakeConfigVXView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericConfigVXView>( @@ -5400,7 +5430,7 @@ MakeConfigVXView( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericConfigVXView< +inline GenericConfigVXView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedConfigVXView( T *emboss_reserved_local_data, @@ -5466,40 +5496,39 @@ class GenericStructWithUnusedParameterView final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; if (!parameters_initialized_) return false; - { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!y().Ok()) return false; - if (!IntrinsicSizeInBytes().Ok()) return false; - if (!MaxSizeInBytes().Ok()) return false; - if (!MinSizeInBytes().Ok()) return false; - } - } + if (!y().Ok()) return false; + + if (!IntrinsicSizeInBytes().Ok()) return false; + + if (!MaxSizeInBytes().Ok()) return false; + + if (!MinSizeInBytes().Ok()) return false; + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { + static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - [[nodiscard]] static constexpr bool SizeIsKnown() { + static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericStructWithUnusedParameterView emboss_reserved_local_other) const { if (!has_x().Known()) return false; @@ -5537,7 +5566,7 @@ if (!parameters_initialized_) return false; return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericStructWithUnusedParameterView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_x().ValueOr(false) && @@ -5584,7 +5613,7 @@ if (!parameters_initialized_) return false; emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericStructWithUnusedParameterView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -5679,27 +5708,27 @@ if (!parameters_initialized_) return false; - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } private: - [[nodiscard]] constexpr ::emboss::support::MaybeConstantView + constexpr ::emboss::support::MaybeConstantView x() const { return parameters_initialized_ ? ::emboss::support::MaybeConstantView( x_) : ::emboss::support::MaybeConstantView(); } - [[nodiscard]] constexpr ::emboss::support::Maybe has_x() const { + constexpr ::emboss::support::Maybe has_x() const { return ::emboss::support::Maybe(parameters_initialized_); } public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> y() const; - [[nodiscard]] ::emboss::support::Maybe has_y() const; + ::emboss::support::Maybe has_y() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -5715,9 +5744,9 @@ if (!parameters_initialized_) return false; default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -5726,13 +5755,13 @@ if (!parameters_initialized_) return false; this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -5750,9 +5779,9 @@ if (!parameters_initialized_) return false; default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -5761,13 +5790,13 @@ if (!parameters_initialized_) return false; this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -5785,9 +5814,9 @@ if (!parameters_initialized_) return false; default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -5796,13 +5825,13 @@ if (!parameters_initialized_) return false; this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -5833,7 +5862,7 @@ struct EmbossReservedInternalIsGenericStructWithUnusedParameterView< }; template -[[nodiscard]] inline GenericStructWithUnusedParameterView< +inline GenericStructWithUnusedParameterView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -5848,7 +5877,7 @@ MakeStructWithUnusedParameterView(::std::int32_t x, T &&emboss_reserved_local_a } template -[[nodiscard]] inline GenericStructWithUnusedParameterView> +inline GenericStructWithUnusedParameterView> MakeStructWithUnusedParameterView(::std::int32_t x, T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericStructWithUnusedParameterView>( @@ -5857,7 +5886,7 @@ MakeStructWithUnusedParameterView(::std::int32_t x, T *emboss_reserved_local_da } template -[[nodiscard]] inline GenericStructWithUnusedParameterView< +inline GenericStructWithUnusedParameterView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedStructWithUnusedParameterView( ::std::int32_t x, T *emboss_reserved_local_data, @@ -5923,41 +5952,41 @@ class GenericStructContainingStructWithUnusedParameterView final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; - { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!x().Ok()) return false; - if (!swup().Ok()) return false; - if (!IntrinsicSizeInBytes().Ok()) return false; - if (!MaxSizeInBytes().Ok()) return false; - if (!MinSizeInBytes().Ok()) return false; - } - } + if (!x().Ok()) return false; + + if (!swup().Ok()) return false; + + if (!IntrinsicSizeInBytes().Ok()) return false; + + if (!MaxSizeInBytes().Ok()) return false; + + if (!MinSizeInBytes().Ok()) return false; + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { + static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - [[nodiscard]] static constexpr bool SizeIsKnown() { + static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericStructContainingStructWithUnusedParameterView emboss_reserved_local_other) const { if (!has_x().Known()) return false; @@ -5995,7 +6024,7 @@ class GenericStructContainingStructWithUnusedParameterView final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericStructContainingStructWithUnusedParameterView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_x().ValueOr(false) && @@ -6042,7 +6071,7 @@ class GenericStructContainingStructWithUnusedParameterView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericStructContainingStructWithUnusedParameterView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -6175,21 +6204,21 @@ class GenericStructContainingStructWithUnusedParameterView final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> x() const; - [[nodiscard]] ::emboss::support::Maybe has_x() const; + ::emboss::support::Maybe has_x() const; public: - [[nodiscard]] typename ::emboss::test::GenericStructWithUnusedParameterView> + typename ::emboss::test::GenericStructWithUnusedParameterView> swup() const; - [[nodiscard]] ::emboss::support::Maybe has_swup() const; + ::emboss::support::Maybe has_swup() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -6205,9 +6234,9 @@ class GenericStructContainingStructWithUnusedParameterView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -6216,13 +6245,13 @@ class GenericStructContainingStructWithUnusedParameterView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -6240,9 +6269,9 @@ class GenericStructContainingStructWithUnusedParameterView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -6251,13 +6280,13 @@ class GenericStructContainingStructWithUnusedParameterView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -6275,9 +6304,9 @@ class GenericStructContainingStructWithUnusedParameterView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -6286,13 +6315,13 @@ class GenericStructContainingStructWithUnusedParameterView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -6323,7 +6352,7 @@ struct EmbossReservedInternalIsGenericStructContainingStructWithUnusedParameterV }; template -[[nodiscard]] inline GenericStructContainingStructWithUnusedParameterView< +inline GenericStructContainingStructWithUnusedParameterView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -6338,7 +6367,7 @@ MakeStructContainingStructWithUnusedParameterView( T &&emboss_reserved_local_arg } template -[[nodiscard]] inline GenericStructContainingStructWithUnusedParameterView> +inline GenericStructContainingStructWithUnusedParameterView> MakeStructContainingStructWithUnusedParameterView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericStructContainingStructWithUnusedParameterView>( @@ -6347,7 +6376,7 @@ MakeStructContainingStructWithUnusedParameterView( T *emboss_reserved_local_data } template -[[nodiscard]] inline GenericStructContainingStructWithUnusedParameterView< +inline GenericStructContainingStructWithUnusedParameterView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedStructContainingStructWithUnusedParameterView( T *emboss_reserved_local_data, @@ -6414,41 +6443,41 @@ class GenericBiasedValueView final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; if (!parameters_initialized_) return false; - { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!raw_value().Ok()) return false; - if (!value().Ok()) return false; - if (!IntrinsicSizeInBytes().Ok()) return false; - if (!MaxSizeInBytes().Ok()) return false; - if (!MinSizeInBytes().Ok()) return false; - } - } + if (!raw_value().Ok()) return false; + + if (!value().Ok()) return false; + + if (!IntrinsicSizeInBytes().Ok()) return false; + + if (!MaxSizeInBytes().Ok()) return false; + + if (!MinSizeInBytes().Ok()) return false; + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { + static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - [[nodiscard]] static constexpr bool SizeIsKnown() { + static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericBiasedValueView emboss_reserved_local_other) const { if (!has_bias().Known()) return false; @@ -6486,7 +6515,7 @@ if (!parameters_initialized_) return false; return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericBiasedValueView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_bias().ValueOr(false) && @@ -6533,7 +6562,7 @@ if (!parameters_initialized_) return false; emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericBiasedValueView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -6647,27 +6676,27 @@ if (!parameters_initialized_) return false; - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } private: - [[nodiscard]] constexpr ::emboss::support::MaybeConstantView + constexpr ::emboss::support::MaybeConstantView bias() const { return parameters_initialized_ ? ::emboss::support::MaybeConstantView( bias_) : ::emboss::support::MaybeConstantView(); } - [[nodiscard]] constexpr ::emboss::support::Maybe has_bias() const { + constexpr ::emboss::support::Maybe has_bias() const { return ::emboss::support::Maybe(parameters_initialized_); } public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> raw_value() const; - [[nodiscard]] ::emboss::support::Maybe has_raw_value() const; + ::emboss::support::Maybe has_raw_value() const; public: class EmbossReservedVirtualValueView final { @@ -6686,17 +6715,17 @@ if (!parameters_initialized_) return false; default; ~EmbossReservedVirtualValueView() = default; - [[nodiscard]] ::std::int32_t Read() const { + ::std::int32_t Read() const { EMBOSS_CHECK(view_.has_value().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - [[nodiscard]] ::std::int32_t UncheckedRead() const { + ::std::int32_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - [[nodiscard]] bool Ok() const { + bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -6709,12 +6738,12 @@ if (!parameters_initialized_) return false; this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } private: - [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { + ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.raw_value(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = view_.bias(); @@ -6724,7 +6753,7 @@ if (!parameters_initialized_) return false; return emboss_reserved_local_subexpr_5; } - [[nodiscard]] static constexpr bool ValueIsOk( + static constexpr bool ValueIsOk( ::std::int32_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -6732,8 +6761,8 @@ if (!parameters_initialized_) return false; const GenericBiasedValueView view_; }; - [[nodiscard]] EmbossReservedVirtualValueView value() const; - [[nodiscard]] ::emboss::support::Maybe has_value() const; + EmbossReservedVirtualValueView value() const; + ::emboss::support::Maybe has_value() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -6749,9 +6778,9 @@ if (!parameters_initialized_) return false; default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -6760,13 +6789,13 @@ if (!parameters_initialized_) return false; this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -6784,9 +6813,9 @@ if (!parameters_initialized_) return false; default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -6795,13 +6824,13 @@ if (!parameters_initialized_) return false; this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -6819,9 +6848,9 @@ if (!parameters_initialized_) return false; default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -6830,13 +6859,13 @@ if (!parameters_initialized_) return false; this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -6867,7 +6896,7 @@ struct EmbossReservedInternalIsGenericBiasedValueView< }; template -[[nodiscard]] inline GenericBiasedValueView< +inline GenericBiasedValueView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -6882,7 +6911,7 @@ MakeBiasedValueView(::std::int32_t bias, T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericBiasedValueView> +inline GenericBiasedValueView> MakeBiasedValueView(::std::int32_t bias, T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericBiasedValueView>( @@ -6891,7 +6920,7 @@ MakeBiasedValueView(::std::int32_t bias, T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericBiasedValueView< +inline GenericBiasedValueView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedBiasedValueView( ::std::int32_t bias, T *emboss_reserved_local_data, @@ -6958,41 +6987,41 @@ class GenericVirtualFirstFieldWithParamView final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; if (!parameters_initialized_) return false; - { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!x().Ok()) return false; - if (!value().Ok()) return false; - if (!IntrinsicSizeInBytes().Ok()) return false; - if (!MaxSizeInBytes().Ok()) return false; - if (!MinSizeInBytes().Ok()) return false; - } - } + if (!x().Ok()) return false; + + if (!value().Ok()) return false; + + if (!IntrinsicSizeInBytes().Ok()) return false; + + if (!MaxSizeInBytes().Ok()) return false; + + if (!MinSizeInBytes().Ok()) return false; + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { + static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - [[nodiscard]] static constexpr bool SizeIsKnown() { + static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericVirtualFirstFieldWithParamView emboss_reserved_local_other) const { if (!has_param().Known()) return false; @@ -7030,7 +7059,7 @@ if (!parameters_initialized_) return false; return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericVirtualFirstFieldWithParamView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_param().ValueOr(false) && @@ -7077,7 +7106,7 @@ if (!parameters_initialized_) return false; emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericVirtualFirstFieldWithParamView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -7210,34 +7239,34 @@ if (!parameters_initialized_) return false; - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } private: - [[nodiscard]] constexpr ::emboss::support::MaybeConstantView + constexpr ::emboss::support::MaybeConstantView param() const { return parameters_initialized_ ? ::emboss::support::MaybeConstantView( param_) : ::emboss::support::MaybeConstantView(); } - [[nodiscard]] constexpr ::emboss::support::Maybe has_param() const { + constexpr ::emboss::support::Maybe has_param() const { return ::emboss::support::Maybe(parameters_initialized_); } public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> x() const; - [[nodiscard]] ::emboss::support::Maybe has_x() const; + ::emboss::support::Maybe has_x() const; public: - [[nodiscard]] auto value() const -> decltype(this->x()) { + auto value() const -> decltype(this->x()) { return has_value().ValueOrDefault() ? x() : decltype(this->x())(); } - [[nodiscard]] ::emboss::support::Maybe has_value() const; + ::emboss::support::Maybe has_value() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -7253,9 +7282,9 @@ if (!parameters_initialized_) return false; default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -7264,13 +7293,13 @@ if (!parameters_initialized_) return false; this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -7288,9 +7317,9 @@ if (!parameters_initialized_) return false; default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -7299,13 +7328,13 @@ if (!parameters_initialized_) return false; this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -7323,9 +7352,9 @@ if (!parameters_initialized_) return false; default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -7334,13 +7363,13 @@ if (!parameters_initialized_) return false; this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -7371,7 +7400,7 @@ struct EmbossReservedInternalIsGenericVirtualFirstFieldWithParamView< }; template -[[nodiscard]] inline GenericVirtualFirstFieldWithParamView< +inline GenericVirtualFirstFieldWithParamView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -7386,7 +7415,7 @@ MakeVirtualFirstFieldWithParamView(::std::int32_t param, T &&emboss_reserved_lo } template -[[nodiscard]] inline GenericVirtualFirstFieldWithParamView> +inline GenericVirtualFirstFieldWithParamView> MakeVirtualFirstFieldWithParamView(::std::int32_t param, T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericVirtualFirstFieldWithParamView>( @@ -7395,7 +7424,7 @@ MakeVirtualFirstFieldWithParamView(::std::int32_t param, T *emboss_reserved_loc } template -[[nodiscard]] inline GenericVirtualFirstFieldWithParamView< +inline GenericVirtualFirstFieldWithParamView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedVirtualFirstFieldWithParamView( ::std::int32_t param, T *emboss_reserved_local_data, @@ -7462,41 +7491,41 @@ class GenericConstVirtualFirstFieldWithParamView final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; if (!parameters_initialized_) return false; - { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!value().Ok()) return false; - if (!x().Ok()) return false; - if (!IntrinsicSizeInBytes().Ok()) return false; - if (!MaxSizeInBytes().Ok()) return false; - if (!MinSizeInBytes().Ok()) return false; - } - } + if (!value().Ok()) return false; + + if (!x().Ok()) return false; + + if (!IntrinsicSizeInBytes().Ok()) return false; + + if (!MaxSizeInBytes().Ok()) return false; + + if (!MinSizeInBytes().Ok()) return false; + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { + static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - [[nodiscard]] static constexpr bool SizeIsKnown() { + static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericConstVirtualFirstFieldWithParamView emboss_reserved_local_other) const { if (!has_param().Known()) return false; @@ -7534,7 +7563,7 @@ if (!parameters_initialized_) return false; return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericConstVirtualFirstFieldWithParamView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_param().ValueOr(false) && @@ -7581,7 +7610,7 @@ if (!parameters_initialized_) return false; emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericConstVirtualFirstFieldWithParamView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -7695,17 +7724,17 @@ if (!parameters_initialized_) return false; - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } private: - [[nodiscard]] constexpr ::emboss::support::MaybeConstantView + constexpr ::emboss::support::MaybeConstantView param() const { return parameters_initialized_ ? ::emboss::support::MaybeConstantView( param_) : ::emboss::support::MaybeConstantView(); } - [[nodiscard]] constexpr ::emboss::support::Maybe has_param() const { + constexpr ::emboss::support::Maybe has_param() const { return ::emboss::support::Maybe(parameters_initialized_); } @@ -7723,9 +7752,9 @@ if (!parameters_initialized_) return false; default; ~EmbossReservedVirtualValueView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -7734,23 +7763,23 @@ if (!parameters_initialized_) return false; this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedVirtualValueView value() { + static constexpr EmbossReservedVirtualValueView value() { return EmbossReservedVirtualValueView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_value() { + static constexpr ::emboss::support::Maybe has_value() { return ::emboss::support::Maybe(true); } public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> x() const; - [[nodiscard]] ::emboss::support::Maybe has_x() const; + ::emboss::support::Maybe has_x() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -7766,9 +7795,9 @@ if (!parameters_initialized_) return false; default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -7777,13 +7806,13 @@ if (!parameters_initialized_) return false; this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -7801,9 +7830,9 @@ if (!parameters_initialized_) return false; default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -7812,13 +7841,13 @@ if (!parameters_initialized_) return false; this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -7836,9 +7865,9 @@ if (!parameters_initialized_) return false; default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -7847,13 +7876,13 @@ if (!parameters_initialized_) return false; this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -7884,7 +7913,7 @@ struct EmbossReservedInternalIsGenericConstVirtualFirstFieldWithParamView< }; template -[[nodiscard]] inline GenericConstVirtualFirstFieldWithParamView< +inline GenericConstVirtualFirstFieldWithParamView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -7899,7 +7928,7 @@ MakeConstVirtualFirstFieldWithParamView(::std::int32_t param, T &&emboss_reserv } template -[[nodiscard]] inline GenericConstVirtualFirstFieldWithParamView> +inline GenericConstVirtualFirstFieldWithParamView> MakeConstVirtualFirstFieldWithParamView(::std::int32_t param, T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericConstVirtualFirstFieldWithParamView>( @@ -7908,7 +7937,7 @@ MakeConstVirtualFirstFieldWithParamView(::std::int32_t param, T *emboss_reserve } template -[[nodiscard]] inline GenericConstVirtualFirstFieldWithParamView< +inline GenericConstVirtualFirstFieldWithParamView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedConstVirtualFirstFieldWithParamView( ::std::int32_t param, T *emboss_reserved_local_data, @@ -7975,41 +8004,42 @@ class GenericSizedArrayOfBiasedValuesView final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; - { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!element_count().Ok()) return false; - if (!bias().Ok()) return false; - if (!values().Ok()) return false; - if (!IntrinsicSizeInBytes().Ok()) return false; - if (!MaxSizeInBytes().Ok()) return false; - if (!MinSizeInBytes().Ok()) return false; - } - } + if (!element_count().Ok()) return false; + + if (!bias().Ok()) return false; + + if (!values().Ok()) return false; + + if (!IntrinsicSizeInBytes().Ok()) return false; + + if (!MaxSizeInBytes().Ok()) return false; + + if (!MinSizeInBytes().Ok()) return false; + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - [[nodiscard]] ::std::size_t SizeInBytes() const { + ::std::size_t SizeInBytes() const { return static_cast(IntrinsicSizeInBytes().Read()); } - [[nodiscard]] bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericSizedArrayOfBiasedValuesView emboss_reserved_local_other) const { if (!has_element_count().Known()) return false; @@ -8064,7 +8094,7 @@ class GenericSizedArrayOfBiasedValuesView final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericSizedArrayOfBiasedValuesView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_element_count().ValueOr(false) && @@ -8125,7 +8155,7 @@ class GenericSizedArrayOfBiasedValuesView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericSizedArrayOfBiasedValuesView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -8296,33 +8326,33 @@ class GenericSizedArrayOfBiasedValuesView final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> element_count() const; - [[nodiscard]] ::emboss::support::Maybe has_element_count() const; + ::emboss::support::Maybe has_element_count() const; public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> bias() const; - [[nodiscard]] ::emboss::support::Maybe has_bias() const; + ::emboss::support::Maybe has_bias() const; public: - [[nodiscard]] typename ::emboss::support::GenericArrayView< + typename ::emboss::support::GenericArrayView< typename ::emboss::test::GenericBiasedValueView::template OffsetStorageType> , typename Storage::template OffsetStorageType, 1, 8 , ::std::int32_t> values() const; - [[nodiscard]] ::emboss::support::Maybe has_values() const; + ::emboss::support::Maybe has_values() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -8341,17 +8371,17 @@ class GenericSizedArrayOfBiasedValuesView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - [[nodiscard]] ::std::int32_t Read() const { + ::std::int32_t Read() const { EMBOSS_CHECK(view_.has_IntrinsicSizeInBytes().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - [[nodiscard]] ::std::int32_t UncheckedRead() const { + ::std::int32_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - [[nodiscard]] bool Ok() const { + bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -8364,12 +8394,12 @@ class GenericSizedArrayOfBiasedValuesView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } private: - [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { + ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.element_count(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Sum(::emboss::support::Maybe(static_cast(2LL)), emboss_reserved_local_subexpr_2); @@ -8379,7 +8409,7 @@ class GenericSizedArrayOfBiasedValuesView final { return emboss_reserved_local_subexpr_5; } - [[nodiscard]] static constexpr bool ValueIsOk( + static constexpr bool ValueIsOk( ::std::int32_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -8387,8 +8417,8 @@ class GenericSizedArrayOfBiasedValuesView final { const GenericSizedArrayOfBiasedValuesView view_; }; - [[nodiscard]] EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; - [[nodiscard]] ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; + EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; public: class EmbossReservedDollarVirtualMaxSizeInBytesView final { @@ -8404,9 +8434,9 @@ class GenericSizedArrayOfBiasedValuesView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -8415,13 +8445,13 @@ class GenericSizedArrayOfBiasedValuesView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -8439,9 +8469,9 @@ class GenericSizedArrayOfBiasedValuesView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -8450,13 +8480,13 @@ class GenericSizedArrayOfBiasedValuesView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -8487,7 +8517,7 @@ struct EmbossReservedInternalIsGenericSizedArrayOfBiasedValuesView< }; template -[[nodiscard]] inline GenericSizedArrayOfBiasedValuesView< +inline GenericSizedArrayOfBiasedValuesView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -8502,7 +8532,7 @@ MakeSizedArrayOfBiasedValuesView( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericSizedArrayOfBiasedValuesView> +inline GenericSizedArrayOfBiasedValuesView> MakeSizedArrayOfBiasedValuesView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericSizedArrayOfBiasedValuesView>( @@ -8511,7 +8541,7 @@ MakeSizedArrayOfBiasedValuesView( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericSizedArrayOfBiasedValuesView< +inline GenericSizedArrayOfBiasedValuesView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedSizedArrayOfBiasedValuesView( T *emboss_reserved_local_data, diff --git a/testdata/golden_cpp/requires.emb.h b/testdata/golden_cpp/requires.emb.h index 82e7515..d0e42d7 100644 --- a/testdata/golden_cpp/requires.emb.h +++ b/testdata/golden_cpp/requires.emb.h @@ -189,46 +189,50 @@ class GenericRequiresIntegersView final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; - { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!zero_through_nine().Ok()) return false; - if (!ten_through_twenty().Ok()) return false; - if (!disjoint().Ok()) return false; - if (!ztn_plus_ttt().Ok()) return false; - if (!alias_of_zero_through_nine().Ok()) return false; - if (!zero_through_nine_plus_five().Ok()) return false; - if (!IntrinsicSizeInBytes().Ok()) return false; - if (!MaxSizeInBytes().Ok()) return false; - if (!MinSizeInBytes().Ok()) return false; - } - } + if (!zero_through_nine().Ok()) return false; + + if (!ten_through_twenty().Ok()) return false; + + if (!disjoint().Ok()) return false; + + if (!ztn_plus_ttt().Ok()) return false; + + if (!alias_of_zero_through_nine().Ok()) return false; + + if (!zero_through_nine_plus_five().Ok()) return false; + + if (!IntrinsicSizeInBytes().Ok()) return false; + + if (!MaxSizeInBytes().Ok()) return false; + + if (!MinSizeInBytes().Ok()) return false; + + if (!(::emboss::support::LessThanOrEqual((zero_through_nine().Ok() ? ::emboss::support::Maybe(static_cast(zero_through_nine().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Difference((ten_through_twenty().Ok() ? ::emboss::support::Maybe(static_cast(ten_through_twenty().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(10LL))))).ValueOr(false)) return false; return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { + static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - [[nodiscard]] static constexpr bool SizeIsKnown() { + static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericRequiresIntegersView emboss_reserved_local_other) const { if (!has_zero_through_nine().Known()) return false; @@ -283,7 +287,7 @@ class GenericRequiresIntegersView final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericRequiresIntegersView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_zero_through_nine().ValueOr(false) && @@ -344,7 +348,7 @@ class GenericRequiresIntegersView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericRequiresIntegersView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -610,31 +614,31 @@ class GenericRequiresIntegersView final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, RequiresIntegers::EmbossReservedValidatorForZeroThroughNine>, typename ::emboss::support::BitBlock>, 8>> zero_through_nine() const; - [[nodiscard]] ::emboss::support::Maybe has_zero_through_nine() const; + ::emboss::support::Maybe has_zero_through_nine() const; public: - [[nodiscard]] typename ::emboss::prelude::IntView< + typename ::emboss::prelude::IntView< /**/ ::emboss::support::FixedSizeViewParameters<8, RequiresIntegers::EmbossReservedValidatorForTenThroughTwenty>, typename ::emboss::support::BitBlock>, 8>> ten_through_twenty() const; - [[nodiscard]] ::emboss::support::Maybe has_ten_through_twenty() const; + ::emboss::support::Maybe has_ten_through_twenty() const; public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, RequiresIntegers::EmbossReservedValidatorForDisjoint>, typename ::emboss::support::BitBlock>, 8>> disjoint() const; - [[nodiscard]] ::emboss::support::Maybe has_disjoint() const; + ::emboss::support::Maybe has_disjoint() const; public: class EmbossReservedVirtualZtnPlusTttView final { @@ -653,17 +657,17 @@ class GenericRequiresIntegersView final { default; ~EmbossReservedVirtualZtnPlusTttView() = default; - [[nodiscard]] ::std::int32_t Read() const { + ::std::int32_t Read() const { EMBOSS_CHECK(view_.has_ztn_plus_ttt().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - [[nodiscard]] ::std::int32_t UncheckedRead() const { + ::std::int32_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - [[nodiscard]] bool Ok() const { + bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -676,12 +680,12 @@ class GenericRequiresIntegersView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } private: - [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { + ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.zero_through_nine(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = view_.ten_through_twenty(); @@ -691,7 +695,7 @@ class GenericRequiresIntegersView final { return emboss_reserved_local_subexpr_5; } - [[nodiscard]] static constexpr bool ValueIsOk( + static constexpr bool ValueIsOk( ::std::int32_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::And(::emboss::support::LessThanOrEqual(::emboss::support::Maybe(static_cast(10LL)), ::emboss::support::Maybe(emboss_reserved_local_value)), ::emboss::support::LessThanOrEqual(::emboss::support::Maybe(emboss_reserved_local_value), ::emboss::support::Maybe(static_cast(19LL)))).ValueOr(false); @@ -699,8 +703,8 @@ class GenericRequiresIntegersView final { const GenericRequiresIntegersView view_; }; - [[nodiscard]] EmbossReservedVirtualZtnPlusTttView ztn_plus_ttt() const; - [[nodiscard]] ::emboss::support::Maybe has_ztn_plus_ttt() const; + EmbossReservedVirtualZtnPlusTttView ztn_plus_ttt() const; + ::emboss::support::Maybe has_ztn_plus_ttt() const; public: class EmbossReservedVirtualAliasOfZeroThroughNineView final { @@ -719,17 +723,17 @@ class GenericRequiresIntegersView final { default; ~EmbossReservedVirtualAliasOfZeroThroughNineView() = default; - [[nodiscard]] ::std::int32_t Read() const { + ::std::int32_t Read() const { EMBOSS_CHECK(view_.has_alias_of_zero_through_nine().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - [[nodiscard]] ::std::int32_t UncheckedRead() const { + ::std::int32_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - [[nodiscard]] bool Ok() const { + bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -742,9 +746,9 @@ class GenericRequiresIntegersView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } - [[nodiscard]] bool TryToWrite(::std::int32_t emboss_reserved_local_value) { + bool TryToWrite(::std::int32_t emboss_reserved_local_value) { const auto emboss_reserved_local_maybe_new_value = ::emboss::support::Maybe(emboss_reserved_local_value); if (!CouldWriteValue(emboss_reserved_local_value)) return false; return view_.zero_through_nine().TryToWrite( @@ -758,7 +762,7 @@ class GenericRequiresIntegersView final { void UncheckedWrite(::std::int32_t emboss_reserved_local_value) { view_.zero_through_nine().UncheckedWrite((::emboss::support::Maybe(emboss_reserved_local_value)).ValueOrDefault()); } - [[nodiscard]] bool CouldWriteValue(::std::int32_t emboss_reserved_local_value) { + bool CouldWriteValue(::std::int32_t emboss_reserved_local_value) { if (!ValueIsOk(emboss_reserved_local_value)) return false; const auto emboss_reserved_local_maybe_new_value = ::emboss::support::Maybe(emboss_reserved_local_value); if (!emboss_reserved_local_maybe_new_value.Known()) return false; @@ -774,14 +778,14 @@ class GenericRequiresIntegersView final { private: - [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { + ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.zero_through_nine(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); return emboss_reserved_local_subexpr_2; } - [[nodiscard]] static constexpr bool ValueIsOk( + static constexpr bool ValueIsOk( ::std::int32_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::And(::emboss::support::LessThanOrEqual(::emboss::support::Maybe(static_cast(2LL)), ::emboss::support::Maybe(emboss_reserved_local_value)), ::emboss::support::LessThanOrEqual(::emboss::support::Maybe(emboss_reserved_local_value), ::emboss::support::Maybe(static_cast(7LL)))).ValueOr(false); @@ -789,8 +793,8 @@ class GenericRequiresIntegersView final { const GenericRequiresIntegersView view_; }; - [[nodiscard]] EmbossReservedVirtualAliasOfZeroThroughNineView alias_of_zero_through_nine() const; - [[nodiscard]] ::emboss::support::Maybe has_alias_of_zero_through_nine() const; + EmbossReservedVirtualAliasOfZeroThroughNineView alias_of_zero_through_nine() const; + ::emboss::support::Maybe has_alias_of_zero_through_nine() const; public: class EmbossReservedVirtualZeroThroughNinePlusFiveView final { @@ -809,17 +813,17 @@ class GenericRequiresIntegersView final { default; ~EmbossReservedVirtualZeroThroughNinePlusFiveView() = default; - [[nodiscard]] ::std::int32_t Read() const { + ::std::int32_t Read() const { EMBOSS_CHECK(view_.has_zero_through_nine_plus_five().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - [[nodiscard]] ::std::int32_t UncheckedRead() const { + ::std::int32_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - [[nodiscard]] bool Ok() const { + bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -832,9 +836,9 @@ class GenericRequiresIntegersView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } - [[nodiscard]] bool TryToWrite(::std::int32_t emboss_reserved_local_value) { + bool TryToWrite(::std::int32_t emboss_reserved_local_value) { const auto emboss_reserved_local_maybe_new_value = ::emboss::support::Difference(::emboss::support::Maybe(emboss_reserved_local_value), ::emboss::support::Maybe(static_cast(5LL))); if (!CouldWriteValue(emboss_reserved_local_value)) return false; return view_.zero_through_nine().TryToWrite( @@ -848,7 +852,7 @@ class GenericRequiresIntegersView final { void UncheckedWrite(::std::int32_t emboss_reserved_local_value) { view_.zero_through_nine().UncheckedWrite((::emboss::support::Difference(::emboss::support::Maybe(emboss_reserved_local_value), ::emboss::support::Maybe(static_cast(5LL)))).ValueOrDefault()); } - [[nodiscard]] bool CouldWriteValue(::std::int32_t emboss_reserved_local_value) { + bool CouldWriteValue(::std::int32_t emboss_reserved_local_value) { if (!ValueIsOk(emboss_reserved_local_value)) return false; const auto emboss_reserved_local_maybe_new_value = ::emboss::support::Difference(::emboss::support::Maybe(emboss_reserved_local_value), ::emboss::support::Maybe(static_cast(5LL))); if (!emboss_reserved_local_maybe_new_value.Known()) return false; @@ -864,7 +868,7 @@ class GenericRequiresIntegersView final { private: - [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { + ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.zero_through_nine(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Sum(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(5LL))); @@ -872,7 +876,7 @@ class GenericRequiresIntegersView final { return emboss_reserved_local_subexpr_3; } - [[nodiscard]] static constexpr bool ValueIsOk( + static constexpr bool ValueIsOk( ::std::int32_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::And(::emboss::support::LessThanOrEqual(::emboss::support::Maybe(static_cast(5LL)), ::emboss::support::Maybe(emboss_reserved_local_value)), ::emboss::support::LessThanOrEqual(::emboss::support::Maybe(emboss_reserved_local_value), ::emboss::support::Maybe(static_cast(10LL)))).ValueOr(false); @@ -880,8 +884,8 @@ class GenericRequiresIntegersView final { const GenericRequiresIntegersView view_; }; - [[nodiscard]] EmbossReservedVirtualZeroThroughNinePlusFiveView zero_through_nine_plus_five() const; - [[nodiscard]] ::emboss::support::Maybe has_zero_through_nine_plus_five() const; + EmbossReservedVirtualZeroThroughNinePlusFiveView zero_through_nine_plus_five() const; + ::emboss::support::Maybe has_zero_through_nine_plus_five() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -897,9 +901,9 @@ class GenericRequiresIntegersView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -908,13 +912,13 @@ class GenericRequiresIntegersView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -932,9 +936,9 @@ class GenericRequiresIntegersView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -943,13 +947,13 @@ class GenericRequiresIntegersView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -967,9 +971,9 @@ class GenericRequiresIntegersView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -978,13 +982,13 @@ class GenericRequiresIntegersView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -1015,7 +1019,7 @@ struct EmbossReservedInternalIsGenericRequiresIntegersView< }; template -[[nodiscard]] inline GenericRequiresIntegersView< +inline GenericRequiresIntegersView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -1030,7 +1034,7 @@ MakeRequiresIntegersView( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericRequiresIntegersView> +inline GenericRequiresIntegersView> MakeRequiresIntegersView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericRequiresIntegersView>( @@ -1039,7 +1043,7 @@ MakeRequiresIntegersView( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericRequiresIntegersView< +inline GenericRequiresIntegersView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedRequiresIntegersView( T *emboss_reserved_local_data, @@ -1143,43 +1147,45 @@ class GenericEmbossReservedAnonymousField2View final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; - { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!a().Ok()) return false; - if (!b().Ok()) return false; - if (!must_be_true().Ok()) return false; - if (!must_be_false().Ok()) return false; - if (!IntrinsicSizeInBits().Ok()) return false; - if (!MaxSizeInBits().Ok()) return false; - if (!MinSizeInBits().Ok()) return false; - } - } + if (!a().Ok()) return false; + + if (!b().Ok()) return false; + + if (!must_be_true().Ok()) return false; + + if (!must_be_false().Ok()) return false; + + if (!IntrinsicSizeInBits().Ok()) return false; + + if (!MaxSizeInBits().Ok()) return false; + + if (!MinSizeInBits().Ok()) return false; + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBits().Ok() && backing_.SizeInBits() >= static_cast( IntrinsicSizeInBits().UncheckedRead()); } - [[nodiscard]] static constexpr ::std::size_t SizeInBits() { + static constexpr ::std::size_t SizeInBits() { return static_cast(IntrinsicSizeInBits().Read()); } - [[nodiscard]] static constexpr bool SizeIsKnown() { + static constexpr bool SizeIsKnown() { return IntrinsicSizeInBits().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericEmbossReservedAnonymousField2View emboss_reserved_local_other) const { if (!has_a().Known()) return false; @@ -1251,7 +1257,7 @@ class GenericEmbossReservedAnonymousField2View final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericEmbossReservedAnonymousField2View emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_a().ValueOr(false) && @@ -1326,7 +1332,7 @@ class GenericEmbossReservedAnonymousField2View final { emboss_reserved_local_other.IntrinsicSizeInBits().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericEmbossReservedAnonymousField2View emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -1535,39 +1541,39 @@ class GenericEmbossReservedAnonymousField2View final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: - [[nodiscard]] typename ::emboss::prelude::FlagView< + typename ::emboss::prelude::FlagView< /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, typename Storage::template OffsetStorageType> a() const; - [[nodiscard]] ::emboss::support::Maybe has_a() const; + ::emboss::support::Maybe has_a() const; public: - [[nodiscard]] typename ::emboss::prelude::FlagView< + typename ::emboss::prelude::FlagView< /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, typename Storage::template OffsetStorageType> b() const; - [[nodiscard]] ::emboss::support::Maybe has_b() const; + ::emboss::support::Maybe has_b() const; public: - [[nodiscard]] typename ::emboss::prelude::FlagView< + typename ::emboss::prelude::FlagView< /**/ ::emboss::support::FixedSizeViewParameters<1, EmbossReservedAnonymousField2::EmbossReservedValidatorForMustBeTrue>, typename Storage::template OffsetStorageType> must_be_true() const; - [[nodiscard]] ::emboss::support::Maybe has_must_be_true() const; + ::emboss::support::Maybe has_must_be_true() const; public: - [[nodiscard]] typename ::emboss::prelude::FlagView< + typename ::emboss::prelude::FlagView< /**/ ::emboss::support::FixedSizeViewParameters<1, EmbossReservedAnonymousField2::EmbossReservedValidatorForMustBeFalse>, typename Storage::template OffsetStorageType> must_be_false() const; - [[nodiscard]] ::emboss::support::Maybe has_must_be_false() const; + ::emboss::support::Maybe has_must_be_false() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBitsView final { @@ -1583,9 +1589,9 @@ class GenericEmbossReservedAnonymousField2View final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBitsView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -1594,13 +1600,13 @@ class GenericEmbossReservedAnonymousField2View final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBitsView IntrinsicSizeInBits() { + static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBitsView IntrinsicSizeInBits() { return EmbossReservedDollarVirtualIntrinsicSizeInBitsView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBits() { + static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBits() { return ::emboss::support::Maybe(true); } @@ -1618,9 +1624,9 @@ class GenericEmbossReservedAnonymousField2View final { default; ~EmbossReservedDollarVirtualMaxSizeInBitsView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -1629,13 +1635,13 @@ class GenericEmbossReservedAnonymousField2View final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBitsView MaxSizeInBits() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBitsView MaxSizeInBits() { return EmbossReservedDollarVirtualMaxSizeInBitsView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBits() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBits() { return ::emboss::support::Maybe(true); } @@ -1653,9 +1659,9 @@ class GenericEmbossReservedAnonymousField2View final { default; ~EmbossReservedDollarVirtualMinSizeInBitsView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -1664,13 +1670,13 @@ class GenericEmbossReservedAnonymousField2View final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBitsView MinSizeInBits() { + static constexpr EmbossReservedDollarVirtualMinSizeInBitsView MinSizeInBits() { return EmbossReservedDollarVirtualMinSizeInBitsView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBits() { + static constexpr ::emboss::support::Maybe has_MinSizeInBits() { return ::emboss::support::Maybe(true); } @@ -1701,7 +1707,7 @@ struct EmbossReservedInternalIsGenericEmbossReservedAnonymousField2View< }; template -[[nodiscard]] inline GenericEmbossReservedAnonymousField2View< +inline GenericEmbossReservedAnonymousField2View< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -1716,7 +1722,7 @@ MakeEmbossReservedAnonymousField2View( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericEmbossReservedAnonymousField2View> +inline GenericEmbossReservedAnonymousField2View> MakeEmbossReservedAnonymousField2View( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericEmbossReservedAnonymousField2View>( @@ -1725,7 +1731,7 @@ MakeEmbossReservedAnonymousField2View( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericEmbossReservedAnonymousField2View< +inline GenericEmbossReservedAnonymousField2View< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedEmbossReservedAnonymousField2View( T *emboss_reserved_local_data, @@ -1786,54 +1792,62 @@ class GenericRequiresBoolsView final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; const auto emboss_reserved_local_ok_subexpr_1 = ::emboss::support::And(::emboss::support::Maybe(true), ::emboss::support::Maybe(true)); + if (!emboss_reserved_anonymous_field_2().Ok()) return false; + + if (!b_must_be_false().Ok()) return false; + + if (!alias_of_a_must_be_true().Ok()) return false; + + if (!IntrinsicSizeInBytes().Ok()) return false; + + if (!MaxSizeInBytes().Ok()) return false; + + if (!MinSizeInBytes().Ok()) return false; + { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!emboss_reserved_anonymous_field_2().Ok()) return false; - if (!b_must_be_false().Ok()) return false; - if (!alias_of_a_must_be_true().Ok()) return false; - if (!IntrinsicSizeInBytes().Ok()) return false; - if (!MaxSizeInBytes().Ok()) return false; - if (!MinSizeInBytes().Ok()) return false; - } - } - { + const auto emboss_reserved_cond = emboss_reserved_local_ok_subexpr_1; if (!emboss_reserved_cond.Known()) return false; if (emboss_reserved_cond.ValueOrDefault()) { if (!a().Ok()) return false; + if (!b().Ok()) return false; + if (!must_be_true().Ok()) return false; + if (!must_be_false().Ok()) return false; + + } } + + if (!(::emboss::support::Or((a().Ok() ? ::emboss::support::Maybe(static_cast(a().UncheckedRead())) : ::emboss::support::Maybe()), (b().Ok() ? ::emboss::support::Maybe(static_cast(b().UncheckedRead())) : ::emboss::support::Maybe()))).ValueOr(false)) return false; return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { + static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - [[nodiscard]] static constexpr bool SizeIsKnown() { + static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericRequiresBoolsView emboss_reserved_local_other) const { if (!has_emboss_reserved_anonymous_field_2().Known()) return false; @@ -1854,7 +1868,7 @@ class GenericRequiresBoolsView final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericRequiresBoolsView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_emboss_reserved_anonymous_field_2().ValueOr(false) && @@ -1887,7 +1901,7 @@ class GenericRequiresBoolsView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericRequiresBoolsView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -2153,41 +2167,41 @@ class GenericRequiresBoolsView final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } private: - [[nodiscard]] typename ::emboss::test::RequiresBools::GenericEmbossReservedAnonymousField2View>, 8>> + typename ::emboss::test::RequiresBools::GenericEmbossReservedAnonymousField2View>, 8>> emboss_reserved_anonymous_field_2() const; - [[nodiscard]] ::emboss::support::Maybe has_emboss_reserved_anonymous_field_2() const; + ::emboss::support::Maybe has_emboss_reserved_anonymous_field_2() const; public: - [[nodiscard]] auto a() const -> decltype(this->emboss_reserved_anonymous_field_2().a()) { + auto a() const -> decltype(this->emboss_reserved_anonymous_field_2().a()) { return has_a().ValueOrDefault() ? emboss_reserved_anonymous_field_2().a() : decltype(this->emboss_reserved_anonymous_field_2().a())(); } - [[nodiscard]] ::emboss::support::Maybe has_a() const; + ::emboss::support::Maybe has_a() const; public: - [[nodiscard]] auto b() const -> decltype(this->emboss_reserved_anonymous_field_2().b()) { + auto b() const -> decltype(this->emboss_reserved_anonymous_field_2().b()) { return has_b().ValueOrDefault() ? emboss_reserved_anonymous_field_2().b() : decltype(this->emboss_reserved_anonymous_field_2().b())(); } - [[nodiscard]] ::emboss::support::Maybe has_b() const; + ::emboss::support::Maybe has_b() const; public: - [[nodiscard]] auto must_be_true() const -> decltype(this->emboss_reserved_anonymous_field_2().must_be_true()) { + auto must_be_true() const -> decltype(this->emboss_reserved_anonymous_field_2().must_be_true()) { return has_must_be_true().ValueOrDefault() ? emboss_reserved_anonymous_field_2().must_be_true() : decltype(this->emboss_reserved_anonymous_field_2().must_be_true())(); } - [[nodiscard]] ::emboss::support::Maybe has_must_be_true() const; + ::emboss::support::Maybe has_must_be_true() const; public: - [[nodiscard]] auto must_be_false() const -> decltype(this->emboss_reserved_anonymous_field_2().must_be_false()) { + auto must_be_false() const -> decltype(this->emboss_reserved_anonymous_field_2().must_be_false()) { return has_must_be_false().ValueOrDefault() ? emboss_reserved_anonymous_field_2().must_be_false() : decltype(this->emboss_reserved_anonymous_field_2().must_be_false())(); } - [[nodiscard]] ::emboss::support::Maybe has_must_be_false() const; + ::emboss::support::Maybe has_must_be_false() const; public: class EmbossReservedVirtualBMustBeFalseView final { @@ -2206,17 +2220,17 @@ class GenericRequiresBoolsView final { default; ~EmbossReservedVirtualBMustBeFalseView() = default; - [[nodiscard]] bool Read() const { + bool Read() const { EMBOSS_CHECK(view_.has_b_must_be_false().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - [[nodiscard]] bool UncheckedRead() const { + bool UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - [[nodiscard]] bool Ok() const { + bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -2229,12 +2243,12 @@ class GenericRequiresBoolsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } private: - [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { + ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.b(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(false)); @@ -2242,7 +2256,7 @@ class GenericRequiresBoolsView final { return emboss_reserved_local_subexpr_3; } - [[nodiscard]] static constexpr bool ValueIsOk( + static constexpr bool ValueIsOk( bool emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(emboss_reserved_local_value).ValueOr(false); @@ -2250,8 +2264,8 @@ class GenericRequiresBoolsView final { const GenericRequiresBoolsView view_; }; - [[nodiscard]] EmbossReservedVirtualBMustBeFalseView b_must_be_false() const; - [[nodiscard]] ::emboss::support::Maybe has_b_must_be_false() const; + EmbossReservedVirtualBMustBeFalseView b_must_be_false() const; + ::emboss::support::Maybe has_b_must_be_false() const; public: class EmbossReservedVirtualAliasOfAMustBeTrueView final { @@ -2270,17 +2284,17 @@ class GenericRequiresBoolsView final { default; ~EmbossReservedVirtualAliasOfAMustBeTrueView() = default; - [[nodiscard]] bool Read() const { + bool Read() const { EMBOSS_CHECK(view_.has_alias_of_a_must_be_true().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - [[nodiscard]] bool UncheckedRead() const { + bool UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - [[nodiscard]] bool Ok() const { + bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -2293,9 +2307,9 @@ class GenericRequiresBoolsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } - [[nodiscard]] bool TryToWrite(bool emboss_reserved_local_value) { + bool TryToWrite(bool emboss_reserved_local_value) { const auto emboss_reserved_local_maybe_new_value = ::emboss::support::Maybe(emboss_reserved_local_value); if (!CouldWriteValue(emboss_reserved_local_value)) return false; return view_.a().TryToWrite( @@ -2309,7 +2323,7 @@ class GenericRequiresBoolsView final { void UncheckedWrite(bool emboss_reserved_local_value) { view_.a().UncheckedWrite((::emboss::support::Maybe(emboss_reserved_local_value)).ValueOrDefault()); } - [[nodiscard]] bool CouldWriteValue(bool emboss_reserved_local_value) { + bool CouldWriteValue(bool emboss_reserved_local_value) { if (!ValueIsOk(emboss_reserved_local_value)) return false; const auto emboss_reserved_local_maybe_new_value = ::emboss::support::Maybe(emboss_reserved_local_value); if (!emboss_reserved_local_maybe_new_value.Known()) return false; @@ -2325,14 +2339,14 @@ class GenericRequiresBoolsView final { private: - [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { + ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.a(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); return emboss_reserved_local_subexpr_2; } - [[nodiscard]] static constexpr bool ValueIsOk( + static constexpr bool ValueIsOk( bool emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(emboss_reserved_local_value).ValueOr(false); @@ -2340,8 +2354,8 @@ class GenericRequiresBoolsView final { const GenericRequiresBoolsView view_; }; - [[nodiscard]] EmbossReservedVirtualAliasOfAMustBeTrueView alias_of_a_must_be_true() const; - [[nodiscard]] ::emboss::support::Maybe has_alias_of_a_must_be_true() const; + EmbossReservedVirtualAliasOfAMustBeTrueView alias_of_a_must_be_true() const; + ::emboss::support::Maybe has_alias_of_a_must_be_true() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -2357,9 +2371,9 @@ class GenericRequiresBoolsView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -2368,13 +2382,13 @@ class GenericRequiresBoolsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -2392,9 +2406,9 @@ class GenericRequiresBoolsView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -2403,13 +2417,13 @@ class GenericRequiresBoolsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -2427,9 +2441,9 @@ class GenericRequiresBoolsView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -2438,13 +2452,13 @@ class GenericRequiresBoolsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -2475,7 +2489,7 @@ struct EmbossReservedInternalIsGenericRequiresBoolsView< }; template -[[nodiscard]] inline GenericRequiresBoolsView< +inline GenericRequiresBoolsView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -2490,7 +2504,7 @@ MakeRequiresBoolsView( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericRequiresBoolsView> +inline GenericRequiresBoolsView> MakeRequiresBoolsView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericRequiresBoolsView>( @@ -2499,7 +2513,7 @@ MakeRequiresBoolsView( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericRequiresBoolsView< +inline GenericRequiresBoolsView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedRequiresBoolsView( T *emboss_reserved_local_data, @@ -2688,45 +2702,48 @@ class GenericRequiresEnumsView final { using Enum = ::emboss::test::RequiresEnums::Enum; - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; - { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!a().Ok()) return false; - if (!b().Ok()) return false; - if (!c().Ok()) return false; - if (!filtered_a().Ok()) return false; - if (!alias_of_a().Ok()) return false; - if (!IntrinsicSizeInBytes().Ok()) return false; - if (!MaxSizeInBytes().Ok()) return false; - if (!MinSizeInBytes().Ok()) return false; - } - } + if (!a().Ok()) return false; + + if (!b().Ok()) return false; + + if (!c().Ok()) return false; + + if (!filtered_a().Ok()) return false; + + if (!alias_of_a().Ok()) return false; + + if (!IntrinsicSizeInBytes().Ok()) return false; + + if (!MaxSizeInBytes().Ok()) return false; + + if (!MinSizeInBytes().Ok()) return false; + + if (!(::emboss::support::Or(::emboss::support::Equal((a().Ok() ? ::emboss::support::Maybe(static_cast(a().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(0))), ::emboss::support::Equal((b().Ok() ? ::emboss::support::Maybe(static_cast(b().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(0))))).ValueOr(false)) return false; return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { + static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - [[nodiscard]] static constexpr bool SizeIsKnown() { + static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericRequiresEnumsView emboss_reserved_local_other) const { if (!has_a().Known()) return false; @@ -2781,7 +2798,7 @@ class GenericRequiresEnumsView final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericRequiresEnumsView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_a().ValueOr(false) && @@ -2842,7 +2859,7 @@ class GenericRequiresEnumsView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericRequiresEnumsView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -3070,34 +3087,34 @@ class GenericRequiresEnumsView final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: - [[nodiscard]] typename ::emboss::support::EnumView< + typename ::emboss::support::EnumView< /**/ ::emboss::test::RequiresEnums::Enum, ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> a() const; - [[nodiscard]] ::emboss::support::Maybe has_a() const; + ::emboss::support::Maybe has_a() const; public: - [[nodiscard]] typename ::emboss::support::EnumView< + typename ::emboss::support::EnumView< /**/ ::emboss::test::RequiresEnums::Enum, ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> b() const; - [[nodiscard]] ::emboss::support::Maybe has_b() const; + ::emboss::support::Maybe has_b() const; public: - [[nodiscard]] typename ::emboss::support::EnumView< + typename ::emboss::support::EnumView< /**/ ::emboss::test::RequiresEnums::Enum, ::emboss::support::FixedSizeViewParameters<8, RequiresEnums::EmbossReservedValidatorForC>, typename ::emboss::support::BitBlock>, 8>> c() const; - [[nodiscard]] ::emboss::support::Maybe has_c() const; + ::emboss::support::Maybe has_c() const; public: class EmbossReservedVirtualFilteredAView final { @@ -3116,17 +3133,17 @@ class GenericRequiresEnumsView final { default; ~EmbossReservedVirtualFilteredAView() = default; - [[nodiscard]] ::emboss::test::RequiresEnums::Enum Read() const { + ::emboss::test::RequiresEnums::Enum Read() const { EMBOSS_CHECK(view_.has_filtered_a().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - [[nodiscard]] ::emboss::test::RequiresEnums::Enum UncheckedRead() const { + ::emboss::test::RequiresEnums::Enum UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - [[nodiscard]] bool Ok() const { + bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -3139,12 +3156,12 @@ class GenericRequiresEnumsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } private: - [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { + ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.a(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(0))); @@ -3153,7 +3170,7 @@ class GenericRequiresEnumsView final { return emboss_reserved_local_subexpr_4; } - [[nodiscard]] static constexpr bool ValueIsOk( + static constexpr bool ValueIsOk( ::emboss::test::RequiresEnums::Enum emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Equal(::emboss::support::Maybe(emboss_reserved_local_value), ::emboss::support::Maybe(static_cast(1))).ValueOr(false); @@ -3161,8 +3178,8 @@ class GenericRequiresEnumsView final { const GenericRequiresEnumsView view_; }; - [[nodiscard]] EmbossReservedVirtualFilteredAView filtered_a() const; - [[nodiscard]] ::emboss::support::Maybe has_filtered_a() const; + EmbossReservedVirtualFilteredAView filtered_a() const; + ::emboss::support::Maybe has_filtered_a() const; public: class EmbossReservedVirtualAliasOfAView final { @@ -3181,17 +3198,17 @@ class GenericRequiresEnumsView final { default; ~EmbossReservedVirtualAliasOfAView() = default; - [[nodiscard]] ::emboss::test::RequiresEnums::Enum Read() const { + ::emboss::test::RequiresEnums::Enum Read() const { EMBOSS_CHECK(view_.has_alias_of_a().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - [[nodiscard]] ::emboss::test::RequiresEnums::Enum UncheckedRead() const { + ::emboss::test::RequiresEnums::Enum UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - [[nodiscard]] bool Ok() const { + bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -3204,9 +3221,9 @@ class GenericRequiresEnumsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } - [[nodiscard]] bool TryToWrite(::emboss::test::RequiresEnums::Enum emboss_reserved_local_value) { + bool TryToWrite(::emboss::test::RequiresEnums::Enum emboss_reserved_local_value) { const auto emboss_reserved_local_maybe_new_value = ::emboss::support::Maybe(emboss_reserved_local_value); if (!CouldWriteValue(emboss_reserved_local_value)) return false; return view_.a().TryToWrite( @@ -3220,7 +3237,7 @@ class GenericRequiresEnumsView final { void UncheckedWrite(::emboss::test::RequiresEnums::Enum emboss_reserved_local_value) { view_.a().UncheckedWrite((::emboss::support::Maybe(emboss_reserved_local_value)).ValueOrDefault()); } - [[nodiscard]] bool CouldWriteValue(::emboss::test::RequiresEnums::Enum emboss_reserved_local_value) { + bool CouldWriteValue(::emboss::test::RequiresEnums::Enum emboss_reserved_local_value) { if (!ValueIsOk(emboss_reserved_local_value)) return false; const auto emboss_reserved_local_maybe_new_value = ::emboss::support::Maybe(emboss_reserved_local_value); if (!emboss_reserved_local_maybe_new_value.Known()) return false; @@ -3236,14 +3253,14 @@ class GenericRequiresEnumsView final { private: - [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { + ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.a(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); return emboss_reserved_local_subexpr_2; } - [[nodiscard]] static constexpr bool ValueIsOk( + static constexpr bool ValueIsOk( ::emboss::test::RequiresEnums::Enum emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Equal(::emboss::support::Maybe(emboss_reserved_local_value), ::emboss::support::Maybe(static_cast(1))).ValueOr(false); @@ -3251,8 +3268,8 @@ class GenericRequiresEnumsView final { const GenericRequiresEnumsView view_; }; - [[nodiscard]] EmbossReservedVirtualAliasOfAView alias_of_a() const; - [[nodiscard]] ::emboss::support::Maybe has_alias_of_a() const; + EmbossReservedVirtualAliasOfAView alias_of_a() const; + ::emboss::support::Maybe has_alias_of_a() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -3268,9 +3285,9 @@ class GenericRequiresEnumsView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -3279,13 +3296,13 @@ class GenericRequiresEnumsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -3303,9 +3320,9 @@ class GenericRequiresEnumsView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -3314,13 +3331,13 @@ class GenericRequiresEnumsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -3338,9 +3355,9 @@ class GenericRequiresEnumsView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -3349,13 +3366,13 @@ class GenericRequiresEnumsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -3386,7 +3403,7 @@ struct EmbossReservedInternalIsGenericRequiresEnumsView< }; template -[[nodiscard]] inline GenericRequiresEnumsView< +inline GenericRequiresEnumsView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -3401,7 +3418,7 @@ MakeRequiresEnumsView( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericRequiresEnumsView> +inline GenericRequiresEnumsView> MakeRequiresEnumsView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericRequiresEnumsView>( @@ -3410,7 +3427,7 @@ MakeRequiresEnumsView( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericRequiresEnumsView< +inline GenericRequiresEnumsView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedRequiresEnumsView( T *emboss_reserved_local_data, @@ -3499,50 +3516,55 @@ class GenericEmbossReservedAnonymousField1View final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; const auto emboss_reserved_local_ok_subexpr_1 = b_exists(); const auto emboss_reserved_local_ok_subexpr_2 = (emboss_reserved_local_ok_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + if (!a().Ok()) return false; + + if (!b_exists().Ok()) return false; + + if (!IntrinsicSizeInBits().Ok()) return false; + + if (!MaxSizeInBits().Ok()) return false; + + if (!MinSizeInBits().Ok()) return false; + { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!a().Ok()) return false; - if (!b_exists().Ok()) return false; - if (!IntrinsicSizeInBits().Ok()) return false; - if (!MaxSizeInBits().Ok()) return false; - if (!MinSizeInBits().Ok()) return false; - } - } - { + const auto emboss_reserved_cond = emboss_reserved_local_ok_subexpr_2; if (!emboss_reserved_cond.Known()) return false; if (emboss_reserved_cond.ValueOrDefault()) { if (!b().Ok()) return false; + if (!b_true().Ok()) return false; + + } } + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBits().Ok() && backing_.SizeInBits() >= static_cast( IntrinsicSizeInBits().UncheckedRead()); } - [[nodiscard]] ::std::size_t SizeInBits() const { + ::std::size_t SizeInBits() const { return static_cast(IntrinsicSizeInBits().Read()); } - [[nodiscard]] bool SizeIsKnown() const { return IntrinsicSizeInBits().Ok(); } + bool SizeIsKnown() const { return IntrinsicSizeInBits().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericEmbossReservedAnonymousField1View emboss_reserved_local_other) const { if (!has_a().Known()) return false; @@ -3614,7 +3636,7 @@ class GenericEmbossReservedAnonymousField1View final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericEmbossReservedAnonymousField1View emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_a().ValueOr(false) && @@ -3689,7 +3711,7 @@ class GenericEmbossReservedAnonymousField1View final { emboss_reserved_local_other.IntrinsicSizeInBits().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericEmbossReservedAnonymousField1View emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -3898,39 +3920,39 @@ class GenericEmbossReservedAnonymousField1View final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: - [[nodiscard]] typename ::emboss::prelude::FlagView< + typename ::emboss::prelude::FlagView< /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, typename Storage::template OffsetStorageType> a() const; - [[nodiscard]] ::emboss::support::Maybe has_a() const; + ::emboss::support::Maybe has_a() const; public: - [[nodiscard]] typename ::emboss::prelude::FlagView< + typename ::emboss::prelude::FlagView< /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, typename Storage::template OffsetStorageType> b_exists() const; - [[nodiscard]] ::emboss::support::Maybe has_b_exists() const; + ::emboss::support::Maybe has_b_exists() const; public: - [[nodiscard]] typename ::emboss::prelude::FlagView< + typename ::emboss::prelude::FlagView< /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, typename Storage::template OffsetStorageType> b() const; - [[nodiscard]] ::emboss::support::Maybe has_b() const; + ::emboss::support::Maybe has_b() const; public: - [[nodiscard]] typename ::emboss::prelude::FlagView< + typename ::emboss::prelude::FlagView< /**/ ::emboss::support::FixedSizeViewParameters<1, EmbossReservedAnonymousField1::EmbossReservedValidatorForBTrue>, typename Storage::template OffsetStorageType> b_true() const; - [[nodiscard]] ::emboss::support::Maybe has_b_true() const; + ::emboss::support::Maybe has_b_true() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBitsView final { @@ -3949,17 +3971,17 @@ class GenericEmbossReservedAnonymousField1View final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBitsView() = default; - [[nodiscard]] ::std::int32_t Read() const { + ::std::int32_t Read() const { EMBOSS_CHECK(view_.has_IntrinsicSizeInBits().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - [[nodiscard]] ::std::int32_t UncheckedRead() const { + ::std::int32_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - [[nodiscard]] bool Ok() const { + bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -3972,12 +3994,12 @@ class GenericEmbossReservedAnonymousField1View final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } private: - [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { + ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.b_exists(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Choice(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(3LL)), ::emboss::support::Maybe(static_cast(0LL))); @@ -3986,7 +4008,7 @@ class GenericEmbossReservedAnonymousField1View final { return emboss_reserved_local_subexpr_4; } - [[nodiscard]] static constexpr bool ValueIsOk( + static constexpr bool ValueIsOk( ::std::int32_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -3994,8 +4016,8 @@ class GenericEmbossReservedAnonymousField1View final { const GenericEmbossReservedAnonymousField1View view_; }; - [[nodiscard]] EmbossReservedDollarVirtualIntrinsicSizeInBitsView IntrinsicSizeInBits() const; - [[nodiscard]] ::emboss::support::Maybe has_IntrinsicSizeInBits() const; + EmbossReservedDollarVirtualIntrinsicSizeInBitsView IntrinsicSizeInBits() const; + ::emboss::support::Maybe has_IntrinsicSizeInBits() const; public: class EmbossReservedDollarVirtualMaxSizeInBitsView final { @@ -4011,9 +4033,9 @@ class GenericEmbossReservedAnonymousField1View final { default; ~EmbossReservedDollarVirtualMaxSizeInBitsView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -4022,13 +4044,13 @@ class GenericEmbossReservedAnonymousField1View final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBitsView MaxSizeInBits() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBitsView MaxSizeInBits() { return EmbossReservedDollarVirtualMaxSizeInBitsView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBits() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBits() { return ::emboss::support::Maybe(true); } @@ -4046,9 +4068,9 @@ class GenericEmbossReservedAnonymousField1View final { default; ~EmbossReservedDollarVirtualMinSizeInBitsView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -4057,13 +4079,13 @@ class GenericEmbossReservedAnonymousField1View final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBitsView MinSizeInBits() { + static constexpr EmbossReservedDollarVirtualMinSizeInBitsView MinSizeInBits() { return EmbossReservedDollarVirtualMinSizeInBitsView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBits() { + static constexpr ::emboss::support::Maybe has_MinSizeInBits() { return ::emboss::support::Maybe(true); } @@ -4094,7 +4116,7 @@ struct EmbossReservedInternalIsGenericEmbossReservedAnonymousField1View< }; template -[[nodiscard]] inline GenericEmbossReservedAnonymousField1View< +inline GenericEmbossReservedAnonymousField1View< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -4109,7 +4131,7 @@ MakeEmbossReservedAnonymousField1View( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericEmbossReservedAnonymousField1View> +inline GenericEmbossReservedAnonymousField1View> MakeEmbossReservedAnonymousField1View( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericEmbossReservedAnonymousField1View>( @@ -4118,7 +4140,7 @@ MakeEmbossReservedAnonymousField1View( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericEmbossReservedAnonymousField1View< +inline GenericEmbossReservedAnonymousField1View< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedEmbossReservedAnonymousField1View( T *emboss_reserved_local_data, @@ -4179,7 +4201,7 @@ class GenericRequiresWithOptionalFieldsView final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; const auto emboss_reserved_local_ok_subexpr_1 = ::emboss::support::And(::emboss::support::Maybe(true), ::emboss::support::Maybe(true)); @@ -4188,59 +4210,71 @@ class GenericRequiresWithOptionalFieldsView final { const auto emboss_reserved_local_ok_subexpr_4 = emboss_reserved_anonymous_field_1().has_b_true(); const auto emboss_reserved_local_ok_subexpr_5 = ::emboss::support::And(::emboss::support::Maybe(true), emboss_reserved_local_ok_subexpr_4); + if (!emboss_reserved_anonymous_field_1().Ok()) return false; + + if (!IntrinsicSizeInBytes().Ok()) return false; + + if (!MaxSizeInBytes().Ok()) return false; + + if (!MinSizeInBytes().Ok()) return false; + { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!emboss_reserved_anonymous_field_1().Ok()) return false; - if (!IntrinsicSizeInBytes().Ok()) return false; - if (!MaxSizeInBytes().Ok()) return false; - if (!MinSizeInBytes().Ok()) return false; - } - } - { + const auto emboss_reserved_cond = emboss_reserved_local_ok_subexpr_1; if (!emboss_reserved_cond.Known()) return false; if (emboss_reserved_cond.ValueOrDefault()) { if (!a().Ok()) return false; + if (!b_exists().Ok()) return false; + + } } + { + const auto emboss_reserved_cond = emboss_reserved_local_ok_subexpr_3; if (!emboss_reserved_cond.Known()) return false; if (emboss_reserved_cond.ValueOrDefault()) { if (!b().Ok()) return false; + + } } + { + const auto emboss_reserved_cond = emboss_reserved_local_ok_subexpr_5; if (!emboss_reserved_cond.Known()) return false; if (emboss_reserved_cond.ValueOrDefault()) { if (!b_true().Ok()) return false; + + } } + + if (!(::emboss::support::Or((a().Ok() ? ::emboss::support::Maybe(static_cast(a().UncheckedRead())) : ::emboss::support::Maybe()), (b().Ok() ? ::emboss::support::Maybe(static_cast(b().UncheckedRead())) : ::emboss::support::Maybe()))).ValueOr(false)) return false; return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { + static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - [[nodiscard]] static constexpr bool SizeIsKnown() { + static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericRequiresWithOptionalFieldsView emboss_reserved_local_other) const { if (!has_emboss_reserved_anonymous_field_1().Known()) return false; @@ -4261,7 +4295,7 @@ class GenericRequiresWithOptionalFieldsView final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericRequiresWithOptionalFieldsView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_emboss_reserved_anonymous_field_1().ValueOr(false) && @@ -4294,7 +4328,7 @@ class GenericRequiresWithOptionalFieldsView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericRequiresWithOptionalFieldsView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -4503,41 +4537,41 @@ class GenericRequiresWithOptionalFieldsView final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } private: - [[nodiscard]] typename ::emboss::test::RequiresWithOptionalFields::GenericEmbossReservedAnonymousField1View>, 8>> + typename ::emboss::test::RequiresWithOptionalFields::GenericEmbossReservedAnonymousField1View>, 8>> emboss_reserved_anonymous_field_1() const; - [[nodiscard]] ::emboss::support::Maybe has_emboss_reserved_anonymous_field_1() const; + ::emboss::support::Maybe has_emboss_reserved_anonymous_field_1() const; public: - [[nodiscard]] auto a() const -> decltype(this->emboss_reserved_anonymous_field_1().a()) { + auto a() const -> decltype(this->emboss_reserved_anonymous_field_1().a()) { return has_a().ValueOrDefault() ? emboss_reserved_anonymous_field_1().a() : decltype(this->emboss_reserved_anonymous_field_1().a())(); } - [[nodiscard]] ::emboss::support::Maybe has_a() const; + ::emboss::support::Maybe has_a() const; public: - [[nodiscard]] auto b_exists() const -> decltype(this->emboss_reserved_anonymous_field_1().b_exists()) { + auto b_exists() const -> decltype(this->emboss_reserved_anonymous_field_1().b_exists()) { return has_b_exists().ValueOrDefault() ? emboss_reserved_anonymous_field_1().b_exists() : decltype(this->emboss_reserved_anonymous_field_1().b_exists())(); } - [[nodiscard]] ::emboss::support::Maybe has_b_exists() const; + ::emboss::support::Maybe has_b_exists() const; public: - [[nodiscard]] auto b() const -> decltype(this->emboss_reserved_anonymous_field_1().b()) { + auto b() const -> decltype(this->emboss_reserved_anonymous_field_1().b()) { return has_b().ValueOrDefault() ? emboss_reserved_anonymous_field_1().b() : decltype(this->emboss_reserved_anonymous_field_1().b())(); } - [[nodiscard]] ::emboss::support::Maybe has_b() const; + ::emboss::support::Maybe has_b() const; public: - [[nodiscard]] auto b_true() const -> decltype(this->emboss_reserved_anonymous_field_1().b_true()) { + auto b_true() const -> decltype(this->emboss_reserved_anonymous_field_1().b_true()) { return has_b_true().ValueOrDefault() ? emboss_reserved_anonymous_field_1().b_true() : decltype(this->emboss_reserved_anonymous_field_1().b_true())(); } - [[nodiscard]] ::emboss::support::Maybe has_b_true() const; + ::emboss::support::Maybe has_b_true() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -4553,9 +4587,9 @@ class GenericRequiresWithOptionalFieldsView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -4564,13 +4598,13 @@ class GenericRequiresWithOptionalFieldsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -4588,9 +4622,9 @@ class GenericRequiresWithOptionalFieldsView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -4599,13 +4633,13 @@ class GenericRequiresWithOptionalFieldsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -4623,9 +4657,9 @@ class GenericRequiresWithOptionalFieldsView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -4634,13 +4668,13 @@ class GenericRequiresWithOptionalFieldsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -4671,7 +4705,7 @@ struct EmbossReservedInternalIsGenericRequiresWithOptionalFieldsView< }; template -[[nodiscard]] inline GenericRequiresWithOptionalFieldsView< +inline GenericRequiresWithOptionalFieldsView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -4686,7 +4720,7 @@ MakeRequiresWithOptionalFieldsView( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericRequiresWithOptionalFieldsView> +inline GenericRequiresWithOptionalFieldsView> MakeRequiresWithOptionalFieldsView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericRequiresWithOptionalFieldsView>( @@ -4695,7 +4729,7 @@ MakeRequiresWithOptionalFieldsView( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericRequiresWithOptionalFieldsView< +inline GenericRequiresWithOptionalFieldsView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedRequiresWithOptionalFieldsView( T *emboss_reserved_local_data, @@ -4777,40 +4811,39 @@ class GenericElementView final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; - { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!x().Ok()) return false; - if (!IntrinsicSizeInBytes().Ok()) return false; - if (!MaxSizeInBytes().Ok()) return false; - if (!MinSizeInBytes().Ok()) return false; - } - } + if (!x().Ok()) return false; + + if (!IntrinsicSizeInBytes().Ok()) return false; + + if (!MaxSizeInBytes().Ok()) return false; + + if (!MinSizeInBytes().Ok()) return false; + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { + static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - [[nodiscard]] static constexpr bool SizeIsKnown() { + static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericElementView emboss_reserved_local_other) const { if (!has_x().Known()) return false; @@ -4831,7 +4864,7 @@ class GenericElementView final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericElementView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_x().ValueOr(false) && @@ -4864,7 +4897,7 @@ class GenericElementView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericElementView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -4959,15 +4992,15 @@ class GenericElementView final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, Element::EmbossReservedValidatorForX>, typename ::emboss::support::BitBlock>, 8>> x() const; - [[nodiscard]] ::emboss::support::Maybe has_x() const; + ::emboss::support::Maybe has_x() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -4983,9 +5016,9 @@ class GenericElementView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -4994,13 +5027,13 @@ class GenericElementView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -5018,9 +5051,9 @@ class GenericElementView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -5029,13 +5062,13 @@ class GenericElementView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -5053,9 +5086,9 @@ class GenericElementView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -5064,13 +5097,13 @@ class GenericElementView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -5101,7 +5134,7 @@ struct EmbossReservedInternalIsGenericElementView< }; template -[[nodiscard]] inline GenericElementView< +inline GenericElementView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -5116,7 +5149,7 @@ MakeElementView( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericElementView> +inline GenericElementView> MakeElementView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericElementView>( @@ -5125,7 +5158,7 @@ MakeElementView( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericElementView< +inline GenericElementView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedElementView( T *emboss_reserved_local_data, @@ -5186,40 +5219,39 @@ class GenericRequiresInArrayElementsView final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; - { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!xs().Ok()) return false; - if (!IntrinsicSizeInBytes().Ok()) return false; - if (!MaxSizeInBytes().Ok()) return false; - if (!MinSizeInBytes().Ok()) return false; - } - } + if (!xs().Ok()) return false; + + if (!IntrinsicSizeInBytes().Ok()) return false; + + if (!MaxSizeInBytes().Ok()) return false; + + if (!MinSizeInBytes().Ok()) return false; + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { + static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - [[nodiscard]] static constexpr bool SizeIsKnown() { + static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericRequiresInArrayElementsView emboss_reserved_local_other) const { if (!has_xs().Known()) return false; @@ -5240,7 +5272,7 @@ class GenericRequiresInArrayElementsView final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericRequiresInArrayElementsView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_xs().ValueOr(false) && @@ -5273,7 +5305,7 @@ class GenericRequiresInArrayElementsView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericRequiresInArrayElementsView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -5368,17 +5400,17 @@ class GenericRequiresInArrayElementsView final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: - [[nodiscard]] typename ::emboss::support::GenericArrayView< + typename ::emboss::support::GenericArrayView< typename ::emboss::test::RequiresInArrayElements::GenericElementView::template OffsetStorageType> , typename Storage::template OffsetStorageType, 1, 8 > xs() const; - [[nodiscard]] ::emboss::support::Maybe has_xs() const; + ::emboss::support::Maybe has_xs() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -5394,9 +5426,9 @@ class GenericRequiresInArrayElementsView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -5405,13 +5437,13 @@ class GenericRequiresInArrayElementsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -5429,9 +5461,9 @@ class GenericRequiresInArrayElementsView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -5440,13 +5472,13 @@ class GenericRequiresInArrayElementsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -5464,9 +5496,9 @@ class GenericRequiresInArrayElementsView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -5475,13 +5507,13 @@ class GenericRequiresInArrayElementsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -5512,7 +5544,7 @@ struct EmbossReservedInternalIsGenericRequiresInArrayElementsView< }; template -[[nodiscard]] inline GenericRequiresInArrayElementsView< +inline GenericRequiresInArrayElementsView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -5527,7 +5559,7 @@ MakeRequiresInArrayElementsView( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericRequiresInArrayElementsView> +inline GenericRequiresInArrayElementsView> MakeRequiresInArrayElementsView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericRequiresInArrayElementsView>( @@ -5536,7 +5568,7 @@ MakeRequiresInArrayElementsView( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericRequiresInArrayElementsView< +inline GenericRequiresInArrayElementsView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedRequiresInArrayElementsView( T *emboss_reserved_local_data, diff --git a/testdata/golden_cpp/start_size_range.emb.h b/testdata/golden_cpp/start_size_range.emb.h index 34a58ab..4d377f4 100644 --- a/testdata/golden_cpp/start_size_range.emb.h +++ b/testdata/golden_cpp/start_size_range.emb.h @@ -90,42 +90,44 @@ class GenericStartSizeView final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; - { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!size().Ok()) return false; - if (!start_size_constants().Ok()) return false; - if (!payload().Ok()) return false; - if (!counter().Ok()) return false; - if (!IntrinsicSizeInBytes().Ok()) return false; - if (!MaxSizeInBytes().Ok()) return false; - if (!MinSizeInBytes().Ok()) return false; - } - } + if (!size().Ok()) return false; + + if (!start_size_constants().Ok()) return false; + + if (!payload().Ok()) return false; + + if (!counter().Ok()) return false; + + if (!IntrinsicSizeInBytes().Ok()) return false; + + if (!MaxSizeInBytes().Ok()) return false; + + if (!MinSizeInBytes().Ok()) return false; + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - [[nodiscard]] ::std::size_t SizeInBytes() const { + ::std::size_t SizeInBytes() const { return static_cast(IntrinsicSizeInBytes().Read()); } - [[nodiscard]] bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericStartSizeView emboss_reserved_local_other) const { if (!has_size().Known()) return false; @@ -197,7 +199,7 @@ class GenericStartSizeView final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericStartSizeView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_size().ValueOr(false) && @@ -272,7 +274,7 @@ class GenericStartSizeView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericStartSizeView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -481,26 +483,26 @@ class GenericStartSizeView final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> size() const; - [[nodiscard]] ::emboss::support::Maybe has_size() const; + ::emboss::support::Maybe has_size() const; public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<16, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 16>> start_size_constants() const; - [[nodiscard]] ::emboss::support::Maybe has_start_size_constants() const; + ::emboss::support::Maybe has_start_size_constants() const; public: - [[nodiscard]] typename ::emboss::support::GenericArrayView< + typename ::emboss::support::GenericArrayView< typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock::template OffsetStorageType>, 8>> @@ -509,15 +511,15 @@ class GenericStartSizeView final { 8 > payload() const; - [[nodiscard]] ::emboss::support::Maybe has_payload() const; + ::emboss::support::Maybe has_payload() const; public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 32>> counter() const; - [[nodiscard]] ::emboss::support::Maybe has_counter() const; + ::emboss::support::Maybe has_counter() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -536,17 +538,17 @@ class GenericStartSizeView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - [[nodiscard]] ::std::int32_t Read() const { + ::std::int32_t Read() const { EMBOSS_CHECK(view_.has_IntrinsicSizeInBytes().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - [[nodiscard]] ::std::int32_t UncheckedRead() const { + ::std::int32_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - [[nodiscard]] bool Ok() const { + bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -559,12 +561,12 @@ class GenericStartSizeView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } private: - [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { + ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.size(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Sum(::emboss::support::Maybe(static_cast(3LL)), emboss_reserved_local_subexpr_2); @@ -576,7 +578,7 @@ class GenericStartSizeView final { return emboss_reserved_local_subexpr_7; } - [[nodiscard]] static constexpr bool ValueIsOk( + static constexpr bool ValueIsOk( ::std::int32_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -584,8 +586,8 @@ class GenericStartSizeView final { const GenericStartSizeView view_; }; - [[nodiscard]] EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; - [[nodiscard]] ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; + EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; public: class EmbossReservedDollarVirtualMaxSizeInBytesView final { @@ -601,9 +603,9 @@ class GenericStartSizeView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -612,13 +614,13 @@ class GenericStartSizeView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -636,9 +638,9 @@ class GenericStartSizeView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -647,13 +649,13 @@ class GenericStartSizeView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -684,7 +686,7 @@ struct EmbossReservedInternalIsGenericStartSizeView< }; template -[[nodiscard]] inline GenericStartSizeView< +inline GenericStartSizeView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -699,7 +701,7 @@ MakeStartSizeView( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericStartSizeView> +inline GenericStartSizeView> MakeStartSizeView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericStartSizeView>( @@ -708,7 +710,7 @@ MakeStartSizeView( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericStartSizeView< +inline GenericStartSizeView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedStartSizeView( T *emboss_reserved_local_data, diff --git a/testdata/golden_cpp/subtypes.emb.h b/testdata/golden_cpp/subtypes.emb.h index 0987f5a..10a7433 100644 --- a/testdata/golden_cpp/subtypes.emb.h +++ b/testdata/golden_cpp/subtypes.emb.h @@ -223,42 +223,43 @@ class GenericInInView final { using InInIn = ::emboss::test::Out::In::InIn::InInIn; - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; - { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!outer_offset().Ok()) return false; - if (!field_enum().Ok()) return false; - if (!in_2().Ok()) return false; - if (!IntrinsicSizeInBytes().Ok()) return false; - if (!MaxSizeInBytes().Ok()) return false; - if (!MinSizeInBytes().Ok()) return false; - } - } + if (!outer_offset().Ok()) return false; + + if (!field_enum().Ok()) return false; + + if (!in_2().Ok()) return false; + + if (!IntrinsicSizeInBytes().Ok()) return false; + + if (!MaxSizeInBytes().Ok()) return false; + + if (!MinSizeInBytes().Ok()) return false; + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { + static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - [[nodiscard]] static constexpr bool SizeIsKnown() { + static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericInInView emboss_reserved_local_other) const { if (!has_field_enum().Known()) return false; @@ -296,7 +297,7 @@ class GenericInInView final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericInInView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_field_enum().ValueOr(false) && @@ -343,7 +344,7 @@ class GenericInInView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericInInView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -495,7 +496,7 @@ class GenericInInView final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: class EmbossReservedVirtualOuterOffsetView final { @@ -511,9 +512,9 @@ class GenericInInView final { default; ~EmbossReservedVirtualOuterOffsetView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -522,30 +523,30 @@ class GenericInInView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedVirtualOuterOffsetView outer_offset() { + static constexpr EmbossReservedVirtualOuterOffsetView outer_offset() { return EmbossReservedVirtualOuterOffsetView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_outer_offset() { + static constexpr ::emboss::support::Maybe has_outer_offset() { return ::emboss::support::Maybe(true); } public: - [[nodiscard]] typename ::emboss::support::EnumView< + typename ::emboss::support::EnumView< /**/ ::emboss::test::Out::In::InIn::InInIn, ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> field_enum() const; - [[nodiscard]] ::emboss::support::Maybe has_field_enum() const; + ::emboss::support::Maybe has_field_enum() const; public: - [[nodiscard]] typename ::emboss::test::Out::GenericIn2View> + typename ::emboss::test::Out::GenericIn2View> in_2() const; - [[nodiscard]] ::emboss::support::Maybe has_in_2() const; + ::emboss::support::Maybe has_in_2() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -561,9 +562,9 @@ class GenericInInView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -572,13 +573,13 @@ class GenericInInView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -596,9 +597,9 @@ class GenericInInView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -607,13 +608,13 @@ class GenericInInView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -631,9 +632,9 @@ class GenericInInView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -642,13 +643,13 @@ class GenericInInView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -679,7 +680,7 @@ struct EmbossReservedInternalIsGenericInInView< }; template -[[nodiscard]] inline GenericInInView< +inline GenericInInView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -694,7 +695,7 @@ MakeInInView( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericInInView> +inline GenericInInView> MakeInInView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericInInView>( @@ -703,7 +704,7 @@ MakeInInView( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericInInView< +inline GenericInInView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedInInView( T *emboss_reserved_local_data, @@ -764,44 +765,48 @@ class GenericInView final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; - { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!in_in_1().Ok()) return false; - if (!in_in_2().Ok()) return false; - if (!in_in_in_1().Ok()) return false; - if (!in_2().Ok()) return false; - if (!name_collision().Ok()) return false; - if (!name_collision_check().Ok()) return false; - if (!IntrinsicSizeInBytes().Ok()) return false; - if (!MaxSizeInBytes().Ok()) return false; - if (!MinSizeInBytes().Ok()) return false; - } - } + if (!in_in_1().Ok()) return false; + + if (!in_in_2().Ok()) return false; + + if (!in_in_in_1().Ok()) return false; + + if (!in_2().Ok()) return false; + + if (!name_collision().Ok()) return false; + + if (!name_collision_check().Ok()) return false; + + if (!IntrinsicSizeInBytes().Ok()) return false; + + if (!MaxSizeInBytes().Ok()) return false; + + if (!MinSizeInBytes().Ok()) return false; + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - [[nodiscard]] ::std::size_t SizeInBytes() const { + ::std::size_t SizeInBytes() const { return static_cast(IntrinsicSizeInBytes().Read()); } - [[nodiscard]] bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericInView emboss_reserved_local_other) const { if (!has_in_in_1().Known()) return false; @@ -907,7 +912,7 @@ class GenericInView final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericInView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_in_in_1().ValueOr(false) && @@ -1010,7 +1015,7 @@ class GenericInView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericInView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -1295,50 +1300,50 @@ class GenericInView final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: - [[nodiscard]] typename ::emboss::test::Out::In::GenericInInView> + typename ::emboss::test::Out::In::GenericInInView> in_in_1() const; - [[nodiscard]] ::emboss::support::Maybe has_in_in_1() const; + ::emboss::support::Maybe has_in_in_1() const; public: - [[nodiscard]] typename ::emboss::test::Out::In::GenericInInView> + typename ::emboss::test::Out::In::GenericInInView> in_in_2() const; - [[nodiscard]] ::emboss::support::Maybe has_in_in_2() const; + ::emboss::support::Maybe has_in_in_2() const; public: - [[nodiscard]] typename ::emboss::support::EnumView< + typename ::emboss::support::EnumView< /**/ ::emboss::test::Out::In::InIn::InInIn, ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> in_in_in_1() const; - [[nodiscard]] ::emboss::support::Maybe has_in_in_in_1() const; + ::emboss::support::Maybe has_in_in_in_1() const; public: - [[nodiscard]] typename ::emboss::test::Out::GenericIn2View> + typename ::emboss::test::Out::GenericIn2View> in_2() const; - [[nodiscard]] ::emboss::support::Maybe has_in_2() const; + ::emboss::support::Maybe has_in_2() const; public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> name_collision() const; - [[nodiscard]] ::emboss::support::Maybe has_name_collision() const; + ::emboss::support::Maybe has_name_collision() const; public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> name_collision_check() const; - [[nodiscard]] ::emboss::support::Maybe has_name_collision_check() const; + ::emboss::support::Maybe has_name_collision_check() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -1357,17 +1362,17 @@ class GenericInView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - [[nodiscard]] ::std::int32_t Read() const { + ::std::int32_t Read() const { EMBOSS_CHECK(view_.has_IntrinsicSizeInBytes().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - [[nodiscard]] ::std::int32_t UncheckedRead() const { + ::std::int32_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - [[nodiscard]] bool Ok() const { + bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -1380,12 +1385,12 @@ class GenericInView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } private: - [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { + ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.name_collision(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Sum(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(1LL))); @@ -1395,7 +1400,7 @@ class GenericInView final { return emboss_reserved_local_subexpr_5; } - [[nodiscard]] static constexpr bool ValueIsOk( + static constexpr bool ValueIsOk( ::std::int32_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -1403,8 +1408,8 @@ class GenericInView final { const GenericInView view_; }; - [[nodiscard]] EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; - [[nodiscard]] ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; + EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; public: class EmbossReservedDollarVirtualMaxSizeInBytesView final { @@ -1420,9 +1425,9 @@ class GenericInView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -1431,13 +1436,13 @@ class GenericInView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -1455,9 +1460,9 @@ class GenericInView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -1466,13 +1471,13 @@ class GenericInView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -1503,7 +1508,7 @@ struct EmbossReservedInternalIsGenericInView< }; template -[[nodiscard]] inline GenericInView< +inline GenericInView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -1518,7 +1523,7 @@ MakeInView( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericInView> +inline GenericInView> MakeInView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericInView>( @@ -1527,7 +1532,7 @@ MakeInView( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericInView< +inline GenericInView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedInView( T *emboss_reserved_local_data, @@ -1593,40 +1598,39 @@ class GenericIn2View final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; - { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!field_byte().Ok()) return false; - if (!IntrinsicSizeInBytes().Ok()) return false; - if (!MaxSizeInBytes().Ok()) return false; - if (!MinSizeInBytes().Ok()) return false; - } - } + if (!field_byte().Ok()) return false; + + if (!IntrinsicSizeInBytes().Ok()) return false; + + if (!MaxSizeInBytes().Ok()) return false; + + if (!MinSizeInBytes().Ok()) return false; + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { + static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - [[nodiscard]] static constexpr bool SizeIsKnown() { + static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericIn2View emboss_reserved_local_other) const { if (!has_field_byte().Known()) return false; @@ -1647,7 +1651,7 @@ class GenericIn2View final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericIn2View emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_field_byte().ValueOr(false) && @@ -1680,7 +1684,7 @@ class GenericIn2View final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericIn2View emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -1775,15 +1779,15 @@ class GenericIn2View final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> field_byte() const; - [[nodiscard]] ::emboss::support::Maybe has_field_byte() const; + ::emboss::support::Maybe has_field_byte() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -1799,9 +1803,9 @@ class GenericIn2View final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -1810,13 +1814,13 @@ class GenericIn2View final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -1834,9 +1838,9 @@ class GenericIn2View final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -1845,13 +1849,13 @@ class GenericIn2View final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -1869,9 +1873,9 @@ class GenericIn2View final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -1880,13 +1884,13 @@ class GenericIn2View final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -1917,7 +1921,7 @@ struct EmbossReservedInternalIsGenericIn2View< }; template -[[nodiscard]] inline GenericIn2View< +inline GenericIn2View< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -1932,7 +1936,7 @@ MakeIn2View( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericIn2View> +inline GenericIn2View> MakeIn2View( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericIn2View>( @@ -1941,7 +1945,7 @@ MakeIn2View( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericIn2View< +inline GenericIn2View< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedIn2View( T *emboss_reserved_local_data, @@ -2002,47 +2006,53 @@ class GenericOutView final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; - { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!in_1().Ok()) return false; - if (!in_2().Ok()) return false; - if (!in_in_1().Ok()) return false; - if (!in_in_2().Ok()) return false; - if (!in_in_in_1().Ok()) return false; - if (!in_in_in_2().Ok()) return false; - if (!name_collision().Ok()) return false; - if (!nested_constant_check().Ok()) return false; - if (!IntrinsicSizeInBytes().Ok()) return false; - if (!MaxSizeInBytes().Ok()) return false; - if (!MinSizeInBytes().Ok()) return false; - } - } + if (!in_1().Ok()) return false; + + if (!in_2().Ok()) return false; + + if (!in_in_1().Ok()) return false; + + if (!in_in_2().Ok()) return false; + + if (!in_in_in_1().Ok()) return false; + + if (!in_in_in_2().Ok()) return false; + + if (!name_collision().Ok()) return false; + + if (!nested_constant_check().Ok()) return false; + + if (!IntrinsicSizeInBytes().Ok()) return false; + + if (!MaxSizeInBytes().Ok()) return false; + + if (!MinSizeInBytes().Ok()) return false; + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { + static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - [[nodiscard]] static constexpr bool SizeIsKnown() { + static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericOutView emboss_reserved_local_other) const { if (!has_in_1().Known()) return false; @@ -2182,7 +2192,7 @@ class GenericOutView final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericOutView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_in_1().ValueOr(false) && @@ -2313,7 +2323,7 @@ class GenericOutView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericOutView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -2674,65 +2684,65 @@ class GenericOutView final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: - [[nodiscard]] typename ::emboss::test::Out::GenericInView> + typename ::emboss::test::Out::GenericInView> in_1() const; - [[nodiscard]] ::emboss::support::Maybe has_in_1() const; + ::emboss::support::Maybe has_in_1() const; public: - [[nodiscard]] typename ::emboss::test::Out::GenericInView> + typename ::emboss::test::Out::GenericInView> in_2() const; - [[nodiscard]] ::emboss::support::Maybe has_in_2() const; + ::emboss::support::Maybe has_in_2() const; public: - [[nodiscard]] typename ::emboss::test::Out::In::GenericInInView> + typename ::emboss::test::Out::In::GenericInInView> in_in_1() const; - [[nodiscard]] ::emboss::support::Maybe has_in_in_1() const; + ::emboss::support::Maybe has_in_in_1() const; public: - [[nodiscard]] typename ::emboss::test::Out::In::GenericInInView> + typename ::emboss::test::Out::In::GenericInInView> in_in_2() const; - [[nodiscard]] ::emboss::support::Maybe has_in_in_2() const; + ::emboss::support::Maybe has_in_in_2() const; public: - [[nodiscard]] typename ::emboss::support::EnumView< + typename ::emboss::support::EnumView< /**/ ::emboss::test::Out::In::InIn::InInIn, ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> in_in_in_1() const; - [[nodiscard]] ::emboss::support::Maybe has_in_in_in_1() const; + ::emboss::support::Maybe has_in_in_in_1() const; public: - [[nodiscard]] typename ::emboss::support::EnumView< + typename ::emboss::support::EnumView< /**/ ::emboss::test::Out::In::InIn::InInIn, ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> in_in_in_2() const; - [[nodiscard]] ::emboss::support::Maybe has_in_in_in_2() const; + ::emboss::support::Maybe has_in_in_in_2() const; public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<16, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 16>> name_collision() const; - [[nodiscard]] ::emboss::support::Maybe has_name_collision() const; + ::emboss::support::Maybe has_name_collision() const; public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> nested_constant_check() const; - [[nodiscard]] ::emboss::support::Maybe has_nested_constant_check() const; + ::emboss::support::Maybe has_nested_constant_check() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -2748,9 +2758,9 @@ class GenericOutView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -2759,13 +2769,13 @@ class GenericOutView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -2783,9 +2793,9 @@ class GenericOutView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -2794,13 +2804,13 @@ class GenericOutView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -2818,9 +2828,9 @@ class GenericOutView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -2829,13 +2839,13 @@ class GenericOutView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -2866,7 +2876,7 @@ struct EmbossReservedInternalIsGenericOutView< }; template -[[nodiscard]] inline GenericOutView< +inline GenericOutView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -2881,7 +2891,7 @@ MakeOutView( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericOutView> +inline GenericOutView> MakeOutView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericOutView>( @@ -2890,7 +2900,7 @@ MakeOutView( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericOutView< +inline GenericOutView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedOutView( T *emboss_reserved_local_data, diff --git a/testdata/golden_cpp/text_format.emb.h b/testdata/golden_cpp/text_format.emb.h index b87a161..3950ae8 100644 --- a/testdata/golden_cpp/text_format.emb.h +++ b/testdata/golden_cpp/text_format.emb.h @@ -104,41 +104,41 @@ class GenericVanillaView final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; - { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!a().Ok()) return false; - if (!b().Ok()) return false; - if (!IntrinsicSizeInBytes().Ok()) return false; - if (!MaxSizeInBytes().Ok()) return false; - if (!MinSizeInBytes().Ok()) return false; - } - } + if (!a().Ok()) return false; + + if (!b().Ok()) return false; + + if (!IntrinsicSizeInBytes().Ok()) return false; + + if (!MaxSizeInBytes().Ok()) return false; + + if (!MinSizeInBytes().Ok()) return false; + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { + static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - [[nodiscard]] static constexpr bool SizeIsKnown() { + static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericVanillaView emboss_reserved_local_other) const { if (!has_a().Known()) return false; @@ -176,7 +176,7 @@ class GenericVanillaView final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericVanillaView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_a().ValueOr(false) && @@ -223,7 +223,7 @@ class GenericVanillaView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericVanillaView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -356,23 +356,23 @@ class GenericVanillaView final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> a() const; - [[nodiscard]] ::emboss::support::Maybe has_a() const; + ::emboss::support::Maybe has_a() const; public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> b() const; - [[nodiscard]] ::emboss::support::Maybe has_b() const; + ::emboss::support::Maybe has_b() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -388,9 +388,9 @@ class GenericVanillaView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -399,13 +399,13 @@ class GenericVanillaView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -423,9 +423,9 @@ class GenericVanillaView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -434,13 +434,13 @@ class GenericVanillaView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -458,9 +458,9 @@ class GenericVanillaView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -469,13 +469,13 @@ class GenericVanillaView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -506,7 +506,7 @@ struct EmbossReservedInternalIsGenericVanillaView< }; template -[[nodiscard]] inline GenericVanillaView< +inline GenericVanillaView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -521,7 +521,7 @@ MakeVanillaView( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericVanillaView> +inline GenericVanillaView> MakeVanillaView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericVanillaView>( @@ -530,7 +530,7 @@ MakeVanillaView( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericVanillaView< +inline GenericVanillaView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedVanillaView( T *emboss_reserved_local_data, @@ -597,42 +597,43 @@ class GenericStructWithSkippedFieldsView final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; - { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!a().Ok()) return false; - if (!b().Ok()) return false; - if (!c().Ok()) return false; - if (!IntrinsicSizeInBytes().Ok()) return false; - if (!MaxSizeInBytes().Ok()) return false; - if (!MinSizeInBytes().Ok()) return false; - } - } + if (!a().Ok()) return false; + + if (!b().Ok()) return false; + + if (!c().Ok()) return false; + + if (!IntrinsicSizeInBytes().Ok()) return false; + + if (!MaxSizeInBytes().Ok()) return false; + + if (!MinSizeInBytes().Ok()) return false; + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { + static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - [[nodiscard]] static constexpr bool SizeIsKnown() { + static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericStructWithSkippedFieldsView emboss_reserved_local_other) const { if (!has_a().Known()) return false; @@ -687,7 +688,7 @@ class GenericStructWithSkippedFieldsView final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericStructWithSkippedFieldsView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_a().ValueOr(false) && @@ -748,7 +749,7 @@ class GenericStructWithSkippedFieldsView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericStructWithSkippedFieldsView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -889,31 +890,31 @@ class GenericStructWithSkippedFieldsView final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> a() const; - [[nodiscard]] ::emboss::support::Maybe has_a() const; + ::emboss::support::Maybe has_a() const; public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> b() const; - [[nodiscard]] ::emboss::support::Maybe has_b() const; + ::emboss::support::Maybe has_b() const; public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> c() const; - [[nodiscard]] ::emboss::support::Maybe has_c() const; + ::emboss::support::Maybe has_c() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -929,9 +930,9 @@ class GenericStructWithSkippedFieldsView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -940,13 +941,13 @@ class GenericStructWithSkippedFieldsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -964,9 +965,9 @@ class GenericStructWithSkippedFieldsView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -975,13 +976,13 @@ class GenericStructWithSkippedFieldsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -999,9 +1000,9 @@ class GenericStructWithSkippedFieldsView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -1010,13 +1011,13 @@ class GenericStructWithSkippedFieldsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -1047,7 +1048,7 @@ struct EmbossReservedInternalIsGenericStructWithSkippedFieldsView< }; template -[[nodiscard]] inline GenericStructWithSkippedFieldsView< +inline GenericStructWithSkippedFieldsView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -1062,7 +1063,7 @@ MakeStructWithSkippedFieldsView( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericStructWithSkippedFieldsView> +inline GenericStructWithSkippedFieldsView> MakeStructWithSkippedFieldsView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericStructWithSkippedFieldsView>( @@ -1071,7 +1072,7 @@ MakeStructWithSkippedFieldsView( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericStructWithSkippedFieldsView< +inline GenericStructWithSkippedFieldsView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedStructWithSkippedFieldsView( T *emboss_reserved_local_data, @@ -1138,42 +1139,43 @@ class GenericStructWithSkippedStructureFieldsView final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; - { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!a().Ok()) return false; - if (!b().Ok()) return false; - if (!c().Ok()) return false; - if (!IntrinsicSizeInBytes().Ok()) return false; - if (!MaxSizeInBytes().Ok()) return false; - if (!MinSizeInBytes().Ok()) return false; - } - } + if (!a().Ok()) return false; + + if (!b().Ok()) return false; + + if (!c().Ok()) return false; + + if (!IntrinsicSizeInBytes().Ok()) return false; + + if (!MaxSizeInBytes().Ok()) return false; + + if (!MinSizeInBytes().Ok()) return false; + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { + static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - [[nodiscard]] static constexpr bool SizeIsKnown() { + static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericStructWithSkippedStructureFieldsView emboss_reserved_local_other) const { if (!has_a().Known()) return false; @@ -1228,7 +1230,7 @@ class GenericStructWithSkippedStructureFieldsView final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericStructWithSkippedStructureFieldsView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_a().ValueOr(false) && @@ -1289,7 +1291,7 @@ class GenericStructWithSkippedStructureFieldsView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericStructWithSkippedStructureFieldsView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -1430,25 +1432,25 @@ class GenericStructWithSkippedStructureFieldsView final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: - [[nodiscard]] typename ::emboss::test::GenericVanillaView> + typename ::emboss::test::GenericVanillaView> a() const; - [[nodiscard]] ::emboss::support::Maybe has_a() const; + ::emboss::support::Maybe has_a() const; public: - [[nodiscard]] typename ::emboss::test::GenericVanillaView> + typename ::emboss::test::GenericVanillaView> b() const; - [[nodiscard]] ::emboss::support::Maybe has_b() const; + ::emboss::support::Maybe has_b() const; public: - [[nodiscard]] typename ::emboss::test::GenericVanillaView> + typename ::emboss::test::GenericVanillaView> c() const; - [[nodiscard]] ::emboss::support::Maybe has_c() const; + ::emboss::support::Maybe has_c() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -1464,9 +1466,9 @@ class GenericStructWithSkippedStructureFieldsView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -1475,13 +1477,13 @@ class GenericStructWithSkippedStructureFieldsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -1499,9 +1501,9 @@ class GenericStructWithSkippedStructureFieldsView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -1510,13 +1512,13 @@ class GenericStructWithSkippedStructureFieldsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -1534,9 +1536,9 @@ class GenericStructWithSkippedStructureFieldsView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -1545,13 +1547,13 @@ class GenericStructWithSkippedStructureFieldsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -1582,7 +1584,7 @@ struct EmbossReservedInternalIsGenericStructWithSkippedStructureFieldsView< }; template -[[nodiscard]] inline GenericStructWithSkippedStructureFieldsView< +inline GenericStructWithSkippedStructureFieldsView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -1597,7 +1599,7 @@ MakeStructWithSkippedStructureFieldsView( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericStructWithSkippedStructureFieldsView> +inline GenericStructWithSkippedStructureFieldsView> MakeStructWithSkippedStructureFieldsView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericStructWithSkippedStructureFieldsView>( @@ -1606,7 +1608,7 @@ MakeStructWithSkippedStructureFieldsView( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericStructWithSkippedStructureFieldsView< +inline GenericStructWithSkippedStructureFieldsView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedStructWithSkippedStructureFieldsView( T *emboss_reserved_local_data, diff --git a/testdata/golden_cpp/uint_sizes.emb.h b/testdata/golden_cpp/uint_sizes.emb.h index e0c25d0..bde6edc 100644 --- a/testdata/golden_cpp/uint_sizes.emb.h +++ b/testdata/golden_cpp/uint_sizes.emb.h @@ -146,47 +146,53 @@ class GenericSizesView final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; - { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!one_byte().Ok()) return false; - if (!two_byte().Ok()) return false; - if (!three_byte().Ok()) return false; - if (!four_byte().Ok()) return false; - if (!five_byte().Ok()) return false; - if (!six_byte().Ok()) return false; - if (!seven_byte().Ok()) return false; - if (!eight_byte().Ok()) return false; - if (!IntrinsicSizeInBytes().Ok()) return false; - if (!MaxSizeInBytes().Ok()) return false; - if (!MinSizeInBytes().Ok()) return false; - } - } + if (!one_byte().Ok()) return false; + + if (!two_byte().Ok()) return false; + + if (!three_byte().Ok()) return false; + + if (!four_byte().Ok()) return false; + + if (!five_byte().Ok()) return false; + + if (!six_byte().Ok()) return false; + + if (!seven_byte().Ok()) return false; + + if (!eight_byte().Ok()) return false; + + if (!IntrinsicSizeInBytes().Ok()) return false; + + if (!MaxSizeInBytes().Ok()) return false; + + if (!MinSizeInBytes().Ok()) return false; + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { + static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - [[nodiscard]] static constexpr bool SizeIsKnown() { + static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericSizesView emboss_reserved_local_other) const { if (!has_one_byte().Known()) return false; @@ -326,7 +332,7 @@ class GenericSizesView final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericSizesView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_one_byte().ValueOr(false) && @@ -457,7 +463,7 @@ class GenericSizesView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericSizesView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -818,71 +824,71 @@ class GenericSizesView final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> one_byte() const; - [[nodiscard]] ::emboss::support::Maybe has_one_byte() const; + ::emboss::support::Maybe has_one_byte() const; public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<16, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 16>> two_byte() const; - [[nodiscard]] ::emboss::support::Maybe has_two_byte() const; + ::emboss::support::Maybe has_two_byte() const; public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<24, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 24>> three_byte() const; - [[nodiscard]] ::emboss::support::Maybe has_three_byte() const; + ::emboss::support::Maybe has_three_byte() const; public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 32>> four_byte() const; - [[nodiscard]] ::emboss::support::Maybe has_four_byte() const; + ::emboss::support::Maybe has_four_byte() const; public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<40, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 40>> five_byte() const; - [[nodiscard]] ::emboss::support::Maybe has_five_byte() const; + ::emboss::support::Maybe has_five_byte() const; public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<48, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 48>> six_byte() const; - [[nodiscard]] ::emboss::support::Maybe has_six_byte() const; + ::emboss::support::Maybe has_six_byte() const; public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<56, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 56>> seven_byte() const; - [[nodiscard]] ::emboss::support::Maybe has_seven_byte() const; + ::emboss::support::Maybe has_seven_byte() const; public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<64, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 64>> eight_byte() const; - [[nodiscard]] ::emboss::support::Maybe has_eight_byte() const; + ::emboss::support::Maybe has_eight_byte() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -898,9 +904,9 @@ class GenericSizesView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -909,13 +915,13 @@ class GenericSizesView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -933,9 +939,9 @@ class GenericSizesView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -944,13 +950,13 @@ class GenericSizesView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -968,9 +974,9 @@ class GenericSizesView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -979,13 +985,13 @@ class GenericSizesView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -1016,7 +1022,7 @@ struct EmbossReservedInternalIsGenericSizesView< }; template -[[nodiscard]] inline GenericSizesView< +inline GenericSizesView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -1031,7 +1037,7 @@ MakeSizesView( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericSizesView> +inline GenericSizesView> MakeSizesView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericSizesView>( @@ -1040,7 +1046,7 @@ MakeSizesView( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericSizesView< +inline GenericSizesView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedSizesView( T *emboss_reserved_local_data, @@ -1112,47 +1118,53 @@ class GenericBigEndianSizesView final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; - { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!one_byte().Ok()) return false; - if (!two_byte().Ok()) return false; - if (!three_byte().Ok()) return false; - if (!four_byte().Ok()) return false; - if (!five_byte().Ok()) return false; - if (!six_byte().Ok()) return false; - if (!seven_byte().Ok()) return false; - if (!eight_byte().Ok()) return false; - if (!IntrinsicSizeInBytes().Ok()) return false; - if (!MaxSizeInBytes().Ok()) return false; - if (!MinSizeInBytes().Ok()) return false; - } - } + if (!one_byte().Ok()) return false; + + if (!two_byte().Ok()) return false; + + if (!three_byte().Ok()) return false; + + if (!four_byte().Ok()) return false; + + if (!five_byte().Ok()) return false; + + if (!six_byte().Ok()) return false; + + if (!seven_byte().Ok()) return false; + + if (!eight_byte().Ok()) return false; + + if (!IntrinsicSizeInBytes().Ok()) return false; + + if (!MaxSizeInBytes().Ok()) return false; + + if (!MinSizeInBytes().Ok()) return false; + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { + static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - [[nodiscard]] static constexpr bool SizeIsKnown() { + static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericBigEndianSizesView emboss_reserved_local_other) const { if (!has_one_byte().Known()) return false; @@ -1292,7 +1304,7 @@ class GenericBigEndianSizesView final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericBigEndianSizesView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_one_byte().ValueOr(false) && @@ -1423,7 +1435,7 @@ class GenericBigEndianSizesView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericBigEndianSizesView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -1784,71 +1796,71 @@ class GenericBigEndianSizesView final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> one_byte() const; - [[nodiscard]] ::emboss::support::Maybe has_one_byte() const; + ::emboss::support::Maybe has_one_byte() const; public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<16, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 16>> two_byte() const; - [[nodiscard]] ::emboss::support::Maybe has_two_byte() const; + ::emboss::support::Maybe has_two_byte() const; public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<24, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 24>> three_byte() const; - [[nodiscard]] ::emboss::support::Maybe has_three_byte() const; + ::emboss::support::Maybe has_three_byte() const; public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 32>> four_byte() const; - [[nodiscard]] ::emboss::support::Maybe has_four_byte() const; + ::emboss::support::Maybe has_four_byte() const; public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<40, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 40>> five_byte() const; - [[nodiscard]] ::emboss::support::Maybe has_five_byte() const; + ::emboss::support::Maybe has_five_byte() const; public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<48, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 48>> six_byte() const; - [[nodiscard]] ::emboss::support::Maybe has_six_byte() const; + ::emboss::support::Maybe has_six_byte() const; public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<56, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 56>> seven_byte() const; - [[nodiscard]] ::emboss::support::Maybe has_seven_byte() const; + ::emboss::support::Maybe has_seven_byte() const; public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<64, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 64>> eight_byte() const; - [[nodiscard]] ::emboss::support::Maybe has_eight_byte() const; + ::emboss::support::Maybe has_eight_byte() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -1864,9 +1876,9 @@ class GenericBigEndianSizesView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -1875,13 +1887,13 @@ class GenericBigEndianSizesView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -1899,9 +1911,9 @@ class GenericBigEndianSizesView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -1910,13 +1922,13 @@ class GenericBigEndianSizesView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -1934,9 +1946,9 @@ class GenericBigEndianSizesView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -1945,13 +1957,13 @@ class GenericBigEndianSizesView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -1982,7 +1994,7 @@ struct EmbossReservedInternalIsGenericBigEndianSizesView< }; template -[[nodiscard]] inline GenericBigEndianSizesView< +inline GenericBigEndianSizesView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -1997,7 +2009,7 @@ MakeBigEndianSizesView( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericBigEndianSizesView> +inline GenericBigEndianSizesView> MakeBigEndianSizesView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericBigEndianSizesView>( @@ -2006,7 +2018,7 @@ MakeBigEndianSizesView( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericBigEndianSizesView< +inline GenericBigEndianSizesView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedBigEndianSizesView( T *emboss_reserved_local_data, @@ -2078,47 +2090,53 @@ class GenericAlternatingEndianSizesView final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; - { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!one_byte().Ok()) return false; - if (!two_byte().Ok()) return false; - if (!three_byte().Ok()) return false; - if (!four_byte().Ok()) return false; - if (!five_byte().Ok()) return false; - if (!six_byte().Ok()) return false; - if (!seven_byte().Ok()) return false; - if (!eight_byte().Ok()) return false; - if (!IntrinsicSizeInBytes().Ok()) return false; - if (!MaxSizeInBytes().Ok()) return false; - if (!MinSizeInBytes().Ok()) return false; - } - } + if (!one_byte().Ok()) return false; + + if (!two_byte().Ok()) return false; + + if (!three_byte().Ok()) return false; + + if (!four_byte().Ok()) return false; + + if (!five_byte().Ok()) return false; + + if (!six_byte().Ok()) return false; + + if (!seven_byte().Ok()) return false; + + if (!eight_byte().Ok()) return false; + + if (!IntrinsicSizeInBytes().Ok()) return false; + + if (!MaxSizeInBytes().Ok()) return false; + + if (!MinSizeInBytes().Ok()) return false; + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { + static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - [[nodiscard]] static constexpr bool SizeIsKnown() { + static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericAlternatingEndianSizesView emboss_reserved_local_other) const { if (!has_one_byte().Known()) return false; @@ -2258,7 +2276,7 @@ class GenericAlternatingEndianSizesView final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericAlternatingEndianSizesView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_one_byte().ValueOr(false) && @@ -2389,7 +2407,7 @@ class GenericAlternatingEndianSizesView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericAlternatingEndianSizesView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -2750,71 +2768,71 @@ class GenericAlternatingEndianSizesView final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> one_byte() const; - [[nodiscard]] ::emboss::support::Maybe has_one_byte() const; + ::emboss::support::Maybe has_one_byte() const; public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<16, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 16>> two_byte() const; - [[nodiscard]] ::emboss::support::Maybe has_two_byte() const; + ::emboss::support::Maybe has_two_byte() const; public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<24, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 24>> three_byte() const; - [[nodiscard]] ::emboss::support::Maybe has_three_byte() const; + ::emboss::support::Maybe has_three_byte() const; public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 32>> four_byte() const; - [[nodiscard]] ::emboss::support::Maybe has_four_byte() const; + ::emboss::support::Maybe has_four_byte() const; public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<40, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 40>> five_byte() const; - [[nodiscard]] ::emboss::support::Maybe has_five_byte() const; + ::emboss::support::Maybe has_five_byte() const; public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<48, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 48>> six_byte() const; - [[nodiscard]] ::emboss::support::Maybe has_six_byte() const; + ::emboss::support::Maybe has_six_byte() const; public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<56, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 56>> seven_byte() const; - [[nodiscard]] ::emboss::support::Maybe has_seven_byte() const; + ::emboss::support::Maybe has_seven_byte() const; public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<64, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 64>> eight_byte() const; - [[nodiscard]] ::emboss::support::Maybe has_eight_byte() const; + ::emboss::support::Maybe has_eight_byte() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -2830,9 +2848,9 @@ class GenericAlternatingEndianSizesView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -2841,13 +2859,13 @@ class GenericAlternatingEndianSizesView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -2865,9 +2883,9 @@ class GenericAlternatingEndianSizesView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -2876,13 +2894,13 @@ class GenericAlternatingEndianSizesView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -2900,9 +2918,9 @@ class GenericAlternatingEndianSizesView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -2911,13 +2929,13 @@ class GenericAlternatingEndianSizesView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -2948,7 +2966,7 @@ struct EmbossReservedInternalIsGenericAlternatingEndianSizesView< }; template -[[nodiscard]] inline GenericAlternatingEndianSizesView< +inline GenericAlternatingEndianSizesView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -2963,7 +2981,7 @@ MakeAlternatingEndianSizesView( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericAlternatingEndianSizesView> +inline GenericAlternatingEndianSizesView> MakeAlternatingEndianSizesView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericAlternatingEndianSizesView>( @@ -2972,7 +2990,7 @@ MakeAlternatingEndianSizesView( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericAlternatingEndianSizesView< +inline GenericAlternatingEndianSizesView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedAlternatingEndianSizesView( T *emboss_reserved_local_data, @@ -3044,47 +3062,53 @@ class GenericEnumSizesView final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; - { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!one_byte().Ok()) return false; - if (!two_byte().Ok()) return false; - if (!three_byte().Ok()) return false; - if (!four_byte().Ok()) return false; - if (!five_byte().Ok()) return false; - if (!six_byte().Ok()) return false; - if (!seven_byte().Ok()) return false; - if (!eight_byte().Ok()) return false; - if (!IntrinsicSizeInBytes().Ok()) return false; - if (!MaxSizeInBytes().Ok()) return false; - if (!MinSizeInBytes().Ok()) return false; - } - } + if (!one_byte().Ok()) return false; + + if (!two_byte().Ok()) return false; + + if (!three_byte().Ok()) return false; + + if (!four_byte().Ok()) return false; + + if (!five_byte().Ok()) return false; + + if (!six_byte().Ok()) return false; + + if (!seven_byte().Ok()) return false; + + if (!eight_byte().Ok()) return false; + + if (!IntrinsicSizeInBytes().Ok()) return false; + + if (!MaxSizeInBytes().Ok()) return false; + + if (!MinSizeInBytes().Ok()) return false; + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { + static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - [[nodiscard]] static constexpr bool SizeIsKnown() { + static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericEnumSizesView emboss_reserved_local_other) const { if (!has_one_byte().Known()) return false; @@ -3224,7 +3248,7 @@ class GenericEnumSizesView final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericEnumSizesView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_one_byte().ValueOr(false) && @@ -3355,7 +3379,7 @@ class GenericEnumSizesView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericEnumSizesView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -3716,79 +3740,79 @@ class GenericEnumSizesView final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: - [[nodiscard]] typename ::emboss::support::EnumView< + typename ::emboss::support::EnumView< /**/ ::emboss::test::Enum, ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> one_byte() const; - [[nodiscard]] ::emboss::support::Maybe has_one_byte() const; + ::emboss::support::Maybe has_one_byte() const; public: - [[nodiscard]] typename ::emboss::support::EnumView< + typename ::emboss::support::EnumView< /**/ ::emboss::test::Enum, ::emboss::support::FixedSizeViewParameters<16, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 16>> two_byte() const; - [[nodiscard]] ::emboss::support::Maybe has_two_byte() const; + ::emboss::support::Maybe has_two_byte() const; public: - [[nodiscard]] typename ::emboss::support::EnumView< + typename ::emboss::support::EnumView< /**/ ::emboss::test::Enum, ::emboss::support::FixedSizeViewParameters<24, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 24>> three_byte() const; - [[nodiscard]] ::emboss::support::Maybe has_three_byte() const; + ::emboss::support::Maybe has_three_byte() const; public: - [[nodiscard]] typename ::emboss::support::EnumView< + typename ::emboss::support::EnumView< /**/ ::emboss::test::Enum, ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 32>> four_byte() const; - [[nodiscard]] ::emboss::support::Maybe has_four_byte() const; + ::emboss::support::Maybe has_four_byte() const; public: - [[nodiscard]] typename ::emboss::support::EnumView< + typename ::emboss::support::EnumView< /**/ ::emboss::test::Enum, ::emboss::support::FixedSizeViewParameters<40, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 40>> five_byte() const; - [[nodiscard]] ::emboss::support::Maybe has_five_byte() const; + ::emboss::support::Maybe has_five_byte() const; public: - [[nodiscard]] typename ::emboss::support::EnumView< + typename ::emboss::support::EnumView< /**/ ::emboss::test::Enum, ::emboss::support::FixedSizeViewParameters<48, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 48>> six_byte() const; - [[nodiscard]] ::emboss::support::Maybe has_six_byte() const; + ::emboss::support::Maybe has_six_byte() const; public: - [[nodiscard]] typename ::emboss::support::EnumView< + typename ::emboss::support::EnumView< /**/ ::emboss::test::Enum, ::emboss::support::FixedSizeViewParameters<56, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 56>> seven_byte() const; - [[nodiscard]] ::emboss::support::Maybe has_seven_byte() const; + ::emboss::support::Maybe has_seven_byte() const; public: - [[nodiscard]] typename ::emboss::support::EnumView< + typename ::emboss::support::EnumView< /**/ ::emboss::test::Enum, ::emboss::support::FixedSizeViewParameters<64, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 64>> eight_byte() const; - [[nodiscard]] ::emboss::support::Maybe has_eight_byte() const; + ::emboss::support::Maybe has_eight_byte() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -3804,9 +3828,9 @@ class GenericEnumSizesView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -3815,13 +3839,13 @@ class GenericEnumSizesView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -3839,9 +3863,9 @@ class GenericEnumSizesView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -3850,13 +3874,13 @@ class GenericEnumSizesView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -3874,9 +3898,9 @@ class GenericEnumSizesView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -3885,13 +3909,13 @@ class GenericEnumSizesView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -3922,7 +3946,7 @@ struct EmbossReservedInternalIsGenericEnumSizesView< }; template -[[nodiscard]] inline GenericEnumSizesView< +inline GenericEnumSizesView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -3937,7 +3961,7 @@ MakeEnumSizesView( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericEnumSizesView> +inline GenericEnumSizesView> MakeEnumSizesView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericEnumSizesView>( @@ -3946,7 +3970,7 @@ MakeEnumSizesView( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericEnumSizesView< +inline GenericEnumSizesView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedEnumSizesView( T *emboss_reserved_local_data, @@ -4019,40 +4043,39 @@ class GenericEmbossReservedAnonymousField1View final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; - { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!three_and_a_half_byte().Ok()) return false; - if (!IntrinsicSizeInBits().Ok()) return false; - if (!MaxSizeInBits().Ok()) return false; - if (!MinSizeInBits().Ok()) return false; - } - } + if (!three_and_a_half_byte().Ok()) return false; + + if (!IntrinsicSizeInBits().Ok()) return false; + + if (!MaxSizeInBits().Ok()) return false; + + if (!MinSizeInBits().Ok()) return false; + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBits().Ok() && backing_.SizeInBits() >= static_cast( IntrinsicSizeInBits().UncheckedRead()); } - [[nodiscard]] static constexpr ::std::size_t SizeInBits() { + static constexpr ::std::size_t SizeInBits() { return static_cast(IntrinsicSizeInBits().Read()); } - [[nodiscard]] static constexpr bool SizeIsKnown() { + static constexpr bool SizeIsKnown() { return IntrinsicSizeInBits().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericEmbossReservedAnonymousField1View emboss_reserved_local_other) const { if (!has_three_and_a_half_byte().Known()) return false; @@ -4073,7 +4096,7 @@ class GenericEmbossReservedAnonymousField1View final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericEmbossReservedAnonymousField1View emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_three_and_a_half_byte().ValueOr(false) && @@ -4106,7 +4129,7 @@ class GenericEmbossReservedAnonymousField1View final { emboss_reserved_local_other.IntrinsicSizeInBits().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericEmbossReservedAnonymousField1View emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -4201,16 +4224,16 @@ class GenericEmbossReservedAnonymousField1View final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: - [[nodiscard]] typename ::emboss::support::EnumView< + typename ::emboss::support::EnumView< /**/ ::emboss::test::ExplicitlySizedEnum, ::emboss::support::FixedSizeViewParameters<28, ::emboss::support::AllValuesAreOk>, typename Storage::template OffsetStorageType> three_and_a_half_byte() const; - [[nodiscard]] ::emboss::support::Maybe has_three_and_a_half_byte() const; + ::emboss::support::Maybe has_three_and_a_half_byte() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBitsView final { @@ -4226,9 +4249,9 @@ class GenericEmbossReservedAnonymousField1View final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBitsView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -4237,13 +4260,13 @@ class GenericEmbossReservedAnonymousField1View final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBitsView IntrinsicSizeInBits() { + static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBitsView IntrinsicSizeInBits() { return EmbossReservedDollarVirtualIntrinsicSizeInBitsView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBits() { + static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBits() { return ::emboss::support::Maybe(true); } @@ -4261,9 +4284,9 @@ class GenericEmbossReservedAnonymousField1View final { default; ~EmbossReservedDollarVirtualMaxSizeInBitsView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -4272,13 +4295,13 @@ class GenericEmbossReservedAnonymousField1View final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBitsView MaxSizeInBits() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBitsView MaxSizeInBits() { return EmbossReservedDollarVirtualMaxSizeInBitsView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBits() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBits() { return ::emboss::support::Maybe(true); } @@ -4296,9 +4319,9 @@ class GenericEmbossReservedAnonymousField1View final { default; ~EmbossReservedDollarVirtualMinSizeInBitsView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -4307,13 +4330,13 @@ class GenericEmbossReservedAnonymousField1View final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBitsView MinSizeInBits() { + static constexpr EmbossReservedDollarVirtualMinSizeInBitsView MinSizeInBits() { return EmbossReservedDollarVirtualMinSizeInBitsView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBits() { + static constexpr ::emboss::support::Maybe has_MinSizeInBits() { return ::emboss::support::Maybe(true); } @@ -4344,7 +4367,7 @@ struct EmbossReservedInternalIsGenericEmbossReservedAnonymousField1View< }; template -[[nodiscard]] inline GenericEmbossReservedAnonymousField1View< +inline GenericEmbossReservedAnonymousField1View< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -4359,7 +4382,7 @@ MakeEmbossReservedAnonymousField1View( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericEmbossReservedAnonymousField1View> +inline GenericEmbossReservedAnonymousField1View> MakeEmbossReservedAnonymousField1View( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericEmbossReservedAnonymousField1View>( @@ -4368,7 +4391,7 @@ MakeEmbossReservedAnonymousField1View( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericEmbossReservedAnonymousField1View< +inline GenericEmbossReservedAnonymousField1View< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedEmbossReservedAnonymousField1View( T *emboss_reserved_local_data, @@ -4429,51 +4452,57 @@ class GenericExplicitlySizedEnumSizesView final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; const auto emboss_reserved_local_ok_subexpr_1 = ::emboss::support::And(::emboss::support::Maybe(true), ::emboss::support::Maybe(true)); + if (!one_byte().Ok()) return false; + + if (!two_byte().Ok()) return false; + + if (!three_byte().Ok()) return false; + + if (!emboss_reserved_anonymous_field_1().Ok()) return false; + + if (!IntrinsicSizeInBytes().Ok()) return false; + + if (!MaxSizeInBytes().Ok()) return false; + + if (!MinSizeInBytes().Ok()) return false; + { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!one_byte().Ok()) return false; - if (!two_byte().Ok()) return false; - if (!three_byte().Ok()) return false; - if (!emboss_reserved_anonymous_field_1().Ok()) return false; - if (!IntrinsicSizeInBytes().Ok()) return false; - if (!MaxSizeInBytes().Ok()) return false; - if (!MinSizeInBytes().Ok()) return false; - } - } - { + const auto emboss_reserved_cond = emboss_reserved_local_ok_subexpr_1; if (!emboss_reserved_cond.Known()) return false; if (emboss_reserved_cond.ValueOrDefault()) { if (!three_and_a_half_byte().Ok()) return false; + + } } + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { + static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - [[nodiscard]] static constexpr bool SizeIsKnown() { + static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericExplicitlySizedEnumSizesView emboss_reserved_local_other) const { if (!has_one_byte().Known()) return false; @@ -4545,7 +4574,7 @@ class GenericExplicitlySizedEnumSizesView final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericExplicitlySizedEnumSizesView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_one_byte().ValueOr(false) && @@ -4620,7 +4649,7 @@ class GenericExplicitlySizedEnumSizesView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericExplicitlySizedEnumSizesView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -4829,47 +4858,47 @@ class GenericExplicitlySizedEnumSizesView final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: - [[nodiscard]] typename ::emboss::support::EnumView< + typename ::emboss::support::EnumView< /**/ ::emboss::test::ExplicitlySizedEnum, ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> one_byte() const; - [[nodiscard]] ::emboss::support::Maybe has_one_byte() const; + ::emboss::support::Maybe has_one_byte() const; public: - [[nodiscard]] typename ::emboss::support::EnumView< + typename ::emboss::support::EnumView< /**/ ::emboss::test::ExplicitlySizedEnum, ::emboss::support::FixedSizeViewParameters<16, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 16>> two_byte() const; - [[nodiscard]] ::emboss::support::Maybe has_two_byte() const; + ::emboss::support::Maybe has_two_byte() const; public: - [[nodiscard]] typename ::emboss::support::EnumView< + typename ::emboss::support::EnumView< /**/ ::emboss::test::ExplicitlySizedEnum, ::emboss::support::FixedSizeViewParameters<24, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 24>> three_byte() const; - [[nodiscard]] ::emboss::support::Maybe has_three_byte() const; + ::emboss::support::Maybe has_three_byte() const; private: - [[nodiscard]] typename ::emboss::test::ExplicitlySizedEnumSizes::GenericEmbossReservedAnonymousField1View>, 32>> + typename ::emboss::test::ExplicitlySizedEnumSizes::GenericEmbossReservedAnonymousField1View>, 32>> emboss_reserved_anonymous_field_1() const; - [[nodiscard]] ::emboss::support::Maybe has_emboss_reserved_anonymous_field_1() const; + ::emboss::support::Maybe has_emboss_reserved_anonymous_field_1() const; public: - [[nodiscard]] auto three_and_a_half_byte() const -> decltype(this->emboss_reserved_anonymous_field_1().three_and_a_half_byte()) { + auto three_and_a_half_byte() const -> decltype(this->emboss_reserved_anonymous_field_1().three_and_a_half_byte()) { return has_three_and_a_half_byte().ValueOrDefault() ? emboss_reserved_anonymous_field_1().three_and_a_half_byte() : decltype(this->emboss_reserved_anonymous_field_1().three_and_a_half_byte())(); } - [[nodiscard]] ::emboss::support::Maybe has_three_and_a_half_byte() const; + ::emboss::support::Maybe has_three_and_a_half_byte() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -4885,9 +4914,9 @@ class GenericExplicitlySizedEnumSizesView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -4896,13 +4925,13 @@ class GenericExplicitlySizedEnumSizesView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -4920,9 +4949,9 @@ class GenericExplicitlySizedEnumSizesView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -4931,13 +4960,13 @@ class GenericExplicitlySizedEnumSizesView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -4955,9 +4984,9 @@ class GenericExplicitlySizedEnumSizesView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -4966,13 +4995,13 @@ class GenericExplicitlySizedEnumSizesView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -5003,7 +5032,7 @@ struct EmbossReservedInternalIsGenericExplicitlySizedEnumSizesView< }; template -[[nodiscard]] inline GenericExplicitlySizedEnumSizesView< +inline GenericExplicitlySizedEnumSizesView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -5018,7 +5047,7 @@ MakeExplicitlySizedEnumSizesView( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericExplicitlySizedEnumSizesView> +inline GenericExplicitlySizedEnumSizesView> MakeExplicitlySizedEnumSizesView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericExplicitlySizedEnumSizesView>( @@ -5027,7 +5056,7 @@ MakeExplicitlySizedEnumSizesView( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericExplicitlySizedEnumSizesView< +inline GenericExplicitlySizedEnumSizesView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedExplicitlySizedEnumSizesView( T *emboss_reserved_local_data, @@ -5393,47 +5422,53 @@ class GenericArraySizesView final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; - { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!one_byte().Ok()) return false; - if (!two_byte().Ok()) return false; - if (!three_byte().Ok()) return false; - if (!four_byte().Ok()) return false; - if (!five_byte().Ok()) return false; - if (!six_byte().Ok()) return false; - if (!seven_byte().Ok()) return false; - if (!eight_byte().Ok()) return false; - if (!IntrinsicSizeInBytes().Ok()) return false; - if (!MaxSizeInBytes().Ok()) return false; - if (!MinSizeInBytes().Ok()) return false; - } - } + if (!one_byte().Ok()) return false; + + if (!two_byte().Ok()) return false; + + if (!three_byte().Ok()) return false; + + if (!four_byte().Ok()) return false; + + if (!five_byte().Ok()) return false; + + if (!six_byte().Ok()) return false; + + if (!seven_byte().Ok()) return false; + + if (!eight_byte().Ok()) return false; + + if (!IntrinsicSizeInBytes().Ok()) return false; + + if (!MaxSizeInBytes().Ok()) return false; + + if (!MinSizeInBytes().Ok()) return false; + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { + static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - [[nodiscard]] static constexpr bool SizeIsKnown() { + static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericArraySizesView emboss_reserved_local_other) const { if (!has_one_byte().Known()) return false; @@ -5573,7 +5608,7 @@ class GenericArraySizesView final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericArraySizesView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_one_byte().ValueOr(false) && @@ -5704,7 +5739,7 @@ class GenericArraySizesView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericArraySizesView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -6065,10 +6100,10 @@ class GenericArraySizesView final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: - [[nodiscard]] typename ::emboss::support::GenericArrayView< + typename ::emboss::support::GenericArrayView< typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock::template OffsetStorageType>, 8>> @@ -6077,10 +6112,10 @@ class GenericArraySizesView final { 8 > one_byte() const; - [[nodiscard]] ::emboss::support::Maybe has_one_byte() const; + ::emboss::support::Maybe has_one_byte() const; public: - [[nodiscard]] typename ::emboss::support::GenericArrayView< + typename ::emboss::support::GenericArrayView< typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<16, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock::template OffsetStorageType>, 16>> @@ -6089,10 +6124,10 @@ class GenericArraySizesView final { 8 > two_byte() const; - [[nodiscard]] ::emboss::support::Maybe has_two_byte() const; + ::emboss::support::Maybe has_two_byte() const; public: - [[nodiscard]] typename ::emboss::support::GenericArrayView< + typename ::emboss::support::GenericArrayView< typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<24, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock::template OffsetStorageType>, 24>> @@ -6101,10 +6136,10 @@ class GenericArraySizesView final { 8 > three_byte() const; - [[nodiscard]] ::emboss::support::Maybe has_three_byte() const; + ::emboss::support::Maybe has_three_byte() const; public: - [[nodiscard]] typename ::emboss::support::GenericArrayView< + typename ::emboss::support::GenericArrayView< typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock::template OffsetStorageType>, 32>> @@ -6113,10 +6148,10 @@ class GenericArraySizesView final { 8 > four_byte() const; - [[nodiscard]] ::emboss::support::Maybe has_four_byte() const; + ::emboss::support::Maybe has_four_byte() const; public: - [[nodiscard]] typename ::emboss::support::GenericArrayView< + typename ::emboss::support::GenericArrayView< typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<40, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock::template OffsetStorageType>, 40>> @@ -6125,10 +6160,10 @@ class GenericArraySizesView final { 8 > five_byte() const; - [[nodiscard]] ::emboss::support::Maybe has_five_byte() const; + ::emboss::support::Maybe has_five_byte() const; public: - [[nodiscard]] typename ::emboss::support::GenericArrayView< + typename ::emboss::support::GenericArrayView< typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<48, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock::template OffsetStorageType>, 48>> @@ -6137,10 +6172,10 @@ class GenericArraySizesView final { 8 > six_byte() const; - [[nodiscard]] ::emboss::support::Maybe has_six_byte() const; + ::emboss::support::Maybe has_six_byte() const; public: - [[nodiscard]] typename ::emboss::support::GenericArrayView< + typename ::emboss::support::GenericArrayView< typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<56, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock::template OffsetStorageType>, 56>> @@ -6149,10 +6184,10 @@ class GenericArraySizesView final { 8 > seven_byte() const; - [[nodiscard]] ::emboss::support::Maybe has_seven_byte() const; + ::emboss::support::Maybe has_seven_byte() const; public: - [[nodiscard]] typename ::emboss::support::GenericArrayView< + typename ::emboss::support::GenericArrayView< typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<64, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock::template OffsetStorageType>, 64>> @@ -6161,7 +6196,7 @@ class GenericArraySizesView final { 8 > eight_byte() const; - [[nodiscard]] ::emboss::support::Maybe has_eight_byte() const; + ::emboss::support::Maybe has_eight_byte() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -6177,9 +6212,9 @@ class GenericArraySizesView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -6188,13 +6223,13 @@ class GenericArraySizesView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -6212,9 +6247,9 @@ class GenericArraySizesView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -6223,13 +6258,13 @@ class GenericArraySizesView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -6247,9 +6282,9 @@ class GenericArraySizesView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -6258,13 +6293,13 @@ class GenericArraySizesView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -6295,7 +6330,7 @@ struct EmbossReservedInternalIsGenericArraySizesView< }; template -[[nodiscard]] inline GenericArraySizesView< +inline GenericArraySizesView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -6310,7 +6345,7 @@ MakeArraySizesView( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericArraySizesView> +inline GenericArraySizesView> MakeArraySizesView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericArraySizesView>( @@ -6319,7 +6354,7 @@ MakeArraySizesView( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericArraySizesView< +inline GenericArraySizesView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedArraySizesView( T *emboss_reserved_local_data, diff --git a/testdata/golden_cpp/virtual_field.emb.h b/testdata/golden_cpp/virtual_field.emb.h index 81804fd..4a632ee 100644 --- a/testdata/golden_cpp/virtual_field.emb.h +++ b/testdata/golden_cpp/virtual_field.emb.h @@ -250,49 +250,57 @@ class GenericStructureWithConstantsView final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; - { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!ten().Ok()) return false; - if (!twenty().Ok()) return false; - if (!four_billion().Ok()) return false; - if (!ten_billion().Ok()) return false; - if (!minus_ten_billion().Ok()) return false; - if (!value().Ok()) return false; - if (!alias_of_value().Ok()) return false; - if (!alias_of_alias_of_value().Ok()) return false; - if (!alias_of_ten().Ok()) return false; - if (!alias_of_alias_of_ten().Ok()) return false; - if (!IntrinsicSizeInBytes().Ok()) return false; - if (!MaxSizeInBytes().Ok()) return false; - if (!MinSizeInBytes().Ok()) return false; - } - } + if (!ten().Ok()) return false; + + if (!twenty().Ok()) return false; + + if (!four_billion().Ok()) return false; + + if (!ten_billion().Ok()) return false; + + if (!minus_ten_billion().Ok()) return false; + + if (!value().Ok()) return false; + + if (!alias_of_value().Ok()) return false; + + if (!alias_of_alias_of_value().Ok()) return false; + + if (!alias_of_ten().Ok()) return false; + + if (!alias_of_alias_of_ten().Ok()) return false; + + if (!IntrinsicSizeInBytes().Ok()) return false; + + if (!MaxSizeInBytes().Ok()) return false; + + if (!MinSizeInBytes().Ok()) return false; + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { + static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - [[nodiscard]] static constexpr bool SizeIsKnown() { + static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericStructureWithConstantsView emboss_reserved_local_other) const { if (!has_value().Known()) return false; @@ -313,7 +321,7 @@ class GenericStructureWithConstantsView final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericStructureWithConstantsView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_value().ValueOr(false) && @@ -346,7 +354,7 @@ class GenericStructureWithConstantsView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericStructureWithConstantsView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -650,7 +658,7 @@ class GenericStructureWithConstantsView final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: class EmbossReservedVirtualTenView final { @@ -666,9 +674,9 @@ class GenericStructureWithConstantsView final { default; ~EmbossReservedVirtualTenView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -677,13 +685,13 @@ class GenericStructureWithConstantsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedVirtualTenView ten() { + static constexpr EmbossReservedVirtualTenView ten() { return EmbossReservedVirtualTenView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_ten() { + static constexpr ::emboss::support::Maybe has_ten() { return ::emboss::support::Maybe(true); } @@ -701,9 +709,9 @@ class GenericStructureWithConstantsView final { default; ~EmbossReservedVirtualTwentyView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -712,13 +720,13 @@ class GenericStructureWithConstantsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedVirtualTwentyView twenty() { + static constexpr EmbossReservedVirtualTwentyView twenty() { return EmbossReservedVirtualTwentyView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_twenty() { + static constexpr ::emboss::support::Maybe has_twenty() { return ::emboss::support::Maybe(true); } @@ -736,9 +744,9 @@ class GenericStructureWithConstantsView final { default; ~EmbossReservedVirtualFourBillionView() = default; - [[nodiscard]] static constexpr ::std::uint32_t Read(); - [[nodiscard]] static constexpr ::std::uint32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::uint32_t Read(); + static constexpr ::std::uint32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -747,13 +755,13 @@ class GenericStructureWithConstantsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedVirtualFourBillionView four_billion() { + static constexpr EmbossReservedVirtualFourBillionView four_billion() { return EmbossReservedVirtualFourBillionView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_four_billion() { + static constexpr ::emboss::support::Maybe has_four_billion() { return ::emboss::support::Maybe(true); } @@ -771,9 +779,9 @@ class GenericStructureWithConstantsView final { default; ~EmbossReservedVirtualTenBillionView() = default; - [[nodiscard]] static constexpr ::std::int64_t Read(); - [[nodiscard]] static constexpr ::std::int64_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int64_t Read(); + static constexpr ::std::int64_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -782,13 +790,13 @@ class GenericStructureWithConstantsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedVirtualTenBillionView ten_billion() { + static constexpr EmbossReservedVirtualTenBillionView ten_billion() { return EmbossReservedVirtualTenBillionView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_ten_billion() { + static constexpr ::emboss::support::Maybe has_ten_billion() { return ::emboss::support::Maybe(true); } @@ -806,9 +814,9 @@ class GenericStructureWithConstantsView final { default; ~EmbossReservedVirtualMinusTenBillionView() = default; - [[nodiscard]] static constexpr ::std::int64_t Read(); - [[nodiscard]] static constexpr ::std::int64_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int64_t Read(); + static constexpr ::std::int64_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -817,37 +825,37 @@ class GenericStructureWithConstantsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedVirtualMinusTenBillionView minus_ten_billion() { + static constexpr EmbossReservedVirtualMinusTenBillionView minus_ten_billion() { return EmbossReservedVirtualMinusTenBillionView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_minus_ten_billion() { + static constexpr ::emboss::support::Maybe has_minus_ten_billion() { return ::emboss::support::Maybe(true); } public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 32>> value() const; - [[nodiscard]] ::emboss::support::Maybe has_value() const; + ::emboss::support::Maybe has_value() const; public: - [[nodiscard]] auto alias_of_value() const -> decltype(this->value()) { + auto alias_of_value() const -> decltype(this->value()) { return has_alias_of_value().ValueOrDefault() ? value() : decltype(this->value())(); } - [[nodiscard]] ::emboss::support::Maybe has_alias_of_value() const; + ::emboss::support::Maybe has_alias_of_value() const; public: - [[nodiscard]] auto alias_of_alias_of_value() const -> decltype(this->alias_of_value()) { + auto alias_of_alias_of_value() const -> decltype(this->alias_of_value()) { return has_alias_of_alias_of_value().ValueOrDefault() ? alias_of_value() : decltype(this->alias_of_value())(); } - [[nodiscard]] ::emboss::support::Maybe has_alias_of_alias_of_value() const; + ::emboss::support::Maybe has_alias_of_alias_of_value() const; public: class EmbossReservedVirtualAliasOfTenView final { @@ -863,9 +871,9 @@ class GenericStructureWithConstantsView final { default; ~EmbossReservedVirtualAliasOfTenView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -874,13 +882,13 @@ class GenericStructureWithConstantsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedVirtualAliasOfTenView alias_of_ten() { + static constexpr EmbossReservedVirtualAliasOfTenView alias_of_ten() { return EmbossReservedVirtualAliasOfTenView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_alias_of_ten() { + static constexpr ::emboss::support::Maybe has_alias_of_ten() { return ::emboss::support::Maybe(true); } @@ -898,9 +906,9 @@ class GenericStructureWithConstantsView final { default; ~EmbossReservedVirtualAliasOfAliasOfTenView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -909,13 +917,13 @@ class GenericStructureWithConstantsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedVirtualAliasOfAliasOfTenView alias_of_alias_of_ten() { + static constexpr EmbossReservedVirtualAliasOfAliasOfTenView alias_of_alias_of_ten() { return EmbossReservedVirtualAliasOfAliasOfTenView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_alias_of_alias_of_ten() { + static constexpr ::emboss::support::Maybe has_alias_of_alias_of_ten() { return ::emboss::support::Maybe(true); } @@ -933,9 +941,9 @@ class GenericStructureWithConstantsView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -944,13 +952,13 @@ class GenericStructureWithConstantsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -968,9 +976,9 @@ class GenericStructureWithConstantsView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -979,13 +987,13 @@ class GenericStructureWithConstantsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -1003,9 +1011,9 @@ class GenericStructureWithConstantsView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -1014,13 +1022,13 @@ class GenericStructureWithConstantsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -1051,7 +1059,7 @@ struct EmbossReservedInternalIsGenericStructureWithConstantsView< }; template -[[nodiscard]] inline GenericStructureWithConstantsView< +inline GenericStructureWithConstantsView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -1066,7 +1074,7 @@ MakeStructureWithConstantsView( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericStructureWithConstantsView> +inline GenericStructureWithConstantsView> MakeStructureWithConstantsView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericStructureWithConstantsView>( @@ -1075,7 +1083,7 @@ MakeStructureWithConstantsView( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericStructureWithConstantsView< +inline GenericStructureWithConstantsView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedStructureWithConstantsView( T *emboss_reserved_local_data, @@ -1146,46 +1154,51 @@ class GenericStructureWithComputedValuesView final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; - { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!value().Ok()) return false; - if (!doubled().Ok()) return false; - if (!plus_ten().Ok()) return false; - if (!value2().Ok()) return false; - if (!signed_doubled().Ok()) return false; - if (!signed_plus_ten().Ok()) return false; - if (!product().Ok()) return false; - if (!IntrinsicSizeInBytes().Ok()) return false; - if (!MaxSizeInBytes().Ok()) return false; - if (!MinSizeInBytes().Ok()) return false; - } - } + if (!value().Ok()) return false; + + if (!doubled().Ok()) return false; + + if (!plus_ten().Ok()) return false; + + if (!value2().Ok()) return false; + + if (!signed_doubled().Ok()) return false; + + if (!signed_plus_ten().Ok()) return false; + + if (!product().Ok()) return false; + + if (!IntrinsicSizeInBytes().Ok()) return false; + + if (!MaxSizeInBytes().Ok()) return false; + + if (!MinSizeInBytes().Ok()) return false; + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { + static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - [[nodiscard]] static constexpr bool SizeIsKnown() { + static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericStructureWithComputedValuesView emboss_reserved_local_other) const { if (!has_value().Known()) return false; @@ -1223,7 +1236,7 @@ class GenericStructureWithComputedValuesView final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericStructureWithComputedValuesView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_value().ValueOr(false) && @@ -1270,7 +1283,7 @@ class GenericStructureWithComputedValuesView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericStructureWithComputedValuesView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -1536,15 +1549,15 @@ class GenericStructureWithComputedValuesView final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 32>> value() const; - [[nodiscard]] ::emboss::support::Maybe has_value() const; + ::emboss::support::Maybe has_value() const; public: class EmbossReservedVirtualDoubledView final { @@ -1563,17 +1576,17 @@ class GenericStructureWithComputedValuesView final { default; ~EmbossReservedVirtualDoubledView() = default; - [[nodiscard]] ::std::int64_t Read() const { + ::std::int64_t Read() const { EMBOSS_CHECK(view_.has_doubled().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - [[nodiscard]] ::std::int64_t UncheckedRead() const { + ::std::int64_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - [[nodiscard]] bool Ok() const { + bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -1586,12 +1599,12 @@ class GenericStructureWithComputedValuesView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } private: - [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { + ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.value(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Product(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(2LL))); @@ -1599,7 +1612,7 @@ class GenericStructureWithComputedValuesView final { return emboss_reserved_local_subexpr_3; } - [[nodiscard]] static constexpr bool ValueIsOk( + static constexpr bool ValueIsOk( ::std::int64_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -1607,8 +1620,8 @@ class GenericStructureWithComputedValuesView final { const GenericStructureWithComputedValuesView view_; }; - [[nodiscard]] EmbossReservedVirtualDoubledView doubled() const; - [[nodiscard]] ::emboss::support::Maybe has_doubled() const; + EmbossReservedVirtualDoubledView doubled() const; + ::emboss::support::Maybe has_doubled() const; public: class EmbossReservedVirtualPlusTenView final { @@ -1627,17 +1640,17 @@ class GenericStructureWithComputedValuesView final { default; ~EmbossReservedVirtualPlusTenView() = default; - [[nodiscard]] ::std::int64_t Read() const { + ::std::int64_t Read() const { EMBOSS_CHECK(view_.has_plus_ten().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - [[nodiscard]] ::std::int64_t UncheckedRead() const { + ::std::int64_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - [[nodiscard]] bool Ok() const { + bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -1650,9 +1663,9 @@ class GenericStructureWithComputedValuesView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } - [[nodiscard]] bool TryToWrite(::std::int64_t emboss_reserved_local_value) { + bool TryToWrite(::std::int64_t emboss_reserved_local_value) { const auto emboss_reserved_local_maybe_new_value = ::emboss::support::Difference(::emboss::support::Maybe(emboss_reserved_local_value), ::emboss::support::Maybe(static_cast(10LL))); if (!CouldWriteValue(emboss_reserved_local_value)) return false; return view_.value().TryToWrite( @@ -1666,7 +1679,7 @@ class GenericStructureWithComputedValuesView final { void UncheckedWrite(::std::int64_t emboss_reserved_local_value) { view_.value().UncheckedWrite((::emboss::support::Difference(::emboss::support::Maybe(emboss_reserved_local_value), ::emboss::support::Maybe(static_cast(10LL)))).ValueOrDefault()); } - [[nodiscard]] bool CouldWriteValue(::std::int64_t emboss_reserved_local_value) { + bool CouldWriteValue(::std::int64_t emboss_reserved_local_value) { if (!ValueIsOk(emboss_reserved_local_value)) return false; const auto emboss_reserved_local_maybe_new_value = ::emboss::support::Difference(::emboss::support::Maybe(emboss_reserved_local_value), ::emboss::support::Maybe(static_cast(10LL))); if (!emboss_reserved_local_maybe_new_value.Known()) return false; @@ -1682,7 +1695,7 @@ class GenericStructureWithComputedValuesView final { private: - [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { + ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.value(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Sum(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(10LL))); @@ -1690,7 +1703,7 @@ class GenericStructureWithComputedValuesView final { return emboss_reserved_local_subexpr_3; } - [[nodiscard]] static constexpr bool ValueIsOk( + static constexpr bool ValueIsOk( ::std::int64_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -1698,16 +1711,16 @@ class GenericStructureWithComputedValuesView final { const GenericStructureWithComputedValuesView view_; }; - [[nodiscard]] EmbossReservedVirtualPlusTenView plus_ten() const; - [[nodiscard]] ::emboss::support::Maybe has_plus_ten() const; + EmbossReservedVirtualPlusTenView plus_ten() const; + ::emboss::support::Maybe has_plus_ten() const; public: - [[nodiscard]] typename ::emboss::prelude::IntView< + typename ::emboss::prelude::IntView< /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 32>> value2() const; - [[nodiscard]] ::emboss::support::Maybe has_value2() const; + ::emboss::support::Maybe has_value2() const; public: class EmbossReservedVirtualSignedDoubledView final { @@ -1726,17 +1739,17 @@ class GenericStructureWithComputedValuesView final { default; ~EmbossReservedVirtualSignedDoubledView() = default; - [[nodiscard]] ::std::int64_t Read() const { + ::std::int64_t Read() const { EMBOSS_CHECK(view_.has_signed_doubled().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - [[nodiscard]] ::std::int64_t UncheckedRead() const { + ::std::int64_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - [[nodiscard]] bool Ok() const { + bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -1749,12 +1762,12 @@ class GenericStructureWithComputedValuesView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } private: - [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { + ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.value2(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Product(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(2LL))); @@ -1762,7 +1775,7 @@ class GenericStructureWithComputedValuesView final { return emboss_reserved_local_subexpr_3; } - [[nodiscard]] static constexpr bool ValueIsOk( + static constexpr bool ValueIsOk( ::std::int64_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -1770,8 +1783,8 @@ class GenericStructureWithComputedValuesView final { const GenericStructureWithComputedValuesView view_; }; - [[nodiscard]] EmbossReservedVirtualSignedDoubledView signed_doubled() const; - [[nodiscard]] ::emboss::support::Maybe has_signed_doubled() const; + EmbossReservedVirtualSignedDoubledView signed_doubled() const; + ::emboss::support::Maybe has_signed_doubled() const; public: class EmbossReservedVirtualSignedPlusTenView final { @@ -1790,17 +1803,17 @@ class GenericStructureWithComputedValuesView final { default; ~EmbossReservedVirtualSignedPlusTenView() = default; - [[nodiscard]] ::std::int64_t Read() const { + ::std::int64_t Read() const { EMBOSS_CHECK(view_.has_signed_plus_ten().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - [[nodiscard]] ::std::int64_t UncheckedRead() const { + ::std::int64_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - [[nodiscard]] bool Ok() const { + bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -1813,9 +1826,9 @@ class GenericStructureWithComputedValuesView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } - [[nodiscard]] bool TryToWrite(::std::int64_t emboss_reserved_local_value) { + bool TryToWrite(::std::int64_t emboss_reserved_local_value) { const auto emboss_reserved_local_maybe_new_value = ::emboss::support::Difference(::emboss::support::Maybe(emboss_reserved_local_value), ::emboss::support::Maybe(static_cast(10LL))); if (!CouldWriteValue(emboss_reserved_local_value)) return false; return view_.value2().TryToWrite( @@ -1829,7 +1842,7 @@ class GenericStructureWithComputedValuesView final { void UncheckedWrite(::std::int64_t emboss_reserved_local_value) { view_.value2().UncheckedWrite((::emboss::support::Difference(::emboss::support::Maybe(emboss_reserved_local_value), ::emboss::support::Maybe(static_cast(10LL)))).ValueOrDefault()); } - [[nodiscard]] bool CouldWriteValue(::std::int64_t emboss_reserved_local_value) { + bool CouldWriteValue(::std::int64_t emboss_reserved_local_value) { if (!ValueIsOk(emboss_reserved_local_value)) return false; const auto emboss_reserved_local_maybe_new_value = ::emboss::support::Difference(::emboss::support::Maybe(emboss_reserved_local_value), ::emboss::support::Maybe(static_cast(10LL))); if (!emboss_reserved_local_maybe_new_value.Known()) return false; @@ -1845,7 +1858,7 @@ class GenericStructureWithComputedValuesView final { private: - [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { + ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.value2(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Sum(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(10LL))); @@ -1853,7 +1866,7 @@ class GenericStructureWithComputedValuesView final { return emboss_reserved_local_subexpr_3; } - [[nodiscard]] static constexpr bool ValueIsOk( + static constexpr bool ValueIsOk( ::std::int64_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -1861,8 +1874,8 @@ class GenericStructureWithComputedValuesView final { const GenericStructureWithComputedValuesView view_; }; - [[nodiscard]] EmbossReservedVirtualSignedPlusTenView signed_plus_ten() const; - [[nodiscard]] ::emboss::support::Maybe has_signed_plus_ten() const; + EmbossReservedVirtualSignedPlusTenView signed_plus_ten() const; + ::emboss::support::Maybe has_signed_plus_ten() const; public: class EmbossReservedVirtualProductView final { @@ -1881,17 +1894,17 @@ class GenericStructureWithComputedValuesView final { default; ~EmbossReservedVirtualProductView() = default; - [[nodiscard]] ::std::int64_t Read() const { + ::std::int64_t Read() const { EMBOSS_CHECK(view_.has_product().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - [[nodiscard]] ::std::int64_t UncheckedRead() const { + ::std::int64_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - [[nodiscard]] bool Ok() const { + bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -1904,12 +1917,12 @@ class GenericStructureWithComputedValuesView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } private: - [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { + ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.value(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = view_.value2(); @@ -1919,7 +1932,7 @@ class GenericStructureWithComputedValuesView final { return emboss_reserved_local_subexpr_5; } - [[nodiscard]] static constexpr bool ValueIsOk( + static constexpr bool ValueIsOk( ::std::int64_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -1927,8 +1940,8 @@ class GenericStructureWithComputedValuesView final { const GenericStructureWithComputedValuesView view_; }; - [[nodiscard]] EmbossReservedVirtualProductView product() const; - [[nodiscard]] ::emboss::support::Maybe has_product() const; + EmbossReservedVirtualProductView product() const; + ::emboss::support::Maybe has_product() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -1944,9 +1957,9 @@ class GenericStructureWithComputedValuesView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -1955,13 +1968,13 @@ class GenericStructureWithComputedValuesView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -1979,9 +1992,9 @@ class GenericStructureWithComputedValuesView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -1990,13 +2003,13 @@ class GenericStructureWithComputedValuesView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -2014,9 +2027,9 @@ class GenericStructureWithComputedValuesView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -2025,13 +2038,13 @@ class GenericStructureWithComputedValuesView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -2062,7 +2075,7 @@ struct EmbossReservedInternalIsGenericStructureWithComputedValuesView< }; template -[[nodiscard]] inline GenericStructureWithComputedValuesView< +inline GenericStructureWithComputedValuesView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -2077,7 +2090,7 @@ MakeStructureWithComputedValuesView( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericStructureWithComputedValuesView> +inline GenericStructureWithComputedValuesView> MakeStructureWithComputedValuesView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericStructureWithComputedValuesView>( @@ -2086,7 +2099,7 @@ MakeStructureWithComputedValuesView( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericStructureWithComputedValuesView< +inline GenericStructureWithComputedValuesView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedStructureWithComputedValuesView( T *emboss_reserved_local_data, @@ -2153,51 +2166,55 @@ class GenericStructureWithConditionalValueView final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; const auto emboss_reserved_local_ok_subexpr_1 = x(); const auto emboss_reserved_local_ok_subexpr_2 = (emboss_reserved_local_ok_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_ok_subexpr_3 = ::emboss::support::LessThan(emboss_reserved_local_ok_subexpr_2, ::emboss::support::Maybe(static_cast(2147483648ULL))); + if (!x().Ok()) return false; + + if (!x_plus_one().Ok()) return false; + + if (!IntrinsicSizeInBytes().Ok()) return false; + + if (!MaxSizeInBytes().Ok()) return false; + + if (!MinSizeInBytes().Ok()) return false; + { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!x().Ok()) return false; - if (!x_plus_one().Ok()) return false; - if (!IntrinsicSizeInBytes().Ok()) return false; - if (!MaxSizeInBytes().Ok()) return false; - if (!MinSizeInBytes().Ok()) return false; - } - } - { + const auto emboss_reserved_cond = emboss_reserved_local_ok_subexpr_3; if (!emboss_reserved_cond.Known()) return false; if (emboss_reserved_cond.ValueOrDefault()) { if (!two_x().Ok()) return false; + + } } + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { + static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - [[nodiscard]] static constexpr bool SizeIsKnown() { + static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericStructureWithConditionalValueView emboss_reserved_local_other) const { if (!has_x().Known()) return false; @@ -2218,7 +2235,7 @@ class GenericStructureWithConditionalValueView final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericStructureWithConditionalValueView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_x().ValueOr(false) && @@ -2251,7 +2268,7 @@ class GenericStructureWithConditionalValueView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericStructureWithConditionalValueView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -2403,15 +2420,15 @@ class GenericStructureWithConditionalValueView final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 32>> x() const; - [[nodiscard]] ::emboss::support::Maybe has_x() const; + ::emboss::support::Maybe has_x() const; public: class EmbossReservedVirtualTwoXView final { @@ -2430,17 +2447,17 @@ class GenericStructureWithConditionalValueView final { default; ~EmbossReservedVirtualTwoXView() = default; - [[nodiscard]] ::std::int64_t Read() const { + ::std::int64_t Read() const { EMBOSS_CHECK(view_.has_two_x().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - [[nodiscard]] ::std::int64_t UncheckedRead() const { + ::std::int64_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - [[nodiscard]] bool Ok() const { + bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -2453,12 +2470,12 @@ class GenericStructureWithConditionalValueView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } private: - [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { + ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.x(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Product(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(2LL))); @@ -2466,7 +2483,7 @@ class GenericStructureWithConditionalValueView final { return emboss_reserved_local_subexpr_3; } - [[nodiscard]] static constexpr bool ValueIsOk( + static constexpr bool ValueIsOk( ::std::int64_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -2474,8 +2491,8 @@ class GenericStructureWithConditionalValueView final { const GenericStructureWithConditionalValueView view_; }; - [[nodiscard]] EmbossReservedVirtualTwoXView two_x() const; - [[nodiscard]] ::emboss::support::Maybe has_two_x() const; + EmbossReservedVirtualTwoXView two_x() const; + ::emboss::support::Maybe has_two_x() const; public: class EmbossReservedVirtualXPlusOneView final { @@ -2494,17 +2511,17 @@ class GenericStructureWithConditionalValueView final { default; ~EmbossReservedVirtualXPlusOneView() = default; - [[nodiscard]] ::std::int64_t Read() const { + ::std::int64_t Read() const { EMBOSS_CHECK(view_.has_x_plus_one().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - [[nodiscard]] ::std::int64_t UncheckedRead() const { + ::std::int64_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - [[nodiscard]] bool Ok() const { + bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -2517,9 +2534,9 @@ class GenericStructureWithConditionalValueView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } - [[nodiscard]] bool TryToWrite(::std::int64_t emboss_reserved_local_value) { + bool TryToWrite(::std::int64_t emboss_reserved_local_value) { const auto emboss_reserved_local_maybe_new_value = ::emboss::support::Difference(::emboss::support::Maybe(emboss_reserved_local_value), ::emboss::support::Maybe(static_cast(1LL))); if (!CouldWriteValue(emboss_reserved_local_value)) return false; return view_.x().TryToWrite( @@ -2533,7 +2550,7 @@ class GenericStructureWithConditionalValueView final { void UncheckedWrite(::std::int64_t emboss_reserved_local_value) { view_.x().UncheckedWrite((::emboss::support::Difference(::emboss::support::Maybe(emboss_reserved_local_value), ::emboss::support::Maybe(static_cast(1LL)))).ValueOrDefault()); } - [[nodiscard]] bool CouldWriteValue(::std::int64_t emboss_reserved_local_value) { + bool CouldWriteValue(::std::int64_t emboss_reserved_local_value) { if (!ValueIsOk(emboss_reserved_local_value)) return false; const auto emboss_reserved_local_maybe_new_value = ::emboss::support::Difference(::emboss::support::Maybe(emboss_reserved_local_value), ::emboss::support::Maybe(static_cast(1LL))); if (!emboss_reserved_local_maybe_new_value.Known()) return false; @@ -2549,7 +2566,7 @@ class GenericStructureWithConditionalValueView final { private: - [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { + ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.x(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Sum(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(1LL))); @@ -2557,7 +2574,7 @@ class GenericStructureWithConditionalValueView final { return emboss_reserved_local_subexpr_3; } - [[nodiscard]] static constexpr bool ValueIsOk( + static constexpr bool ValueIsOk( ::std::int64_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -2565,8 +2582,8 @@ class GenericStructureWithConditionalValueView final { const GenericStructureWithConditionalValueView view_; }; - [[nodiscard]] EmbossReservedVirtualXPlusOneView x_plus_one() const; - [[nodiscard]] ::emboss::support::Maybe has_x_plus_one() const; + EmbossReservedVirtualXPlusOneView x_plus_one() const; + ::emboss::support::Maybe has_x_plus_one() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -2582,9 +2599,9 @@ class GenericStructureWithConditionalValueView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -2593,13 +2610,13 @@ class GenericStructureWithConditionalValueView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -2617,9 +2634,9 @@ class GenericStructureWithConditionalValueView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -2628,13 +2645,13 @@ class GenericStructureWithConditionalValueView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -2652,9 +2669,9 @@ class GenericStructureWithConditionalValueView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -2663,13 +2680,13 @@ class GenericStructureWithConditionalValueView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -2700,7 +2717,7 @@ struct EmbossReservedInternalIsGenericStructureWithConditionalValueView< }; template -[[nodiscard]] inline GenericStructureWithConditionalValueView< +inline GenericStructureWithConditionalValueView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -2715,7 +2732,7 @@ MakeStructureWithConditionalValueView( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericStructureWithConditionalValueView> +inline GenericStructureWithConditionalValueView> MakeStructureWithConditionalValueView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericStructureWithConditionalValueView>( @@ -2724,7 +2741,7 @@ MakeStructureWithConditionalValueView( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericStructureWithConditionalValueView< +inline GenericStructureWithConditionalValueView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedStructureWithConditionalValueView( T *emboss_reserved_local_data, @@ -2791,50 +2808,54 @@ class GenericStructureWithValueInConditionView final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; const auto emboss_reserved_local_ok_subexpr_1 = two_x(); const auto emboss_reserved_local_ok_subexpr_2 = (emboss_reserved_local_ok_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_ok_subexpr_3 = ::emboss::support::LessThan(emboss_reserved_local_ok_subexpr_2, ::emboss::support::Maybe(static_cast(100LL))); + if (!x().Ok()) return false; + + if (!two_x().Ok()) return false; + + if (!IntrinsicSizeInBytes().Ok()) return false; + + if (!MaxSizeInBytes().Ok()) return false; + + if (!MinSizeInBytes().Ok()) return false; + { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!x().Ok()) return false; - if (!two_x().Ok()) return false; - if (!IntrinsicSizeInBytes().Ok()) return false; - if (!MaxSizeInBytes().Ok()) return false; - if (!MinSizeInBytes().Ok()) return false; - } - } - { + const auto emboss_reserved_cond = emboss_reserved_local_ok_subexpr_3; if (!emboss_reserved_cond.Known()) return false; if (emboss_reserved_cond.ValueOrDefault()) { if (!if_two_x_lt_100().Ok()) return false; + + } } + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - [[nodiscard]] ::std::size_t SizeInBytes() const { + ::std::size_t SizeInBytes() const { return static_cast(IntrinsicSizeInBytes().Read()); } - [[nodiscard]] bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericStructureWithValueInConditionView emboss_reserved_local_other) const { if (!has_x().Known()) return false; @@ -2872,7 +2893,7 @@ class GenericStructureWithValueInConditionView final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericStructureWithValueInConditionView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_x().ValueOr(false) && @@ -2919,7 +2940,7 @@ class GenericStructureWithValueInConditionView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericStructureWithValueInConditionView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -3071,15 +3092,15 @@ class GenericStructureWithValueInConditionView final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 32>> x() const; - [[nodiscard]] ::emboss::support::Maybe has_x() const; + ::emboss::support::Maybe has_x() const; public: class EmbossReservedVirtualTwoXView final { @@ -3098,17 +3119,17 @@ class GenericStructureWithValueInConditionView final { default; ~EmbossReservedVirtualTwoXView() = default; - [[nodiscard]] ::std::int64_t Read() const { + ::std::int64_t Read() const { EMBOSS_CHECK(view_.has_two_x().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - [[nodiscard]] ::std::int64_t UncheckedRead() const { + ::std::int64_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - [[nodiscard]] bool Ok() const { + bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -3121,12 +3142,12 @@ class GenericStructureWithValueInConditionView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } private: - [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { + ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.x(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Product(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(2LL))); @@ -3134,7 +3155,7 @@ class GenericStructureWithValueInConditionView final { return emboss_reserved_local_subexpr_3; } - [[nodiscard]] static constexpr bool ValueIsOk( + static constexpr bool ValueIsOk( ::std::int64_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -3142,16 +3163,16 @@ class GenericStructureWithValueInConditionView final { const GenericStructureWithValueInConditionView view_; }; - [[nodiscard]] EmbossReservedVirtualTwoXView two_x() const; - [[nodiscard]] ::emboss::support::Maybe has_two_x() const; + EmbossReservedVirtualTwoXView two_x() const; + ::emboss::support::Maybe has_two_x() const; public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 32>> if_two_x_lt_100() const; - [[nodiscard]] ::emboss::support::Maybe has_if_two_x_lt_100() const; + ::emboss::support::Maybe has_if_two_x_lt_100() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -3170,17 +3191,17 @@ class GenericStructureWithValueInConditionView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - [[nodiscard]] ::std::int32_t Read() const { + ::std::int32_t Read() const { EMBOSS_CHECK(view_.has_IntrinsicSizeInBytes().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - [[nodiscard]] ::std::int32_t UncheckedRead() const { + ::std::int32_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - [[nodiscard]] bool Ok() const { + bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -3193,12 +3214,12 @@ class GenericStructureWithValueInConditionView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } private: - [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { + ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.two_x(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::LessThan(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(100LL))); @@ -3208,7 +3229,7 @@ class GenericStructureWithValueInConditionView final { return emboss_reserved_local_subexpr_5; } - [[nodiscard]] static constexpr bool ValueIsOk( + static constexpr bool ValueIsOk( ::std::int32_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -3216,8 +3237,8 @@ class GenericStructureWithValueInConditionView final { const GenericStructureWithValueInConditionView view_; }; - [[nodiscard]] EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; - [[nodiscard]] ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; + EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; public: class EmbossReservedDollarVirtualMaxSizeInBytesView final { @@ -3233,9 +3254,9 @@ class GenericStructureWithValueInConditionView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -3244,13 +3265,13 @@ class GenericStructureWithValueInConditionView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -3268,9 +3289,9 @@ class GenericStructureWithValueInConditionView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -3279,13 +3300,13 @@ class GenericStructureWithValueInConditionView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -3316,7 +3337,7 @@ struct EmbossReservedInternalIsGenericStructureWithValueInConditionView< }; template -[[nodiscard]] inline GenericStructureWithValueInConditionView< +inline GenericStructureWithValueInConditionView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -3331,7 +3352,7 @@ MakeStructureWithValueInConditionView( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericStructureWithValueInConditionView> +inline GenericStructureWithValueInConditionView> MakeStructureWithValueInConditionView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericStructureWithValueInConditionView>( @@ -3340,7 +3361,7 @@ MakeStructureWithValueInConditionView( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericStructureWithValueInConditionView< +inline GenericStructureWithValueInConditionView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedStructureWithValueInConditionView( T *emboss_reserved_local_data, @@ -3408,42 +3429,44 @@ class GenericStructureWithValuesInLocationView final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; - { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!x().Ok()) return false; - if (!two_x().Ok()) return false; - if (!offset_two_x().Ok()) return false; - if (!size_two_x().Ok()) return false; - if (!IntrinsicSizeInBytes().Ok()) return false; - if (!MaxSizeInBytes().Ok()) return false; - if (!MinSizeInBytes().Ok()) return false; - } - } + if (!x().Ok()) return false; + + if (!two_x().Ok()) return false; + + if (!offset_two_x().Ok()) return false; + + if (!size_two_x().Ok()) return false; + + if (!IntrinsicSizeInBytes().Ok()) return false; + + if (!MaxSizeInBytes().Ok()) return false; + + if (!MinSizeInBytes().Ok()) return false; + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - [[nodiscard]] ::std::size_t SizeInBytes() const { + ::std::size_t SizeInBytes() const { return static_cast(IntrinsicSizeInBytes().Read()); } - [[nodiscard]] bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericStructureWithValuesInLocationView emboss_reserved_local_other) const { if (!has_x().Known()) return false; @@ -3498,7 +3521,7 @@ class GenericStructureWithValuesInLocationView final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericStructureWithValuesInLocationView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_x().ValueOr(false) && @@ -3559,7 +3582,7 @@ class GenericStructureWithValuesInLocationView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericStructureWithValuesInLocationView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -3749,15 +3772,15 @@ class GenericStructureWithValuesInLocationView final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 32>> x() const; - [[nodiscard]] ::emboss::support::Maybe has_x() const; + ::emboss::support::Maybe has_x() const; public: class EmbossReservedVirtualTwoXView final { @@ -3776,17 +3799,17 @@ class GenericStructureWithValuesInLocationView final { default; ~EmbossReservedVirtualTwoXView() = default; - [[nodiscard]] ::std::int64_t Read() const { + ::std::int64_t Read() const { EMBOSS_CHECK(view_.has_two_x().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - [[nodiscard]] ::std::int64_t UncheckedRead() const { + ::std::int64_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - [[nodiscard]] bool Ok() const { + bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -3799,12 +3822,12 @@ class GenericStructureWithValuesInLocationView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } private: - [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { + ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.x(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Product(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(2LL))); @@ -3812,7 +3835,7 @@ class GenericStructureWithValuesInLocationView final { return emboss_reserved_local_subexpr_3; } - [[nodiscard]] static constexpr bool ValueIsOk( + static constexpr bool ValueIsOk( ::std::int64_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -3820,24 +3843,24 @@ class GenericStructureWithValuesInLocationView final { const GenericStructureWithValuesInLocationView view_; }; - [[nodiscard]] EmbossReservedVirtualTwoXView two_x() const; - [[nodiscard]] ::emboss::support::Maybe has_two_x() const; + EmbossReservedVirtualTwoXView two_x() const; + ::emboss::support::Maybe has_two_x() const; public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 32>> offset_two_x() const; - [[nodiscard]] ::emboss::support::Maybe has_offset_two_x() const; + ::emboss::support::Maybe has_offset_two_x() const; public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 32>> size_two_x() const; - [[nodiscard]] ::emboss::support::Maybe has_size_two_x() const; + ::emboss::support::Maybe has_size_two_x() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -3856,17 +3879,17 @@ class GenericStructureWithValuesInLocationView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - [[nodiscard]] ::std::int64_t Read() const { + ::std::int64_t Read() const { EMBOSS_CHECK(view_.has_IntrinsicSizeInBytes().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - [[nodiscard]] ::std::int64_t UncheckedRead() const { + ::std::int64_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - [[nodiscard]] bool Ok() const { + bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -3879,12 +3902,12 @@ class GenericStructureWithValuesInLocationView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } private: - [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { + ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.two_x(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Sum(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(4LL))); @@ -3896,7 +3919,7 @@ class GenericStructureWithValuesInLocationView final { return emboss_reserved_local_subexpr_7; } - [[nodiscard]] static constexpr bool ValueIsOk( + static constexpr bool ValueIsOk( ::std::int64_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -3904,8 +3927,8 @@ class GenericStructureWithValuesInLocationView final { const GenericStructureWithValuesInLocationView view_; }; - [[nodiscard]] EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; - [[nodiscard]] ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; + EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; public: class EmbossReservedDollarVirtualMaxSizeInBytesView final { @@ -3921,9 +3944,9 @@ class GenericStructureWithValuesInLocationView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int64_t Read(); - [[nodiscard]] static constexpr ::std::int64_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int64_t Read(); + static constexpr ::std::int64_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -3932,13 +3955,13 @@ class GenericStructureWithValuesInLocationView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -3956,9 +3979,9 @@ class GenericStructureWithValuesInLocationView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -3967,13 +3990,13 @@ class GenericStructureWithValuesInLocationView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -4004,7 +4027,7 @@ struct EmbossReservedInternalIsGenericStructureWithValuesInLocationView< }; template -[[nodiscard]] inline GenericStructureWithValuesInLocationView< +inline GenericStructureWithValuesInLocationView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -4019,7 +4042,7 @@ MakeStructureWithValuesInLocationView( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericStructureWithValuesInLocationView> +inline GenericStructureWithValuesInLocationView> MakeStructureWithValuesInLocationView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericStructureWithValuesInLocationView>( @@ -4028,7 +4051,7 @@ MakeStructureWithValuesInLocationView( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericStructureWithValuesInLocationView< +inline GenericStructureWithValuesInLocationView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedStructureWithValuesInLocationView( T *emboss_reserved_local_data, @@ -4094,41 +4117,41 @@ class GenericStructureWithBoolValueView final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; - { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!x().Ok()) return false; - if (!x_is_ten().Ok()) return false; - if (!IntrinsicSizeInBytes().Ok()) return false; - if (!MaxSizeInBytes().Ok()) return false; - if (!MinSizeInBytes().Ok()) return false; - } - } + if (!x().Ok()) return false; + + if (!x_is_ten().Ok()) return false; + + if (!IntrinsicSizeInBytes().Ok()) return false; + + if (!MaxSizeInBytes().Ok()) return false; + + if (!MinSizeInBytes().Ok()) return false; + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { + static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - [[nodiscard]] static constexpr bool SizeIsKnown() { + static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericStructureWithBoolValueView emboss_reserved_local_other) const { if (!has_x().Known()) return false; @@ -4149,7 +4172,7 @@ class GenericStructureWithBoolValueView final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericStructureWithBoolValueView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_x().ValueOr(false) && @@ -4182,7 +4205,7 @@ class GenericStructureWithBoolValueView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericStructureWithBoolValueView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -4296,15 +4319,15 @@ class GenericStructureWithBoolValueView final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 32>> x() const; - [[nodiscard]] ::emboss::support::Maybe has_x() const; + ::emboss::support::Maybe has_x() const; public: class EmbossReservedVirtualXIsTenView final { @@ -4323,17 +4346,17 @@ class GenericStructureWithBoolValueView final { default; ~EmbossReservedVirtualXIsTenView() = default; - [[nodiscard]] bool Read() const { + bool Read() const { EMBOSS_CHECK(view_.has_x_is_ten().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - [[nodiscard]] bool UncheckedRead() const { + bool UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - [[nodiscard]] bool Ok() const { + bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -4346,12 +4369,12 @@ class GenericStructureWithBoolValueView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } private: - [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { + ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.x(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(10LL))); @@ -4359,7 +4382,7 @@ class GenericStructureWithBoolValueView final { return emboss_reserved_local_subexpr_3; } - [[nodiscard]] static constexpr bool ValueIsOk( + static constexpr bool ValueIsOk( bool emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -4367,8 +4390,8 @@ class GenericStructureWithBoolValueView final { const GenericStructureWithBoolValueView view_; }; - [[nodiscard]] EmbossReservedVirtualXIsTenView x_is_ten() const; - [[nodiscard]] ::emboss::support::Maybe has_x_is_ten() const; + EmbossReservedVirtualXIsTenView x_is_ten() const; + ::emboss::support::Maybe has_x_is_ten() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -4384,9 +4407,9 @@ class GenericStructureWithBoolValueView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -4395,13 +4418,13 @@ class GenericStructureWithBoolValueView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -4419,9 +4442,9 @@ class GenericStructureWithBoolValueView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -4430,13 +4453,13 @@ class GenericStructureWithBoolValueView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -4454,9 +4477,9 @@ class GenericStructureWithBoolValueView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -4465,13 +4488,13 @@ class GenericStructureWithBoolValueView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -4502,7 +4525,7 @@ struct EmbossReservedInternalIsGenericStructureWithBoolValueView< }; template -[[nodiscard]] inline GenericStructureWithBoolValueView< +inline GenericStructureWithBoolValueView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -4517,7 +4540,7 @@ MakeStructureWithBoolValueView( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericStructureWithBoolValueView> +inline GenericStructureWithBoolValueView> MakeStructureWithBoolValueView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericStructureWithBoolValueView>( @@ -4526,7 +4549,7 @@ MakeStructureWithBoolValueView( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericStructureWithBoolValueView< +inline GenericStructureWithBoolValueView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedStructureWithBoolValueView( T *emboss_reserved_local_data, @@ -4679,41 +4702,41 @@ class GenericStructureWithEnumValueView final { using Category = ::emboss::test::StructureWithEnumValue::Category; - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; - { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!x().Ok()) return false; - if (!x_size().Ok()) return false; - if (!IntrinsicSizeInBytes().Ok()) return false; - if (!MaxSizeInBytes().Ok()) return false; - if (!MinSizeInBytes().Ok()) return false; - } - } + if (!x().Ok()) return false; + + if (!x_size().Ok()) return false; + + if (!IntrinsicSizeInBytes().Ok()) return false; + + if (!MaxSizeInBytes().Ok()) return false; + + if (!MinSizeInBytes().Ok()) return false; + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { + static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - [[nodiscard]] static constexpr bool SizeIsKnown() { + static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericStructureWithEnumValueView emboss_reserved_local_other) const { if (!has_x().Known()) return false; @@ -4734,7 +4757,7 @@ class GenericStructureWithEnumValueView final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericStructureWithEnumValueView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_x().ValueOr(false) && @@ -4767,7 +4790,7 @@ class GenericStructureWithEnumValueView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericStructureWithEnumValueView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -4881,15 +4904,15 @@ class GenericStructureWithEnumValueView final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 32>> x() const; - [[nodiscard]] ::emboss::support::Maybe has_x() const; + ::emboss::support::Maybe has_x() const; public: class EmbossReservedVirtualXSizeView final { @@ -4908,17 +4931,17 @@ class GenericStructureWithEnumValueView final { default; ~EmbossReservedVirtualXSizeView() = default; - [[nodiscard]] ::emboss::test::StructureWithEnumValue::Category Read() const { + ::emboss::test::StructureWithEnumValue::Category Read() const { EMBOSS_CHECK(view_.has_x_size().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - [[nodiscard]] ::emboss::test::StructureWithEnumValue::Category UncheckedRead() const { + ::emboss::test::StructureWithEnumValue::Category UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - [[nodiscard]] bool Ok() const { + bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -4931,12 +4954,12 @@ class GenericStructureWithEnumValueView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } private: - [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { + ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.x(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::LessThan(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(100LL))); @@ -4945,7 +4968,7 @@ class GenericStructureWithEnumValueView final { return emboss_reserved_local_subexpr_4; } - [[nodiscard]] static constexpr bool ValueIsOk( + static constexpr bool ValueIsOk( ::emboss::test::StructureWithEnumValue::Category emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -4953,8 +4976,8 @@ class GenericStructureWithEnumValueView final { const GenericStructureWithEnumValueView view_; }; - [[nodiscard]] EmbossReservedVirtualXSizeView x_size() const; - [[nodiscard]] ::emboss::support::Maybe has_x_size() const; + EmbossReservedVirtualXSizeView x_size() const; + ::emboss::support::Maybe has_x_size() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -4970,9 +4993,9 @@ class GenericStructureWithEnumValueView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -4981,13 +5004,13 @@ class GenericStructureWithEnumValueView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -5005,9 +5028,9 @@ class GenericStructureWithEnumValueView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -5016,13 +5039,13 @@ class GenericStructureWithEnumValueView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -5040,9 +5063,9 @@ class GenericStructureWithEnumValueView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -5051,13 +5074,13 @@ class GenericStructureWithEnumValueView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -5088,7 +5111,7 @@ struct EmbossReservedInternalIsGenericStructureWithEnumValueView< }; template -[[nodiscard]] inline GenericStructureWithEnumValueView< +inline GenericStructureWithEnumValueView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -5103,7 +5126,7 @@ MakeStructureWithEnumValueView( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericStructureWithEnumValueView> +inline GenericStructureWithEnumValueView> MakeStructureWithEnumValueView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericStructureWithEnumValueView>( @@ -5112,7 +5135,7 @@ MakeStructureWithEnumValueView( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericStructureWithEnumValueView< +inline GenericStructureWithEnumValueView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedStructureWithEnumValueView( T *emboss_reserved_local_data, @@ -5179,42 +5202,43 @@ class GenericStructureWithBitsWithValueView final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; - { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!b().Ok()) return false; - if (!alias_of_b_sum().Ok()) return false; - if (!alias_of_b_a().Ok()) return false; - if (!IntrinsicSizeInBytes().Ok()) return false; - if (!MaxSizeInBytes().Ok()) return false; - if (!MinSizeInBytes().Ok()) return false; - } - } + if (!b().Ok()) return false; + + if (!alias_of_b_sum().Ok()) return false; + + if (!alias_of_b_a().Ok()) return false; + + if (!IntrinsicSizeInBytes().Ok()) return false; + + if (!MaxSizeInBytes().Ok()) return false; + + if (!MinSizeInBytes().Ok()) return false; + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { + static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - [[nodiscard]] static constexpr bool SizeIsKnown() { + static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericStructureWithBitsWithValueView emboss_reserved_local_other) const { if (!has_b().Known()) return false; @@ -5235,7 +5259,7 @@ class GenericStructureWithBitsWithValueView final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericStructureWithBitsWithValueView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_b().ValueOr(false) && @@ -5268,7 +5292,7 @@ class GenericStructureWithBitsWithValueView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericStructureWithBitsWithValueView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -5420,13 +5444,13 @@ class GenericStructureWithBitsWithValueView final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: - [[nodiscard]] typename ::emboss::test::GenericBitsWithValueView>, 32>> + typename ::emboss::test::GenericBitsWithValueView>, 32>> b() const; - [[nodiscard]] ::emboss::support::Maybe has_b() const; + ::emboss::support::Maybe has_b() const; public: class EmbossReservedVirtualAliasOfBSumView final { @@ -5445,17 +5469,17 @@ class GenericStructureWithBitsWithValueView final { default; ~EmbossReservedVirtualAliasOfBSumView() = default; - [[nodiscard]] ::std::int32_t Read() const { + ::std::int32_t Read() const { EMBOSS_CHECK(view_.has_alias_of_b_sum().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - [[nodiscard]] ::std::int32_t UncheckedRead() const { + ::std::int32_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - [[nodiscard]] bool Ok() const { + bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -5468,19 +5492,19 @@ class GenericStructureWithBitsWithValueView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } private: - [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { + ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.b().sum(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); return emboss_reserved_local_subexpr_2; } - [[nodiscard]] static constexpr bool ValueIsOk( + static constexpr bool ValueIsOk( ::std::int32_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -5488,15 +5512,15 @@ class GenericStructureWithBitsWithValueView final { const GenericStructureWithBitsWithValueView view_; }; - [[nodiscard]] EmbossReservedVirtualAliasOfBSumView alias_of_b_sum() const; - [[nodiscard]] ::emboss::support::Maybe has_alias_of_b_sum() const; + EmbossReservedVirtualAliasOfBSumView alias_of_b_sum() const; + ::emboss::support::Maybe has_alias_of_b_sum() const; public: - [[nodiscard]] auto alias_of_b_a() const -> decltype(this->b().a()) { + auto alias_of_b_a() const -> decltype(this->b().a()) { return has_alias_of_b_a().ValueOrDefault() ? b().a() : decltype(this->b().a())(); } - [[nodiscard]] ::emboss::support::Maybe has_alias_of_b_a() const; + ::emboss::support::Maybe has_alias_of_b_a() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -5512,9 +5536,9 @@ class GenericStructureWithBitsWithValueView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -5523,13 +5547,13 @@ class GenericStructureWithBitsWithValueView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -5547,9 +5571,9 @@ class GenericStructureWithBitsWithValueView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -5558,13 +5582,13 @@ class GenericStructureWithBitsWithValueView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -5582,9 +5606,9 @@ class GenericStructureWithBitsWithValueView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -5593,13 +5617,13 @@ class GenericStructureWithBitsWithValueView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -5630,7 +5654,7 @@ struct EmbossReservedInternalIsGenericStructureWithBitsWithValueView< }; template -[[nodiscard]] inline GenericStructureWithBitsWithValueView< +inline GenericStructureWithBitsWithValueView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -5645,7 +5669,7 @@ MakeStructureWithBitsWithValueView( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericStructureWithBitsWithValueView> +inline GenericStructureWithBitsWithValueView> MakeStructureWithBitsWithValueView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericStructureWithBitsWithValueView>( @@ -5654,7 +5678,7 @@ MakeStructureWithBitsWithValueView( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericStructureWithBitsWithValueView< +inline GenericStructureWithBitsWithValueView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedStructureWithBitsWithValueView( T *emboss_reserved_local_data, @@ -5721,42 +5745,43 @@ class GenericBitsWithValueView final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; - { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!a().Ok()) return false; - if (!b().Ok()) return false; - if (!sum().Ok()) return false; - if (!IntrinsicSizeInBits().Ok()) return false; - if (!MaxSizeInBits().Ok()) return false; - if (!MinSizeInBits().Ok()) return false; - } - } + if (!a().Ok()) return false; + + if (!b().Ok()) return false; + + if (!sum().Ok()) return false; + + if (!IntrinsicSizeInBits().Ok()) return false; + + if (!MaxSizeInBits().Ok()) return false; + + if (!MinSizeInBits().Ok()) return false; + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBits().Ok() && backing_.SizeInBits() >= static_cast( IntrinsicSizeInBits().UncheckedRead()); } - [[nodiscard]] static constexpr ::std::size_t SizeInBits() { + static constexpr ::std::size_t SizeInBits() { return static_cast(IntrinsicSizeInBits().Read()); } - [[nodiscard]] static constexpr bool SizeIsKnown() { + static constexpr bool SizeIsKnown() { return IntrinsicSizeInBits().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericBitsWithValueView emboss_reserved_local_other) const { if (!has_a().Known()) return false; @@ -5794,7 +5819,7 @@ class GenericBitsWithValueView final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericBitsWithValueView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_a().ValueOr(false) && @@ -5841,7 +5866,7 @@ class GenericBitsWithValueView final { emboss_reserved_local_other.IntrinsicSizeInBits().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericBitsWithValueView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -5993,23 +6018,23 @@ class GenericBitsWithValueView final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<16, ::emboss::support::AllValuesAreOk>, typename Storage::template OffsetStorageType> a() const; - [[nodiscard]] ::emboss::support::Maybe has_a() const; + ::emboss::support::Maybe has_a() const; public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<16, ::emboss::support::AllValuesAreOk>, typename Storage::template OffsetStorageType> b() const; - [[nodiscard]] ::emboss::support::Maybe has_b() const; + ::emboss::support::Maybe has_b() const; public: class EmbossReservedVirtualSumView final { @@ -6028,17 +6053,17 @@ class GenericBitsWithValueView final { default; ~EmbossReservedVirtualSumView() = default; - [[nodiscard]] ::std::int32_t Read() const { + ::std::int32_t Read() const { EMBOSS_CHECK(view_.has_sum().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - [[nodiscard]] ::std::int32_t UncheckedRead() const { + ::std::int32_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - [[nodiscard]] bool Ok() const { + bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -6051,12 +6076,12 @@ class GenericBitsWithValueView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } private: - [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { + ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.a(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = view_.b(); @@ -6066,7 +6091,7 @@ class GenericBitsWithValueView final { return emboss_reserved_local_subexpr_5; } - [[nodiscard]] static constexpr bool ValueIsOk( + static constexpr bool ValueIsOk( ::std::int32_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -6074,8 +6099,8 @@ class GenericBitsWithValueView final { const GenericBitsWithValueView view_; }; - [[nodiscard]] EmbossReservedVirtualSumView sum() const; - [[nodiscard]] ::emboss::support::Maybe has_sum() const; + EmbossReservedVirtualSumView sum() const; + ::emboss::support::Maybe has_sum() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBitsView final { @@ -6091,9 +6116,9 @@ class GenericBitsWithValueView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBitsView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -6102,13 +6127,13 @@ class GenericBitsWithValueView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBitsView IntrinsicSizeInBits() { + static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBitsView IntrinsicSizeInBits() { return EmbossReservedDollarVirtualIntrinsicSizeInBitsView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBits() { + static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBits() { return ::emboss::support::Maybe(true); } @@ -6126,9 +6151,9 @@ class GenericBitsWithValueView final { default; ~EmbossReservedDollarVirtualMaxSizeInBitsView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -6137,13 +6162,13 @@ class GenericBitsWithValueView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBitsView MaxSizeInBits() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBitsView MaxSizeInBits() { return EmbossReservedDollarVirtualMaxSizeInBitsView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBits() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBits() { return ::emboss::support::Maybe(true); } @@ -6161,9 +6186,9 @@ class GenericBitsWithValueView final { default; ~EmbossReservedDollarVirtualMinSizeInBitsView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -6172,13 +6197,13 @@ class GenericBitsWithValueView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBitsView MinSizeInBits() { + static constexpr EmbossReservedDollarVirtualMinSizeInBitsView MinSizeInBits() { return EmbossReservedDollarVirtualMinSizeInBitsView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBits() { + static constexpr ::emboss::support::Maybe has_MinSizeInBits() { return ::emboss::support::Maybe(true); } @@ -6209,7 +6234,7 @@ struct EmbossReservedInternalIsGenericBitsWithValueView< }; template -[[nodiscard]] inline GenericBitsWithValueView< +inline GenericBitsWithValueView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -6224,7 +6249,7 @@ MakeBitsWithValueView( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericBitsWithValueView> +inline GenericBitsWithValueView> MakeBitsWithValueView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericBitsWithValueView>( @@ -6233,7 +6258,7 @@ MakeBitsWithValueView( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericBitsWithValueView< +inline GenericBitsWithValueView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedBitsWithValueView( T *emboss_reserved_local_data, @@ -6299,41 +6324,41 @@ class GenericStructureUsingForeignConstantsView final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; - { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!x().Ok()) return false; - if (!one_hundred().Ok()) return false; - if (!IntrinsicSizeInBytes().Ok()) return false; - if (!MaxSizeInBytes().Ok()) return false; - if (!MinSizeInBytes().Ok()) return false; - } - } + if (!x().Ok()) return false; + + if (!one_hundred().Ok()) return false; + + if (!IntrinsicSizeInBytes().Ok()) return false; + + if (!MaxSizeInBytes().Ok()) return false; + + if (!MinSizeInBytes().Ok()) return false; + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { + static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - [[nodiscard]] static constexpr bool SizeIsKnown() { + static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericStructureUsingForeignConstantsView emboss_reserved_local_other) const { if (!has_x().Known()) return false; @@ -6354,7 +6379,7 @@ class GenericStructureUsingForeignConstantsView final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericStructureUsingForeignConstantsView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_x().ValueOr(false) && @@ -6387,7 +6412,7 @@ class GenericStructureUsingForeignConstantsView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericStructureUsingForeignConstantsView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -6501,15 +6526,15 @@ class GenericStructureUsingForeignConstantsView final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 32>> x() const; - [[nodiscard]] ::emboss::support::Maybe has_x() const; + ::emboss::support::Maybe has_x() const; public: class EmbossReservedVirtualOneHundredView final { @@ -6525,9 +6550,9 @@ class GenericStructureUsingForeignConstantsView final { default; ~EmbossReservedVirtualOneHundredView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -6536,13 +6561,13 @@ class GenericStructureUsingForeignConstantsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedVirtualOneHundredView one_hundred() { + static constexpr EmbossReservedVirtualOneHundredView one_hundred() { return EmbossReservedVirtualOneHundredView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_one_hundred() { + static constexpr ::emboss::support::Maybe has_one_hundred() { return ::emboss::support::Maybe(true); } @@ -6560,9 +6585,9 @@ class GenericStructureUsingForeignConstantsView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -6571,13 +6596,13 @@ class GenericStructureUsingForeignConstantsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -6595,9 +6620,9 @@ class GenericStructureUsingForeignConstantsView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -6606,13 +6631,13 @@ class GenericStructureUsingForeignConstantsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -6630,9 +6655,9 @@ class GenericStructureUsingForeignConstantsView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -6641,13 +6666,13 @@ class GenericStructureUsingForeignConstantsView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -6678,7 +6703,7 @@ struct EmbossReservedInternalIsGenericStructureUsingForeignConstantsView< }; template -[[nodiscard]] inline GenericStructureUsingForeignConstantsView< +inline GenericStructureUsingForeignConstantsView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -6693,7 +6718,7 @@ MakeStructureUsingForeignConstantsView( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericStructureUsingForeignConstantsView> +inline GenericStructureUsingForeignConstantsView> MakeStructureUsingForeignConstantsView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericStructureUsingForeignConstantsView>( @@ -6702,7 +6727,7 @@ MakeStructureUsingForeignConstantsView( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericStructureUsingForeignConstantsView< +inline GenericStructureUsingForeignConstantsView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedStructureUsingForeignConstantsView( T *emboss_reserved_local_data, @@ -6774,41 +6799,41 @@ class GenericHeaderView final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; - { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!size().Ok()) return false; - if (!message_id().Ok()) return false; - if (!IntrinsicSizeInBytes().Ok()) return false; - if (!MaxSizeInBytes().Ok()) return false; - if (!MinSizeInBytes().Ok()) return false; - } - } + if (!size().Ok()) return false; + + if (!message_id().Ok()) return false; + + if (!IntrinsicSizeInBytes().Ok()) return false; + + if (!MaxSizeInBytes().Ok()) return false; + + if (!MinSizeInBytes().Ok()) return false; + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { + static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - [[nodiscard]] static constexpr bool SizeIsKnown() { + static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericHeaderView emboss_reserved_local_other) const { if (!has_size().Known()) return false; @@ -6846,7 +6871,7 @@ class GenericHeaderView final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericHeaderView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_size().ValueOr(false) && @@ -6893,7 +6918,7 @@ class GenericHeaderView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericHeaderView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -7026,23 +7051,23 @@ class GenericHeaderView final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<16, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 16>> size() const; - [[nodiscard]] ::emboss::support::Maybe has_size() const; + ::emboss::support::Maybe has_size() const; public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<16, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 16>> message_id() const; - [[nodiscard]] ::emboss::support::Maybe has_message_id() const; + ::emboss::support::Maybe has_message_id() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -7058,9 +7083,9 @@ class GenericHeaderView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -7069,13 +7094,13 @@ class GenericHeaderView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -7093,9 +7118,9 @@ class GenericHeaderView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -7104,13 +7129,13 @@ class GenericHeaderView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -7128,9 +7153,9 @@ class GenericHeaderView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -7139,13 +7164,13 @@ class GenericHeaderView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -7176,7 +7201,7 @@ struct EmbossReservedInternalIsGenericHeaderView< }; template -[[nodiscard]] inline GenericHeaderView< +inline GenericHeaderView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -7191,7 +7216,7 @@ MakeHeaderView( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericHeaderView> +inline GenericHeaderView> MakeHeaderView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericHeaderView>( @@ -7200,7 +7225,7 @@ MakeHeaderView( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericHeaderView< +inline GenericHeaderView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedHeaderView( T *emboss_reserved_local_data, @@ -7261,42 +7286,43 @@ class GenericSubfieldOfAliasView final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; - { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!header().Ok()) return false; - if (!h().Ok()) return false; - if (!size().Ok()) return false; - if (!IntrinsicSizeInBytes().Ok()) return false; - if (!MaxSizeInBytes().Ok()) return false; - if (!MinSizeInBytes().Ok()) return false; - } - } + if (!header().Ok()) return false; + + if (!h().Ok()) return false; + + if (!size().Ok()) return false; + + if (!IntrinsicSizeInBytes().Ok()) return false; + + if (!MaxSizeInBytes().Ok()) return false; + + if (!MinSizeInBytes().Ok()) return false; + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { + static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - [[nodiscard]] static constexpr bool SizeIsKnown() { + static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericSubfieldOfAliasView emboss_reserved_local_other) const { if (!has_header().Known()) return false; @@ -7317,7 +7343,7 @@ class GenericSubfieldOfAliasView final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericSubfieldOfAliasView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_header().ValueOr(false) && @@ -7350,7 +7376,7 @@ class GenericSubfieldOfAliasView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericSubfieldOfAliasView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -7521,27 +7547,27 @@ class GenericSubfieldOfAliasView final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: - [[nodiscard]] typename ::emboss::test::SubfieldOfAlias::GenericHeaderView> + typename ::emboss::test::SubfieldOfAlias::GenericHeaderView> header() const; - [[nodiscard]] ::emboss::support::Maybe has_header() const; + ::emboss::support::Maybe has_header() const; public: - [[nodiscard]] auto h() const -> decltype(this->header()) { + auto h() const -> decltype(this->header()) { return has_h().ValueOrDefault() ? header() : decltype(this->header())(); } - [[nodiscard]] ::emboss::support::Maybe has_h() const; + ::emboss::support::Maybe has_h() const; public: - [[nodiscard]] auto size() const -> decltype(this->h().size()) { + auto size() const -> decltype(this->h().size()) { return has_size().ValueOrDefault() ? h().size() : decltype(this->h().size())(); } - [[nodiscard]] ::emboss::support::Maybe has_size() const; + ::emboss::support::Maybe has_size() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -7557,9 +7583,9 @@ class GenericSubfieldOfAliasView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -7568,13 +7594,13 @@ class GenericSubfieldOfAliasView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -7592,9 +7618,9 @@ class GenericSubfieldOfAliasView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -7603,13 +7629,13 @@ class GenericSubfieldOfAliasView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -7627,9 +7653,9 @@ class GenericSubfieldOfAliasView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -7638,13 +7664,13 @@ class GenericSubfieldOfAliasView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -7675,7 +7701,7 @@ struct EmbossReservedInternalIsGenericSubfieldOfAliasView< }; template -[[nodiscard]] inline GenericSubfieldOfAliasView< +inline GenericSubfieldOfAliasView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -7690,7 +7716,7 @@ MakeSubfieldOfAliasView( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericSubfieldOfAliasView> +inline GenericSubfieldOfAliasView> MakeSubfieldOfAliasView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericSubfieldOfAliasView>( @@ -7699,7 +7725,7 @@ MakeSubfieldOfAliasView( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericSubfieldOfAliasView< +inline GenericSubfieldOfAliasView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedSubfieldOfAliasView( T *emboss_reserved_local_data, @@ -7766,51 +7792,55 @@ class GenericRestrictedAliasView final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; const auto emboss_reserved_local_ok_subexpr_1 = alias_switch(); const auto emboss_reserved_local_ok_subexpr_2 = (emboss_reserved_local_ok_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_ok_subexpr_3 = ::emboss::support::GreaterThan(emboss_reserved_local_ok_subexpr_2, ::emboss::support::Maybe(static_cast(10LL))); + if (!a_b().Ok()) return false; + + if (!alias_switch().Ok()) return false; + + if (!IntrinsicSizeInBytes().Ok()) return false; + + if (!MaxSizeInBytes().Ok()) return false; + + if (!MinSizeInBytes().Ok()) return false; + { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!a_b().Ok()) return false; - if (!alias_switch().Ok()) return false; - if (!IntrinsicSizeInBytes().Ok()) return false; - if (!MaxSizeInBytes().Ok()) return false; - if (!MinSizeInBytes().Ok()) return false; - } - } - { + const auto emboss_reserved_cond = emboss_reserved_local_ok_subexpr_3; if (!emboss_reserved_cond.Known()) return false; if (emboss_reserved_cond.ValueOrDefault()) { if (!a_b_alias().Ok()) return false; + + } } + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { + static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - [[nodiscard]] static constexpr bool SizeIsKnown() { + static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericRestrictedAliasView emboss_reserved_local_other) const { if (!has_a_b().Known()) return false; @@ -7848,7 +7878,7 @@ class GenericRestrictedAliasView final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericRestrictedAliasView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_a_b().ValueOr(false) && @@ -7895,7 +7925,7 @@ class GenericRestrictedAliasView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericRestrictedAliasView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -8066,28 +8096,28 @@ class GenericRestrictedAliasView final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: - [[nodiscard]] typename ::emboss::test::GenericBitsWithValueView>, 32>> + typename ::emboss::test::GenericBitsWithValueView>, 32>> a_b() const; - [[nodiscard]] ::emboss::support::Maybe has_a_b() const; + ::emboss::support::Maybe has_a_b() const; public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> alias_switch() const; - [[nodiscard]] ::emboss::support::Maybe has_alias_switch() const; + ::emboss::support::Maybe has_alias_switch() const; public: - [[nodiscard]] auto a_b_alias() const -> decltype(this->a_b()) { + auto a_b_alias() const -> decltype(this->a_b()) { return has_a_b_alias().ValueOrDefault() ? a_b() : decltype(this->a_b())(); } - [[nodiscard]] ::emboss::support::Maybe has_a_b_alias() const; + ::emboss::support::Maybe has_a_b_alias() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -8103,9 +8133,9 @@ class GenericRestrictedAliasView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -8114,13 +8144,13 @@ class GenericRestrictedAliasView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -8138,9 +8168,9 @@ class GenericRestrictedAliasView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -8149,13 +8179,13 @@ class GenericRestrictedAliasView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -8173,9 +8203,9 @@ class GenericRestrictedAliasView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -8184,13 +8214,13 @@ class GenericRestrictedAliasView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -8221,7 +8251,7 @@ struct EmbossReservedInternalIsGenericRestrictedAliasView< }; template -[[nodiscard]] inline GenericRestrictedAliasView< +inline GenericRestrictedAliasView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -8236,7 +8266,7 @@ MakeRestrictedAliasView( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericRestrictedAliasView> +inline GenericRestrictedAliasView> MakeRestrictedAliasView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericRestrictedAliasView>( @@ -8245,7 +8275,7 @@ MakeRestrictedAliasView( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericRestrictedAliasView< +inline GenericRestrictedAliasView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedRestrictedAliasView( T *emboss_reserved_local_data, @@ -8318,49 +8348,52 @@ class GenericXView final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; const auto emboss_reserved_local_ok_subexpr_1 = v(); const auto emboss_reserved_local_ok_subexpr_2 = (emboss_reserved_local_ok_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_ok_subexpr_3 = ::emboss::support::GreaterThan(emboss_reserved_local_ok_subexpr_2, ::emboss::support::Maybe(static_cast(10LL))); + if (!v().Ok()) return false; + + if (!IntrinsicSizeInBytes().Ok()) return false; + + if (!MaxSizeInBytes().Ok()) return false; + + if (!MinSizeInBytes().Ok()) return false; + { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!v().Ok()) return false; - if (!IntrinsicSizeInBytes().Ok()) return false; - if (!MaxSizeInBytes().Ok()) return false; - if (!MinSizeInBytes().Ok()) return false; - } - } - { + const auto emboss_reserved_cond = emboss_reserved_local_ok_subexpr_3; if (!emboss_reserved_cond.Known()) return false; if (emboss_reserved_cond.ValueOrDefault()) { if (!y().Ok()) return false; + + } } + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - [[nodiscard]] ::std::size_t SizeInBytes() const { + ::std::size_t SizeInBytes() const { return static_cast(IntrinsicSizeInBytes().Read()); } - [[nodiscard]] bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericXView emboss_reserved_local_other) const { if (!has_v().Known()) return false; @@ -8398,7 +8431,7 @@ class GenericXView final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericXView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_v().ValueOr(false) && @@ -8445,7 +8478,7 @@ class GenericXView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericXView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -8578,23 +8611,23 @@ class GenericXView final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> v() const; - [[nodiscard]] ::emboss::support::Maybe has_v() const; + ::emboss::support::Maybe has_v() const; public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> y() const; - [[nodiscard]] ::emboss::support::Maybe has_y() const; + ::emboss::support::Maybe has_y() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -8613,17 +8646,17 @@ class GenericXView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - [[nodiscard]] ::std::int32_t Read() const { + ::std::int32_t Read() const { EMBOSS_CHECK(view_.has_IntrinsicSizeInBytes().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - [[nodiscard]] ::std::int32_t UncheckedRead() const { + ::std::int32_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - [[nodiscard]] bool Ok() const { + bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -8636,12 +8669,12 @@ class GenericXView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } private: - [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { + ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.v(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::GreaterThan(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(10LL))); @@ -8651,7 +8684,7 @@ class GenericXView final { return emboss_reserved_local_subexpr_5; } - [[nodiscard]] static constexpr bool ValueIsOk( + static constexpr bool ValueIsOk( ::std::int32_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -8659,8 +8692,8 @@ class GenericXView final { const GenericXView view_; }; - [[nodiscard]] EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; - [[nodiscard]] ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; + EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; public: class EmbossReservedDollarVirtualMaxSizeInBytesView final { @@ -8676,9 +8709,9 @@ class GenericXView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -8687,13 +8720,13 @@ class GenericXView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -8711,9 +8744,9 @@ class GenericXView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -8722,13 +8755,13 @@ class GenericXView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -8759,7 +8792,7 @@ struct EmbossReservedInternalIsGenericXView< }; template -[[nodiscard]] inline GenericXView< +inline GenericXView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -8774,7 +8807,7 @@ MakeXView( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericXView> +inline GenericXView> MakeXView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericXView>( @@ -8783,7 +8816,7 @@ MakeXView( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericXView< +inline GenericXView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedXView( T *emboss_reserved_local_data, @@ -8844,7 +8877,7 @@ class GenericHasFieldView final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; const auto emboss_reserved_local_ok_subexpr_1 = z(); @@ -8853,56 +8886,67 @@ class GenericHasFieldView final { const auto emboss_reserved_local_ok_subexpr_4 = x().has_y(); const auto emboss_reserved_local_ok_subexpr_5 = has_x(); + if (!z().Ok()) return false; + + if (!IntrinsicSizeInBytes().Ok()) return false; + + if (!MaxSizeInBytes().Ok()) return false; + + if (!MinSizeInBytes().Ok()) return false; + { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!z().Ok()) return false; - if (!IntrinsicSizeInBytes().Ok()) return false; - if (!MaxSizeInBytes().Ok()) return false; - if (!MinSizeInBytes().Ok()) return false; - } - } - { + const auto emboss_reserved_cond = emboss_reserved_local_ok_subexpr_3; if (!emboss_reserved_cond.Known()) return false; if (emboss_reserved_cond.ValueOrDefault()) { if (!x().Ok()) return false; + + } } + { + const auto emboss_reserved_cond = emboss_reserved_local_ok_subexpr_4; if (!emboss_reserved_cond.Known()) return false; if (emboss_reserved_cond.ValueOrDefault()) { if (!y().Ok()) return false; + + } } + { + const auto emboss_reserved_cond = emboss_reserved_local_ok_subexpr_5; if (!emboss_reserved_cond.Known()) return false; if (emboss_reserved_cond.ValueOrDefault()) { if (!x_has_y().Ok()) return false; + + } } + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - [[nodiscard]] ::std::size_t SizeInBytes() const { + ::std::size_t SizeInBytes() const { return static_cast(IntrinsicSizeInBytes().Read()); } - [[nodiscard]] bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericHasFieldView emboss_reserved_local_other) const { if (!has_z().Known()) return false; @@ -8940,7 +8984,7 @@ class GenericHasFieldView final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericHasFieldView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_z().ValueOr(false) && @@ -8987,7 +9031,7 @@ class GenericHasFieldView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericHasFieldView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -9177,28 +9221,28 @@ class GenericHasFieldView final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> z() const; - [[nodiscard]] ::emboss::support::Maybe has_z() const; + ::emboss::support::Maybe has_z() const; public: - [[nodiscard]] typename ::emboss::test::HasField::GenericXView> + typename ::emboss::test::HasField::GenericXView> x() const; - [[nodiscard]] ::emboss::support::Maybe has_x() const; + ::emboss::support::Maybe has_x() const; public: - [[nodiscard]] auto y() const -> decltype(this->x().y()) { + auto y() const -> decltype(this->x().y()) { return has_y().ValueOrDefault() ? x().y() : decltype(this->x().y())(); } - [[nodiscard]] ::emboss::support::Maybe has_y() const; + ::emboss::support::Maybe has_y() const; public: class EmbossReservedVirtualXHasYView final { @@ -9217,17 +9261,17 @@ class GenericHasFieldView final { default; ~EmbossReservedVirtualXHasYView() = default; - [[nodiscard]] bool Read() const { + bool Read() const { EMBOSS_CHECK(view_.has_x_has_y().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - [[nodiscard]] bool UncheckedRead() const { + bool UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - [[nodiscard]] bool Ok() const { + bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -9240,18 +9284,18 @@ class GenericHasFieldView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } private: - [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { + ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.x().has_y(); return emboss_reserved_local_subexpr_1; } - [[nodiscard]] static constexpr bool ValueIsOk( + static constexpr bool ValueIsOk( bool emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -9259,8 +9303,8 @@ class GenericHasFieldView final { const GenericHasFieldView view_; }; - [[nodiscard]] EmbossReservedVirtualXHasYView x_has_y() const; - [[nodiscard]] ::emboss::support::Maybe has_x_has_y() const; + EmbossReservedVirtualXHasYView x_has_y() const; + ::emboss::support::Maybe has_x_has_y() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -9279,17 +9323,17 @@ class GenericHasFieldView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - [[nodiscard]] ::std::int32_t Read() const { + ::std::int32_t Read() const { EMBOSS_CHECK(view_.has_IntrinsicSizeInBytes().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - [[nodiscard]] ::std::int32_t UncheckedRead() const { + ::std::int32_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - [[nodiscard]] bool Ok() const { + bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -9302,12 +9346,12 @@ class GenericHasFieldView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } private: - [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { + ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.z(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::GreaterThan(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(10LL))); @@ -9317,7 +9361,7 @@ class GenericHasFieldView final { return emboss_reserved_local_subexpr_5; } - [[nodiscard]] static constexpr bool ValueIsOk( + static constexpr bool ValueIsOk( ::std::int32_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -9325,8 +9369,8 @@ class GenericHasFieldView final { const GenericHasFieldView view_; }; - [[nodiscard]] EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; - [[nodiscard]] ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; + EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; public: class EmbossReservedDollarVirtualMaxSizeInBytesView final { @@ -9342,9 +9386,9 @@ class GenericHasFieldView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -9353,13 +9397,13 @@ class GenericHasFieldView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -9377,9 +9421,9 @@ class GenericHasFieldView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -9388,13 +9432,13 @@ class GenericHasFieldView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -9425,7 +9469,7 @@ struct EmbossReservedInternalIsGenericHasFieldView< }; template -[[nodiscard]] inline GenericHasFieldView< +inline GenericHasFieldView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -9440,7 +9484,7 @@ MakeHasFieldView( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericHasFieldView> +inline GenericHasFieldView> MakeHasFieldView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericHasFieldView>( @@ -9449,7 +9493,7 @@ MakeHasFieldView( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericHasFieldView< +inline GenericHasFieldView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedHasFieldView( T *emboss_reserved_local_data, @@ -9516,51 +9560,55 @@ class GenericVirtualUnconditionallyUsesConditionalView final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; const auto emboss_reserved_local_ok_subexpr_1 = x(); const auto emboss_reserved_local_ok_subexpr_2 = (emboss_reserved_local_ok_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + if (!x().Ok()) return false; + + if (!x_nor_xc().Ok()) return false; + + if (!IntrinsicSizeInBytes().Ok()) return false; + + if (!MaxSizeInBytes().Ok()) return false; + + if (!MinSizeInBytes().Ok()) return false; + { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!x().Ok()) return false; - if (!x_nor_xc().Ok()) return false; - if (!IntrinsicSizeInBytes().Ok()) return false; - if (!MaxSizeInBytes().Ok()) return false; - if (!MinSizeInBytes().Ok()) return false; - } - } - { + const auto emboss_reserved_switch_discrim = emboss_reserved_local_ok_subexpr_2; if (!emboss_reserved_switch_discrim.Known()) return false; switch (emboss_reserved_switch_discrim.ValueOrDefault()) { case static_cast(0LL): if (!xc().Ok()) return false; break; + + } } + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - [[nodiscard]] ::std::size_t SizeInBytes() const { + ::std::size_t SizeInBytes() const { return static_cast(IntrinsicSizeInBytes().Read()); } - [[nodiscard]] bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericVirtualUnconditionallyUsesConditionalView emboss_reserved_local_other) const { if (!has_x().Known()) return false; @@ -9598,7 +9646,7 @@ class GenericVirtualUnconditionallyUsesConditionalView final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericVirtualUnconditionallyUsesConditionalView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_x().ValueOr(false) && @@ -9645,7 +9693,7 @@ class GenericVirtualUnconditionallyUsesConditionalView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericVirtualUnconditionallyUsesConditionalView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -9797,23 +9845,23 @@ class GenericVirtualUnconditionallyUsesConditionalView final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> x() const; - [[nodiscard]] ::emboss::support::Maybe has_x() const; + ::emboss::support::Maybe has_x() const; public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> xc() const; - [[nodiscard]] ::emboss::support::Maybe has_xc() const; + ::emboss::support::Maybe has_xc() const; public: class EmbossReservedVirtualXNorXcView final { @@ -9832,17 +9880,17 @@ class GenericVirtualUnconditionallyUsesConditionalView final { default; ~EmbossReservedVirtualXNorXcView() = default; - [[nodiscard]] bool Read() const { + bool Read() const { EMBOSS_CHECK(view_.has_x_nor_xc().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - [[nodiscard]] bool UncheckedRead() const { + bool UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - [[nodiscard]] bool Ok() const { + bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -9855,12 +9903,12 @@ class GenericVirtualUnconditionallyUsesConditionalView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } private: - [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { + ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.x(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(0LL))); @@ -9872,7 +9920,7 @@ class GenericVirtualUnconditionallyUsesConditionalView final { return emboss_reserved_local_subexpr_7; } - [[nodiscard]] static constexpr bool ValueIsOk( + static constexpr bool ValueIsOk( bool emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -9880,8 +9928,8 @@ class GenericVirtualUnconditionallyUsesConditionalView final { const GenericVirtualUnconditionallyUsesConditionalView view_; }; - [[nodiscard]] EmbossReservedVirtualXNorXcView x_nor_xc() const; - [[nodiscard]] ::emboss::support::Maybe has_x_nor_xc() const; + EmbossReservedVirtualXNorXcView x_nor_xc() const; + ::emboss::support::Maybe has_x_nor_xc() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -9900,17 +9948,17 @@ class GenericVirtualUnconditionallyUsesConditionalView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - [[nodiscard]] ::std::int32_t Read() const { + ::std::int32_t Read() const { EMBOSS_CHECK(view_.has_IntrinsicSizeInBytes().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - [[nodiscard]] ::std::int32_t UncheckedRead() const { + ::std::int32_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - [[nodiscard]] bool Ok() const { + bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -9923,12 +9971,12 @@ class GenericVirtualUnconditionallyUsesConditionalView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } private: - [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { + ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.x(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(0LL))); @@ -9938,7 +9986,7 @@ class GenericVirtualUnconditionallyUsesConditionalView final { return emboss_reserved_local_subexpr_5; } - [[nodiscard]] static constexpr bool ValueIsOk( + static constexpr bool ValueIsOk( ::std::int32_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -9946,8 +9994,8 @@ class GenericVirtualUnconditionallyUsesConditionalView final { const GenericVirtualUnconditionallyUsesConditionalView view_; }; - [[nodiscard]] EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; - [[nodiscard]] ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; + EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; public: class EmbossReservedDollarVirtualMaxSizeInBytesView final { @@ -9963,9 +10011,9 @@ class GenericVirtualUnconditionallyUsesConditionalView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -9974,13 +10022,13 @@ class GenericVirtualUnconditionallyUsesConditionalView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -9998,9 +10046,9 @@ class GenericVirtualUnconditionallyUsesConditionalView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -10009,13 +10057,13 @@ class GenericVirtualUnconditionallyUsesConditionalView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -10046,7 +10094,7 @@ struct EmbossReservedInternalIsGenericVirtualUnconditionallyUsesConditionalView< }; template -[[nodiscard]] inline GenericVirtualUnconditionallyUsesConditionalView< +inline GenericVirtualUnconditionallyUsesConditionalView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -10061,7 +10109,7 @@ MakeVirtualUnconditionallyUsesConditionalView( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericVirtualUnconditionallyUsesConditionalView> +inline GenericVirtualUnconditionallyUsesConditionalView> MakeVirtualUnconditionallyUsesConditionalView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericVirtualUnconditionallyUsesConditionalView>( @@ -10070,7 +10118,7 @@ MakeVirtualUnconditionallyUsesConditionalView( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericVirtualUnconditionallyUsesConditionalView< +inline GenericVirtualUnconditionallyUsesConditionalView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedVirtualUnconditionallyUsesConditionalView( T *emboss_reserved_local_data, @@ -10141,41 +10189,41 @@ class GenericRView final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; - { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!q().Ok()) return false; - if (!IntrinsicSizeInBits().Ok()) return false; - if (!q_plus_bit_size().Ok()) return false; - if (!MaxSizeInBits().Ok()) return false; - if (!MinSizeInBits().Ok()) return false; - } - } + if (!q().Ok()) return false; + + if (!IntrinsicSizeInBits().Ok()) return false; + + if (!q_plus_bit_size().Ok()) return false; + + if (!MaxSizeInBits().Ok()) return false; + + if (!MinSizeInBits().Ok()) return false; + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBits().Ok() && backing_.SizeInBits() >= static_cast( IntrinsicSizeInBits().UncheckedRead()); } - [[nodiscard]] static constexpr ::std::size_t SizeInBits() { + static constexpr ::std::size_t SizeInBits() { return static_cast(IntrinsicSizeInBits().Read()); } - [[nodiscard]] static constexpr bool SizeIsKnown() { + static constexpr bool SizeIsKnown() { return IntrinsicSizeInBits().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericRView emboss_reserved_local_other) const { if (!has_q().Known()) return false; @@ -10196,7 +10244,7 @@ class GenericRView final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericRView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_q().ValueOr(false) && @@ -10229,7 +10277,7 @@ class GenericRView final { emboss_reserved_local_other.IntrinsicSizeInBits().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericRView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -10343,15 +10391,15 @@ class GenericRView final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename Storage::template OffsetStorageType> q() const; - [[nodiscard]] ::emboss::support::Maybe has_q() const; + ::emboss::support::Maybe has_q() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBitsView final { @@ -10367,9 +10415,9 @@ class GenericRView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBitsView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -10378,13 +10426,13 @@ class GenericRView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBitsView IntrinsicSizeInBits() { + static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBitsView IntrinsicSizeInBits() { return EmbossReservedDollarVirtualIntrinsicSizeInBitsView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBits() { + static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBits() { return ::emboss::support::Maybe(true); } @@ -10405,17 +10453,17 @@ class GenericRView final { default; ~EmbossReservedVirtualQPlusBitSizeView() = default; - [[nodiscard]] ::std::int32_t Read() const { + ::std::int32_t Read() const { EMBOSS_CHECK(view_.has_q_plus_bit_size().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - [[nodiscard]] ::std::int32_t UncheckedRead() const { + ::std::int32_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - [[nodiscard]] bool Ok() const { + bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -10428,12 +10476,12 @@ class GenericRView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } private: - [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { + ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.q(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Sum(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(8LL))); @@ -10441,7 +10489,7 @@ class GenericRView final { return emboss_reserved_local_subexpr_3; } - [[nodiscard]] static constexpr bool ValueIsOk( + static constexpr bool ValueIsOk( ::std::int32_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -10449,8 +10497,8 @@ class GenericRView final { const GenericRView view_; }; - [[nodiscard]] EmbossReservedVirtualQPlusBitSizeView q_plus_bit_size() const; - [[nodiscard]] ::emboss::support::Maybe has_q_plus_bit_size() const; + EmbossReservedVirtualQPlusBitSizeView q_plus_bit_size() const; + ::emboss::support::Maybe has_q_plus_bit_size() const; public: class EmbossReservedDollarVirtualMaxSizeInBitsView final { @@ -10466,9 +10514,9 @@ class GenericRView final { default; ~EmbossReservedDollarVirtualMaxSizeInBitsView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -10477,13 +10525,13 @@ class GenericRView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBitsView MaxSizeInBits() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBitsView MaxSizeInBits() { return EmbossReservedDollarVirtualMaxSizeInBitsView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBits() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBits() { return ::emboss::support::Maybe(true); } @@ -10501,9 +10549,9 @@ class GenericRView final { default; ~EmbossReservedDollarVirtualMinSizeInBitsView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -10512,13 +10560,13 @@ class GenericRView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBitsView MinSizeInBits() { + static constexpr EmbossReservedDollarVirtualMinSizeInBitsView MinSizeInBits() { return EmbossReservedDollarVirtualMinSizeInBitsView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBits() { + static constexpr ::emboss::support::Maybe has_MinSizeInBits() { return ::emboss::support::Maybe(true); } @@ -10549,7 +10597,7 @@ struct EmbossReservedInternalIsGenericRView< }; template -[[nodiscard]] inline GenericRView< +inline GenericRView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -10564,7 +10612,7 @@ MakeRView( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericRView> +inline GenericRView> MakeRView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericRView>( @@ -10573,7 +10621,7 @@ MakeRView( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericRView< +inline GenericRView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedRView( T *emboss_reserved_local_data, @@ -10634,41 +10682,41 @@ class GenericUsesSizeView final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; - { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!r().Ok()) return false; - if (!IntrinsicSizeInBytes().Ok()) return false; - if (!r_q_plus_byte_size().Ok()) return false; - if (!MaxSizeInBytes().Ok()) return false; - if (!MinSizeInBytes().Ok()) return false; - } - } + if (!r().Ok()) return false; + + if (!IntrinsicSizeInBytes().Ok()) return false; + + if (!r_q_plus_byte_size().Ok()) return false; + + if (!MaxSizeInBytes().Ok()) return false; + + if (!MinSizeInBytes().Ok()) return false; + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { + static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - [[nodiscard]] static constexpr bool SizeIsKnown() { + static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericUsesSizeView emboss_reserved_local_other) const { if (!has_r().Known()) return false; @@ -10689,7 +10737,7 @@ class GenericUsesSizeView final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericUsesSizeView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_r().ValueOr(false) && @@ -10722,7 +10770,7 @@ class GenericUsesSizeView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericUsesSizeView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -10836,13 +10884,13 @@ class GenericUsesSizeView final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: - [[nodiscard]] typename ::emboss::test::UsesSize::GenericRView>, 8>> + typename ::emboss::test::UsesSize::GenericRView>, 8>> r() const; - [[nodiscard]] ::emboss::support::Maybe has_r() const; + ::emboss::support::Maybe has_r() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -10858,9 +10906,9 @@ class GenericUsesSizeView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -10869,13 +10917,13 @@ class GenericUsesSizeView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -10896,17 +10944,17 @@ class GenericUsesSizeView final { default; ~EmbossReservedVirtualRQPlusByteSizeView() = default; - [[nodiscard]] ::std::int32_t Read() const { + ::std::int32_t Read() const { EMBOSS_CHECK(view_.has_r_q_plus_byte_size().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - [[nodiscard]] ::std::int32_t UncheckedRead() const { + ::std::int32_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - [[nodiscard]] bool Ok() const { + bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -10919,12 +10967,12 @@ class GenericUsesSizeView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } private: - [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { + ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.r().q(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Sum(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(1LL))); @@ -10932,7 +10980,7 @@ class GenericUsesSizeView final { return emboss_reserved_local_subexpr_3; } - [[nodiscard]] static constexpr bool ValueIsOk( + static constexpr bool ValueIsOk( ::std::int32_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -10940,8 +10988,8 @@ class GenericUsesSizeView final { const GenericUsesSizeView view_; }; - [[nodiscard]] EmbossReservedVirtualRQPlusByteSizeView r_q_plus_byte_size() const; - [[nodiscard]] ::emboss::support::Maybe has_r_q_plus_byte_size() const; + EmbossReservedVirtualRQPlusByteSizeView r_q_plus_byte_size() const; + ::emboss::support::Maybe has_r_q_plus_byte_size() const; public: class EmbossReservedDollarVirtualMaxSizeInBytesView final { @@ -10957,9 +11005,9 @@ class GenericUsesSizeView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -10968,13 +11016,13 @@ class GenericUsesSizeView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -10992,9 +11040,9 @@ class GenericUsesSizeView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -11003,13 +11051,13 @@ class GenericUsesSizeView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -11040,7 +11088,7 @@ struct EmbossReservedInternalIsGenericUsesSizeView< }; template -[[nodiscard]] inline GenericUsesSizeView< +inline GenericUsesSizeView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -11055,7 +11103,7 @@ MakeUsesSizeView( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericUsesSizeView> +inline GenericUsesSizeView> MakeUsesSizeView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericUsesSizeView>( @@ -11064,7 +11112,7 @@ MakeUsesSizeView( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericUsesSizeView< +inline GenericUsesSizeView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedUsesSizeView( T *emboss_reserved_local_data, @@ -11130,41 +11178,41 @@ class GenericUsesExternalSizeView final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; - { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!x().Ok()) return false; - if (!y().Ok()) return false; - if (!IntrinsicSizeInBytes().Ok()) return false; - if (!MaxSizeInBytes().Ok()) return false; - if (!MinSizeInBytes().Ok()) return false; - } - } + if (!x().Ok()) return false; + + if (!y().Ok()) return false; + + if (!IntrinsicSizeInBytes().Ok()) return false; + + if (!MaxSizeInBytes().Ok()) return false; + + if (!MinSizeInBytes().Ok()) return false; + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { + static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - [[nodiscard]] static constexpr bool SizeIsKnown() { + static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericUsesExternalSizeView emboss_reserved_local_other) const { if (!has_x().Known()) return false; @@ -11202,7 +11250,7 @@ class GenericUsesExternalSizeView final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericUsesExternalSizeView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_x().ValueOr(false) && @@ -11249,7 +11297,7 @@ class GenericUsesExternalSizeView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericUsesExternalSizeView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -11382,19 +11430,19 @@ class GenericUsesExternalSizeView final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: - [[nodiscard]] typename ::emboss::test::GenericStructureWithConstantsView> + typename ::emboss::test::GenericStructureWithConstantsView> x() const; - [[nodiscard]] ::emboss::support::Maybe has_x() const; + ::emboss::support::Maybe has_x() const; public: - [[nodiscard]] typename ::emboss::test::GenericStructureWithConstantsView> + typename ::emboss::test::GenericStructureWithConstantsView> y() const; - [[nodiscard]] ::emboss::support::Maybe has_y() const; + ::emboss::support::Maybe has_y() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -11410,9 +11458,9 @@ class GenericUsesExternalSizeView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -11421,13 +11469,13 @@ class GenericUsesExternalSizeView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -11445,9 +11493,9 @@ class GenericUsesExternalSizeView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -11456,13 +11504,13 @@ class GenericUsesExternalSizeView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -11480,9 +11528,9 @@ class GenericUsesExternalSizeView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -11491,13 +11539,13 @@ class GenericUsesExternalSizeView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -11528,7 +11576,7 @@ struct EmbossReservedInternalIsGenericUsesExternalSizeView< }; template -[[nodiscard]] inline GenericUsesExternalSizeView< +inline GenericUsesExternalSizeView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -11543,7 +11591,7 @@ MakeUsesExternalSizeView( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericUsesExternalSizeView> +inline GenericUsesExternalSizeView> MakeUsesExternalSizeView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericUsesExternalSizeView>( @@ -11552,7 +11600,7 @@ MakeUsesExternalSizeView( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericUsesExternalSizeView< +inline GenericUsesExternalSizeView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedUsesExternalSizeView( T *emboss_reserved_local_data, @@ -11622,45 +11670,49 @@ class GenericImplicitWriteBackView final { - [[nodiscard]] bool Ok() const { + bool Ok() const { if (!IsComplete()) return false; - { - const auto emboss_reserved_cond = ::emboss::support::Maybe(true); - if (!emboss_reserved_cond.Known()) return false; - if (emboss_reserved_cond.ValueOrDefault()) { - if (!x().Ok()) return false; - if (!x_plus_ten().Ok()) return false; - if (!ten_plus_x().Ok()) return false; - if (!x_minus_ten().Ok()) return false; - if (!ten_minus_x().Ok()) return false; - if (!ten_minus_x_plus_ten().Ok()) return false; - if (!IntrinsicSizeInBytes().Ok()) return false; - if (!MaxSizeInBytes().Ok()) return false; - if (!MinSizeInBytes().Ok()) return false; - } - } + if (!x().Ok()) return false; + + if (!x_plus_ten().Ok()) return false; + + if (!ten_plus_x().Ok()) return false; + + if (!x_minus_ten().Ok()) return false; + + if (!ten_minus_x().Ok()) return false; + + if (!ten_minus_x_plus_ten().Ok()) return false; + + if (!IntrinsicSizeInBytes().Ok()) return false; + + if (!MaxSizeInBytes().Ok()) return false; + + if (!MinSizeInBytes().Ok()) return false; + + return true; } - [[nodiscard]] Storage BackingStorage() const { return backing_; } - [[nodiscard]] bool IsComplete() const { + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { return backing_.Ok() && IntrinsicSizeInBytes().Ok() && backing_.SizeInBytes() >= static_cast( IntrinsicSizeInBytes().UncheckedRead()); } - [[nodiscard]] static constexpr ::std::size_t SizeInBytes() { + static constexpr ::std::size_t SizeInBytes() { return static_cast(IntrinsicSizeInBytes().Read()); } - [[nodiscard]] static constexpr bool SizeIsKnown() { + static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } template - [[nodiscard]] bool Equals( + bool Equals( GenericImplicitWriteBackView emboss_reserved_local_other) const { if (!has_x().Known()) return false; @@ -11681,7 +11733,7 @@ class GenericImplicitWriteBackView final { return true; } template - [[nodiscard]] bool UncheckedEquals( + bool UncheckedEquals( GenericImplicitWriteBackView emboss_reserved_local_other) const { if (emboss_reserved_local_other.has_x().ValueOr(false) && @@ -11714,7 +11766,7 @@ class GenericImplicitWriteBackView final { emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); } template - [[nodiscard]] bool TryToCopyFrom( + bool TryToCopyFrom( GenericImplicitWriteBackView emboss_reserved_local_other) const { return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( emboss_reserved_local_other.BackingStorage(), @@ -11999,15 +12051,15 @@ class GenericImplicitWriteBackView final { - [[nodiscard]] static constexpr bool IsAggregate() { return true; } + static constexpr bool IsAggregate() { return true; } public: - [[nodiscard]] typename ::emboss::prelude::UIntView< + typename ::emboss::prelude::UIntView< /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, typename ::emboss::support::BitBlock>, 8>> x() const; - [[nodiscard]] ::emboss::support::Maybe has_x() const; + ::emboss::support::Maybe has_x() const; public: class EmbossReservedVirtualXPlusTenView final { @@ -12026,17 +12078,17 @@ class GenericImplicitWriteBackView final { default; ~EmbossReservedVirtualXPlusTenView() = default; - [[nodiscard]] ::std::int32_t Read() const { + ::std::int32_t Read() const { EMBOSS_CHECK(view_.has_x_plus_ten().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - [[nodiscard]] ::std::int32_t UncheckedRead() const { + ::std::int32_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - [[nodiscard]] bool Ok() const { + bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -12049,9 +12101,9 @@ class GenericImplicitWriteBackView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } - [[nodiscard]] bool TryToWrite(::std::int32_t emboss_reserved_local_value) { + bool TryToWrite(::std::int32_t emboss_reserved_local_value) { const auto emboss_reserved_local_maybe_new_value = ::emboss::support::Difference(::emboss::support::Maybe(emboss_reserved_local_value), ::emboss::support::Maybe(static_cast(10LL))); if (!CouldWriteValue(emboss_reserved_local_value)) return false; return view_.x().TryToWrite( @@ -12065,7 +12117,7 @@ class GenericImplicitWriteBackView final { void UncheckedWrite(::std::int32_t emboss_reserved_local_value) { view_.x().UncheckedWrite((::emboss::support::Difference(::emboss::support::Maybe(emboss_reserved_local_value), ::emboss::support::Maybe(static_cast(10LL)))).ValueOrDefault()); } - [[nodiscard]] bool CouldWriteValue(::std::int32_t emboss_reserved_local_value) { + bool CouldWriteValue(::std::int32_t emboss_reserved_local_value) { if (!ValueIsOk(emboss_reserved_local_value)) return false; const auto emboss_reserved_local_maybe_new_value = ::emboss::support::Difference(::emboss::support::Maybe(emboss_reserved_local_value), ::emboss::support::Maybe(static_cast(10LL))); if (!emboss_reserved_local_maybe_new_value.Known()) return false; @@ -12081,7 +12133,7 @@ class GenericImplicitWriteBackView final { private: - [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { + ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.x(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Sum(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(10LL))); @@ -12089,7 +12141,7 @@ class GenericImplicitWriteBackView final { return emboss_reserved_local_subexpr_3; } - [[nodiscard]] static constexpr bool ValueIsOk( + static constexpr bool ValueIsOk( ::std::int32_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -12097,8 +12149,8 @@ class GenericImplicitWriteBackView final { const GenericImplicitWriteBackView view_; }; - [[nodiscard]] EmbossReservedVirtualXPlusTenView x_plus_ten() const; - [[nodiscard]] ::emboss::support::Maybe has_x_plus_ten() const; + EmbossReservedVirtualXPlusTenView x_plus_ten() const; + ::emboss::support::Maybe has_x_plus_ten() const; public: class EmbossReservedVirtualTenPlusXView final { @@ -12117,17 +12169,17 @@ class GenericImplicitWriteBackView final { default; ~EmbossReservedVirtualTenPlusXView() = default; - [[nodiscard]] ::std::int32_t Read() const { + ::std::int32_t Read() const { EMBOSS_CHECK(view_.has_ten_plus_x().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - [[nodiscard]] ::std::int32_t UncheckedRead() const { + ::std::int32_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - [[nodiscard]] bool Ok() const { + bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -12140,9 +12192,9 @@ class GenericImplicitWriteBackView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } - [[nodiscard]] bool TryToWrite(::std::int32_t emboss_reserved_local_value) { + bool TryToWrite(::std::int32_t emboss_reserved_local_value) { const auto emboss_reserved_local_maybe_new_value = ::emboss::support::Difference(::emboss::support::Maybe(emboss_reserved_local_value), ::emboss::support::Maybe(static_cast(10LL))); if (!CouldWriteValue(emboss_reserved_local_value)) return false; return view_.x().TryToWrite( @@ -12156,7 +12208,7 @@ class GenericImplicitWriteBackView final { void UncheckedWrite(::std::int32_t emboss_reserved_local_value) { view_.x().UncheckedWrite((::emboss::support::Difference(::emboss::support::Maybe(emboss_reserved_local_value), ::emboss::support::Maybe(static_cast(10LL)))).ValueOrDefault()); } - [[nodiscard]] bool CouldWriteValue(::std::int32_t emboss_reserved_local_value) { + bool CouldWriteValue(::std::int32_t emboss_reserved_local_value) { if (!ValueIsOk(emboss_reserved_local_value)) return false; const auto emboss_reserved_local_maybe_new_value = ::emboss::support::Difference(::emboss::support::Maybe(emboss_reserved_local_value), ::emboss::support::Maybe(static_cast(10LL))); if (!emboss_reserved_local_maybe_new_value.Known()) return false; @@ -12172,7 +12224,7 @@ class GenericImplicitWriteBackView final { private: - [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { + ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.x(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Sum(::emboss::support::Maybe(static_cast(10LL)), emboss_reserved_local_subexpr_2); @@ -12180,7 +12232,7 @@ class GenericImplicitWriteBackView final { return emboss_reserved_local_subexpr_3; } - [[nodiscard]] static constexpr bool ValueIsOk( + static constexpr bool ValueIsOk( ::std::int32_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -12188,8 +12240,8 @@ class GenericImplicitWriteBackView final { const GenericImplicitWriteBackView view_; }; - [[nodiscard]] EmbossReservedVirtualTenPlusXView ten_plus_x() const; - [[nodiscard]] ::emboss::support::Maybe has_ten_plus_x() const; + EmbossReservedVirtualTenPlusXView ten_plus_x() const; + ::emboss::support::Maybe has_ten_plus_x() const; public: class EmbossReservedVirtualXMinusTenView final { @@ -12208,17 +12260,17 @@ class GenericImplicitWriteBackView final { default; ~EmbossReservedVirtualXMinusTenView() = default; - [[nodiscard]] ::std::int32_t Read() const { + ::std::int32_t Read() const { EMBOSS_CHECK(view_.has_x_minus_ten().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - [[nodiscard]] ::std::int32_t UncheckedRead() const { + ::std::int32_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - [[nodiscard]] bool Ok() const { + bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -12231,9 +12283,9 @@ class GenericImplicitWriteBackView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } - [[nodiscard]] bool TryToWrite(::std::int32_t emboss_reserved_local_value) { + bool TryToWrite(::std::int32_t emboss_reserved_local_value) { const auto emboss_reserved_local_maybe_new_value = ::emboss::support::Sum(::emboss::support::Maybe(emboss_reserved_local_value), ::emboss::support::Maybe(static_cast(10LL))); if (!CouldWriteValue(emboss_reserved_local_value)) return false; return view_.x().TryToWrite( @@ -12247,7 +12299,7 @@ class GenericImplicitWriteBackView final { void UncheckedWrite(::std::int32_t emboss_reserved_local_value) { view_.x().UncheckedWrite((::emboss::support::Sum(::emboss::support::Maybe(emboss_reserved_local_value), ::emboss::support::Maybe(static_cast(10LL)))).ValueOrDefault()); } - [[nodiscard]] bool CouldWriteValue(::std::int32_t emboss_reserved_local_value) { + bool CouldWriteValue(::std::int32_t emboss_reserved_local_value) { if (!ValueIsOk(emboss_reserved_local_value)) return false; const auto emboss_reserved_local_maybe_new_value = ::emboss::support::Sum(::emboss::support::Maybe(emboss_reserved_local_value), ::emboss::support::Maybe(static_cast(10LL))); if (!emboss_reserved_local_maybe_new_value.Known()) return false; @@ -12263,7 +12315,7 @@ class GenericImplicitWriteBackView final { private: - [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { + ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.x(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Difference(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(10LL))); @@ -12271,7 +12323,7 @@ class GenericImplicitWriteBackView final { return emboss_reserved_local_subexpr_3; } - [[nodiscard]] static constexpr bool ValueIsOk( + static constexpr bool ValueIsOk( ::std::int32_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -12279,8 +12331,8 @@ class GenericImplicitWriteBackView final { const GenericImplicitWriteBackView view_; }; - [[nodiscard]] EmbossReservedVirtualXMinusTenView x_minus_ten() const; - [[nodiscard]] ::emboss::support::Maybe has_x_minus_ten() const; + EmbossReservedVirtualXMinusTenView x_minus_ten() const; + ::emboss::support::Maybe has_x_minus_ten() const; public: class EmbossReservedVirtualTenMinusXView final { @@ -12299,17 +12351,17 @@ class GenericImplicitWriteBackView final { default; ~EmbossReservedVirtualTenMinusXView() = default; - [[nodiscard]] ::std::int32_t Read() const { + ::std::int32_t Read() const { EMBOSS_CHECK(view_.has_ten_minus_x().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - [[nodiscard]] ::std::int32_t UncheckedRead() const { + ::std::int32_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - [[nodiscard]] bool Ok() const { + bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -12322,9 +12374,9 @@ class GenericImplicitWriteBackView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } - [[nodiscard]] bool TryToWrite(::std::int32_t emboss_reserved_local_value) { + bool TryToWrite(::std::int32_t emboss_reserved_local_value) { const auto emboss_reserved_local_maybe_new_value = ::emboss::support::Difference(::emboss::support::Maybe(static_cast(10LL)), ::emboss::support::Maybe(emboss_reserved_local_value)); if (!CouldWriteValue(emboss_reserved_local_value)) return false; return view_.x().TryToWrite( @@ -12338,7 +12390,7 @@ class GenericImplicitWriteBackView final { void UncheckedWrite(::std::int32_t emboss_reserved_local_value) { view_.x().UncheckedWrite((::emboss::support::Difference(::emboss::support::Maybe(static_cast(10LL)), ::emboss::support::Maybe(emboss_reserved_local_value))).ValueOrDefault()); } - [[nodiscard]] bool CouldWriteValue(::std::int32_t emboss_reserved_local_value) { + bool CouldWriteValue(::std::int32_t emboss_reserved_local_value) { if (!ValueIsOk(emboss_reserved_local_value)) return false; const auto emboss_reserved_local_maybe_new_value = ::emboss::support::Difference(::emboss::support::Maybe(static_cast(10LL)), ::emboss::support::Maybe(emboss_reserved_local_value)); if (!emboss_reserved_local_maybe_new_value.Known()) return false; @@ -12354,7 +12406,7 @@ class GenericImplicitWriteBackView final { private: - [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { + ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.x(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Difference(::emboss::support::Maybe(static_cast(10LL)), emboss_reserved_local_subexpr_2); @@ -12362,7 +12414,7 @@ class GenericImplicitWriteBackView final { return emboss_reserved_local_subexpr_3; } - [[nodiscard]] static constexpr bool ValueIsOk( + static constexpr bool ValueIsOk( ::std::int32_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -12370,8 +12422,8 @@ class GenericImplicitWriteBackView final { const GenericImplicitWriteBackView view_; }; - [[nodiscard]] EmbossReservedVirtualTenMinusXView ten_minus_x() const; - [[nodiscard]] ::emboss::support::Maybe has_ten_minus_x() const; + EmbossReservedVirtualTenMinusXView ten_minus_x() const; + ::emboss::support::Maybe has_ten_minus_x() const; public: class EmbossReservedVirtualTenMinusXPlusTenView final { @@ -12390,17 +12442,17 @@ class GenericImplicitWriteBackView final { default; ~EmbossReservedVirtualTenMinusXPlusTenView() = default; - [[nodiscard]] ::std::int32_t Read() const { + ::std::int32_t Read() const { EMBOSS_CHECK(view_.has_ten_minus_x_plus_ten().ValueOr(false)); auto emboss_reserved_local_value = MaybeRead(); EMBOSS_CHECK(emboss_reserved_local_value.Known()); EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); return emboss_reserved_local_value.ValueOrDefault(); } - [[nodiscard]] ::std::int32_t UncheckedRead() const { + ::std::int32_t UncheckedRead() const { return MaybeRead().ValueOrDefault(); } - [[nodiscard]] bool Ok() const { + bool Ok() const { auto emboss_reserved_local_value = MaybeRead(); return emboss_reserved_local_value.Known() && ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); @@ -12413,9 +12465,9 @@ class GenericImplicitWriteBackView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } - [[nodiscard]] bool TryToWrite(::std::int32_t emboss_reserved_local_value) { + bool TryToWrite(::std::int32_t emboss_reserved_local_value) { const auto emboss_reserved_local_maybe_new_value = ::emboss::support::Difference(::emboss::support::Maybe(static_cast(10LL)), ::emboss::support::Difference(::emboss::support::Maybe(emboss_reserved_local_value), ::emboss::support::Maybe(static_cast(10LL)))); if (!CouldWriteValue(emboss_reserved_local_value)) return false; return view_.x().TryToWrite( @@ -12429,7 +12481,7 @@ class GenericImplicitWriteBackView final { void UncheckedWrite(::std::int32_t emboss_reserved_local_value) { view_.x().UncheckedWrite((::emboss::support::Difference(::emboss::support::Maybe(static_cast(10LL)), ::emboss::support::Difference(::emboss::support::Maybe(emboss_reserved_local_value), ::emboss::support::Maybe(static_cast(10LL))))).ValueOrDefault()); } - [[nodiscard]] bool CouldWriteValue(::std::int32_t emboss_reserved_local_value) { + bool CouldWriteValue(::std::int32_t emboss_reserved_local_value) { if (!ValueIsOk(emboss_reserved_local_value)) return false; const auto emboss_reserved_local_maybe_new_value = ::emboss::support::Difference(::emboss::support::Maybe(static_cast(10LL)), ::emboss::support::Difference(::emboss::support::Maybe(emboss_reserved_local_value), ::emboss::support::Maybe(static_cast(10LL)))); if (!emboss_reserved_local_maybe_new_value.Known()) return false; @@ -12445,7 +12497,7 @@ class GenericImplicitWriteBackView final { private: - [[nodiscard]] ::emboss::support::Maybe MaybeRead() const { + ::emboss::support::Maybe MaybeRead() const { const auto emboss_reserved_local_subexpr_1 = view_.x(); const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Difference(::emboss::support::Maybe(static_cast(10LL)), emboss_reserved_local_subexpr_2); @@ -12454,7 +12506,7 @@ class GenericImplicitWriteBackView final { return emboss_reserved_local_subexpr_4; } - [[nodiscard]] static constexpr bool ValueIsOk( + static constexpr bool ValueIsOk( ::std::int32_t emboss_reserved_local_value) { return (void)emboss_reserved_local_value, // Silence -Wunused-parameter ::emboss::support::Maybe(true).ValueOr(false); @@ -12462,8 +12514,8 @@ class GenericImplicitWriteBackView final { const GenericImplicitWriteBackView view_; }; - [[nodiscard]] EmbossReservedVirtualTenMinusXPlusTenView ten_minus_x_plus_ten() const; - [[nodiscard]] ::emboss::support::Maybe has_ten_minus_x_plus_ten() const; + EmbossReservedVirtualTenMinusXPlusTenView ten_minus_x_plus_ten() const; + ::emboss::support::Maybe has_ten_minus_x_plus_ten() const; public: class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { @@ -12479,9 +12531,9 @@ class GenericImplicitWriteBackView final { default; ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -12490,13 +12542,13 @@ class GenericImplicitWriteBackView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { + static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() { return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { + static constexpr ::emboss::support::Maybe has_IntrinsicSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -12514,9 +12566,9 @@ class GenericImplicitWriteBackView final { default; ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -12525,13 +12577,13 @@ class GenericImplicitWriteBackView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { return EmbossReservedDollarVirtualMaxSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -12549,9 +12601,9 @@ class GenericImplicitWriteBackView final { default; ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; - [[nodiscard]] static constexpr ::std::int32_t Read(); - [[nodiscard]] static constexpr ::std::int32_t UncheckedRead(); - [[nodiscard]] static constexpr bool Ok() { return true; } + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } template void WriteToTextStream(Stream *emboss_reserved_local_stream, const ::emboss::TextOutputOptions @@ -12560,13 +12612,13 @@ class GenericImplicitWriteBackView final { this, emboss_reserved_local_stream, emboss_reserved_local_options); } - [[nodiscard]] static constexpr bool IsAggregate() { return false; } + static constexpr bool IsAggregate() { return false; } }; - [[nodiscard]] static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { return EmbossReservedDollarVirtualMinSizeInBytesView(); } - [[nodiscard]] static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { return ::emboss::support::Maybe(true); } @@ -12597,7 +12649,7 @@ struct EmbossReservedInternalIsGenericImplicitWriteBackView< }; template -[[nodiscard]] inline GenericImplicitWriteBackView< +inline GenericImplicitWriteBackView< /**/ ::emboss::support::ContiguousBuffer< typename ::std::remove_reference< decltype(*::std::declval()->data())>::type, @@ -12612,7 +12664,7 @@ MakeImplicitWriteBackView( T &&emboss_reserved_local_arg) { } template -[[nodiscard]] inline GenericImplicitWriteBackView> +inline GenericImplicitWriteBackView> MakeImplicitWriteBackView( T *emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { return GenericImplicitWriteBackView>( @@ -12621,7 +12673,7 @@ MakeImplicitWriteBackView( T *emboss_reserved_local_data, } template -[[nodiscard]] inline GenericImplicitWriteBackView< +inline GenericImplicitWriteBackView< /**/ ::emboss::support::ContiguousBuffer> MakeAlignedImplicitWriteBackView( T *emboss_reserved_local_data, From c8cfee4d0478eef5abd060881e4e60d794afa8b1 Mon Sep 17 00:00:00 2001 From: Aaron Webster Date: Thu, 29 Jan 2026 11:13:29 -0800 Subject: [PATCH 6/6] Add many_conditionals golden test Add golden file and test for many_conditionals.emb to ensure the generated C++ header is tracked for review. --- compiler/back_end/cpp/BUILD | 6 + testdata/golden_cpp/many_conditionals.emb.h | 13200 ++++++++++++++++++ 2 files changed, 13206 insertions(+) create mode 100644 testdata/golden_cpp/many_conditionals.emb.h diff --git a/compiler/back_end/cpp/BUILD b/compiler/back_end/cpp/BUILD index 7bbef37..950298d 100644 --- a/compiler/back_end/cpp/BUILD +++ b/compiler/back_end/cpp/BUILD @@ -610,3 +610,9 @@ cpp_golden_test( emb_file = "//testdata:imported_genfiles.emb", golden_file = "//testdata/golden_cpp:imported_genfiles.emb.h", ) + +cpp_golden_test( + name = "many_conditionals_golden_test", + emb_file = "//testdata:many_conditionals.emb", + golden_file = "//testdata/golden_cpp:many_conditionals.emb.h", +) diff --git a/testdata/golden_cpp/many_conditionals.emb.h b/testdata/golden_cpp/many_conditionals.emb.h new file mode 100644 index 0000000..fcffa58 --- /dev/null +++ b/testdata/golden_cpp/many_conditionals.emb.h @@ -0,0 +1,13200 @@ +/** + * Generated by the Emboss compiler. DO NOT EDIT! + */ +#ifndef TESTDATA_MANY_CONDITIONALS_EMB_H_ +#define TESTDATA_MANY_CONDITIONALS_EMB_H_ +#include +#include + +#include +#include +#include + +#include "runtime/cpp/emboss_cpp_util.h" + +#include "runtime/cpp/emboss_prelude.h" + +#include "runtime/cpp/emboss_enum_view.h" + +#include "runtime/cpp/emboss_text_util.h" + + + +/* NOLINTBEGIN */ +namespace emboss { +namespace test { +namespace LargeConditionals { + +} // namespace LargeConditionals + + +template +class GenericLargeConditionalsView; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +namespace LargeConditionals { + +} // namespace LargeConditionals + + +template +struct EmbossReservedInternalIsGenericLargeConditionalsView; + +template +class GenericLargeConditionalsView final { + public: + GenericLargeConditionalsView() : backing_() {} + explicit GenericLargeConditionalsView( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericLargeConditionalsView( + const GenericLargeConditionalsView &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericLargeConditionalsView( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericLargeConditionalsView( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericLargeConditionalsView &operator=( + const GenericLargeConditionalsView &emboss_reserved_local_other) { + backing_ = emboss_reserved_local_other.BackingStorage(); + return *this; + } + + + + bool Ok() const { + if (!IsComplete()) return false; + + const auto emboss_reserved_local_ok_subexpr_1 = tag(); + const auto emboss_reserved_local_ok_subexpr_2 = (emboss_reserved_local_ok_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_ok_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + + if (!tag().Ok()) return false; + + if (!IntrinsicSizeInBytes().Ok()) return false; + + if (!MaxSizeInBytes().Ok()) return false; + + if (!MinSizeInBytes().Ok()) return false; + + { + + const auto emboss_reserved_switch_discrim = emboss_reserved_local_ok_subexpr_2; + if (!emboss_reserved_switch_discrim.Known()) return false; + switch (emboss_reserved_switch_discrim.ValueOrDefault()) { + case static_cast(0LL): + if (!f0().Ok()) return false; + break; + + case static_cast(1LL): + if (!f1().Ok()) return false; + break; + + case static_cast(2LL): + if (!f2().Ok()) return false; + break; + + case static_cast(3LL): + if (!f3().Ok()) return false; + break; + + case static_cast(4LL): + if (!f4().Ok()) return false; + break; + + case static_cast(5LL): + if (!f5().Ok()) return false; + break; + + case static_cast(6LL): + if (!f6().Ok()) return false; + break; + + case static_cast(7LL): + if (!f7().Ok()) return false; + break; + + case static_cast(8LL): + if (!f8().Ok()) return false; + break; + + case static_cast(9LL): + if (!f9().Ok()) return false; + break; + + case static_cast(10LL): + if (!f10().Ok()) return false; + break; + + case static_cast(11LL): + if (!f11().Ok()) return false; + break; + + case static_cast(12LL): + if (!f12().Ok()) return false; + break; + + case static_cast(13LL): + if (!f13().Ok()) return false; + break; + + case static_cast(14LL): + if (!f14().Ok()) return false; + break; + + case static_cast(15LL): + if (!f15().Ok()) return false; + break; + + case static_cast(16LL): + if (!f16().Ok()) return false; + break; + + case static_cast(17LL): + if (!f17().Ok()) return false; + break; + + case static_cast(18LL): + if (!f18().Ok()) return false; + break; + + case static_cast(19LL): + if (!f19().Ok()) return false; + break; + + case static_cast(20LL): + if (!f20().Ok()) return false; + break; + + case static_cast(21LL): + if (!f21().Ok()) return false; + break; + + case static_cast(22LL): + if (!f22().Ok()) return false; + break; + + case static_cast(23LL): + if (!f23().Ok()) return false; + break; + + case static_cast(24LL): + if (!f24().Ok()) return false; + break; + + case static_cast(25LL): + if (!f25().Ok()) return false; + break; + + case static_cast(26LL): + if (!f26().Ok()) return false; + break; + + case static_cast(27LL): + if (!f27().Ok()) return false; + break; + + case static_cast(28LL): + if (!f28().Ok()) return false; + break; + + case static_cast(29LL): + if (!f29().Ok()) return false; + break; + + case static_cast(30LL): + if (!f30().Ok()) return false; + break; + + case static_cast(31LL): + if (!f31().Ok()) return false; + break; + + case static_cast(32LL): + if (!f32().Ok()) return false; + break; + + case static_cast(33LL): + if (!f33().Ok()) return false; + break; + + case static_cast(34LL): + if (!f34().Ok()) return false; + break; + + case static_cast(35LL): + if (!f35().Ok()) return false; + break; + + case static_cast(36LL): + if (!f36().Ok()) return false; + break; + + case static_cast(37LL): + if (!f37().Ok()) return false; + break; + + case static_cast(38LL): + if (!f38().Ok()) return false; + break; + + case static_cast(39LL): + if (!f39().Ok()) return false; + break; + + case static_cast(40LL): + if (!f40().Ok()) return false; + break; + + case static_cast(41LL): + if (!f41().Ok()) return false; + break; + + case static_cast(42LL): + if (!f42().Ok()) return false; + break; + + case static_cast(43LL): + if (!f43().Ok()) return false; + break; + + case static_cast(44LL): + if (!f44().Ok()) return false; + break; + + case static_cast(45LL): + if (!f45().Ok()) return false; + break; + + case static_cast(46LL): + if (!f46().Ok()) return false; + break; + + case static_cast(47LL): + if (!f47().Ok()) return false; + break; + + case static_cast(48LL): + if (!f48().Ok()) return false; + break; + + case static_cast(49LL): + if (!f49().Ok()) return false; + break; + + case static_cast(50LL): + if (!f50().Ok()) return false; + break; + + case static_cast(51LL): + if (!f51().Ok()) return false; + break; + + case static_cast(52LL): + if (!f52().Ok()) return false; + break; + + case static_cast(53LL): + if (!f53().Ok()) return false; + break; + + case static_cast(54LL): + if (!f54().Ok()) return false; + break; + + case static_cast(55LL): + if (!f55().Ok()) return false; + break; + + case static_cast(56LL): + if (!f56().Ok()) return false; + break; + + case static_cast(57LL): + if (!f57().Ok()) return false; + break; + + case static_cast(58LL): + if (!f58().Ok()) return false; + break; + + case static_cast(59LL): + if (!f59().Ok()) return false; + break; + + case static_cast(60LL): + if (!f60().Ok()) return false; + break; + + case static_cast(61LL): + if (!f61().Ok()) return false; + break; + + case static_cast(62LL): + if (!f62().Ok()) return false; + break; + + case static_cast(63LL): + if (!f63().Ok()) return false; + break; + + case static_cast(64LL): + if (!f64().Ok()) return false; + break; + + case static_cast(65LL): + if (!f65().Ok()) return false; + break; + + case static_cast(66LL): + if (!f66().Ok()) return false; + break; + + case static_cast(67LL): + if (!f67().Ok()) return false; + break; + + case static_cast(68LL): + if (!f68().Ok()) return false; + break; + + case static_cast(69LL): + if (!f69().Ok()) return false; + break; + + case static_cast(70LL): + if (!f70().Ok()) return false; + break; + + case static_cast(71LL): + if (!f71().Ok()) return false; + break; + + case static_cast(72LL): + if (!f72().Ok()) return false; + break; + + case static_cast(73LL): + if (!f73().Ok()) return false; + break; + + case static_cast(74LL): + if (!f74().Ok()) return false; + break; + + case static_cast(75LL): + if (!f75().Ok()) return false; + break; + + case static_cast(76LL): + if (!f76().Ok()) return false; + break; + + case static_cast(77LL): + if (!f77().Ok()) return false; + break; + + case static_cast(78LL): + if (!f78().Ok()) return false; + break; + + case static_cast(79LL): + if (!f79().Ok()) return false; + break; + + case static_cast(80LL): + if (!f80().Ok()) return false; + break; + + case static_cast(81LL): + if (!f81().Ok()) return false; + break; + + case static_cast(82LL): + if (!f82().Ok()) return false; + break; + + case static_cast(83LL): + if (!f83().Ok()) return false; + break; + + case static_cast(84LL): + if (!f84().Ok()) return false; + break; + + case static_cast(85LL): + if (!f85().Ok()) return false; + break; + + case static_cast(86LL): + if (!f86().Ok()) return false; + break; + + case static_cast(87LL): + if (!f87().Ok()) return false; + break; + + case static_cast(88LL): + if (!f88().Ok()) return false; + break; + + case static_cast(89LL): + if (!f89().Ok()) return false; + break; + + case static_cast(90LL): + if (!f90().Ok()) return false; + break; + + case static_cast(91LL): + if (!f91().Ok()) return false; + break; + + case static_cast(92LL): + if (!f92().Ok()) return false; + break; + + case static_cast(93LL): + if (!f93().Ok()) return false; + break; + + case static_cast(94LL): + if (!f94().Ok()) return false; + break; + + case static_cast(95LL): + if (!f95().Ok()) return false; + break; + + case static_cast(96LL): + if (!f96().Ok()) return false; + break; + + case static_cast(97LL): + if (!f97().Ok()) return false; + break; + + case static_cast(98LL): + if (!f98().Ok()) return false; + break; + + case static_cast(99LL): + if (!f99().Ok()) return false; + break; + + + } + } + + + + return true; + } + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { + return backing_.Ok() && IntrinsicSizeInBytes().Ok() && + backing_.SizeInBytes() >= + static_cast( + IntrinsicSizeInBytes().UncheckedRead()); + } + ::std::size_t SizeInBytes() const { + return static_cast(IntrinsicSizeInBytes().Read()); + } + bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + + + + template + bool Equals( + GenericLargeConditionalsView emboss_reserved_local_other) const { + + if (!has_tag().Known()) return false; + if (!emboss_reserved_local_other.has_tag().Known()) return false; + + if (emboss_reserved_local_other.has_tag().ValueOrDefault() && + !has_tag().ValueOrDefault()) + return false; + if (has_tag().ValueOrDefault() && + !emboss_reserved_local_other.has_tag().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_tag().ValueOrDefault() && + has_tag().ValueOrDefault() && + !tag().Equals(emboss_reserved_local_other.tag())) + return false; + + + + if (!has_f0().Known()) return false; + if (!emboss_reserved_local_other.has_f0().Known()) return false; + + if (emboss_reserved_local_other.has_f0().ValueOrDefault() && + !has_f0().ValueOrDefault()) + return false; + if (has_f0().ValueOrDefault() && + !emboss_reserved_local_other.has_f0().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_f0().ValueOrDefault() && + has_f0().ValueOrDefault() && + !f0().Equals(emboss_reserved_local_other.f0())) + return false; + + + + if (!has_f1().Known()) return false; + if (!emboss_reserved_local_other.has_f1().Known()) return false; + + if (emboss_reserved_local_other.has_f1().ValueOrDefault() && + !has_f1().ValueOrDefault()) + return false; + if (has_f1().ValueOrDefault() && + !emboss_reserved_local_other.has_f1().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_f1().ValueOrDefault() && + has_f1().ValueOrDefault() && + !f1().Equals(emboss_reserved_local_other.f1())) + return false; + + + + if (!has_f2().Known()) return false; + if (!emboss_reserved_local_other.has_f2().Known()) return false; + + if (emboss_reserved_local_other.has_f2().ValueOrDefault() && + !has_f2().ValueOrDefault()) + return false; + if (has_f2().ValueOrDefault() && + !emboss_reserved_local_other.has_f2().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_f2().ValueOrDefault() && + has_f2().ValueOrDefault() && + !f2().Equals(emboss_reserved_local_other.f2())) + return false; + + + + if (!has_f3().Known()) return false; + if (!emboss_reserved_local_other.has_f3().Known()) return false; + + if (emboss_reserved_local_other.has_f3().ValueOrDefault() && + !has_f3().ValueOrDefault()) + return false; + if (has_f3().ValueOrDefault() && + !emboss_reserved_local_other.has_f3().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_f3().ValueOrDefault() && + has_f3().ValueOrDefault() && + !f3().Equals(emboss_reserved_local_other.f3())) + return false; + + + + if (!has_f4().Known()) return false; + if (!emboss_reserved_local_other.has_f4().Known()) return false; + + if (emboss_reserved_local_other.has_f4().ValueOrDefault() && + !has_f4().ValueOrDefault()) + return false; + if (has_f4().ValueOrDefault() && + !emboss_reserved_local_other.has_f4().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_f4().ValueOrDefault() && + has_f4().ValueOrDefault() && + !f4().Equals(emboss_reserved_local_other.f4())) + return false; + + + + if (!has_f5().Known()) return false; + if (!emboss_reserved_local_other.has_f5().Known()) return false; + + if (emboss_reserved_local_other.has_f5().ValueOrDefault() && + !has_f5().ValueOrDefault()) + return false; + if (has_f5().ValueOrDefault() && + !emboss_reserved_local_other.has_f5().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_f5().ValueOrDefault() && + has_f5().ValueOrDefault() && + !f5().Equals(emboss_reserved_local_other.f5())) + return false; + + + + if (!has_f6().Known()) return false; + if (!emboss_reserved_local_other.has_f6().Known()) return false; + + if (emboss_reserved_local_other.has_f6().ValueOrDefault() && + !has_f6().ValueOrDefault()) + return false; + if (has_f6().ValueOrDefault() && + !emboss_reserved_local_other.has_f6().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_f6().ValueOrDefault() && + has_f6().ValueOrDefault() && + !f6().Equals(emboss_reserved_local_other.f6())) + return false; + + + + if (!has_f7().Known()) return false; + if (!emboss_reserved_local_other.has_f7().Known()) return false; + + if (emboss_reserved_local_other.has_f7().ValueOrDefault() && + !has_f7().ValueOrDefault()) + return false; + if (has_f7().ValueOrDefault() && + !emboss_reserved_local_other.has_f7().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_f7().ValueOrDefault() && + has_f7().ValueOrDefault() && + !f7().Equals(emboss_reserved_local_other.f7())) + return false; + + + + if (!has_f8().Known()) return false; + if (!emboss_reserved_local_other.has_f8().Known()) return false; + + if (emboss_reserved_local_other.has_f8().ValueOrDefault() && + !has_f8().ValueOrDefault()) + return false; + if (has_f8().ValueOrDefault() && + !emboss_reserved_local_other.has_f8().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_f8().ValueOrDefault() && + has_f8().ValueOrDefault() && + !f8().Equals(emboss_reserved_local_other.f8())) + return false; + + + + if (!has_f9().Known()) return false; + if (!emboss_reserved_local_other.has_f9().Known()) return false; + + if (emboss_reserved_local_other.has_f9().ValueOrDefault() && + !has_f9().ValueOrDefault()) + return false; + if (has_f9().ValueOrDefault() && + !emboss_reserved_local_other.has_f9().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_f9().ValueOrDefault() && + has_f9().ValueOrDefault() && + !f9().Equals(emboss_reserved_local_other.f9())) + return false; + + + + if (!has_f10().Known()) return false; + if (!emboss_reserved_local_other.has_f10().Known()) return false; + + if (emboss_reserved_local_other.has_f10().ValueOrDefault() && + !has_f10().ValueOrDefault()) + return false; + if (has_f10().ValueOrDefault() && + !emboss_reserved_local_other.has_f10().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_f10().ValueOrDefault() && + has_f10().ValueOrDefault() && + !f10().Equals(emboss_reserved_local_other.f10())) + return false; + + + + if (!has_f11().Known()) return false; + if (!emboss_reserved_local_other.has_f11().Known()) return false; + + if (emboss_reserved_local_other.has_f11().ValueOrDefault() && + !has_f11().ValueOrDefault()) + return false; + if (has_f11().ValueOrDefault() && + !emboss_reserved_local_other.has_f11().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_f11().ValueOrDefault() && + has_f11().ValueOrDefault() && + !f11().Equals(emboss_reserved_local_other.f11())) + return false; + + + + if (!has_f12().Known()) return false; + if (!emboss_reserved_local_other.has_f12().Known()) return false; + + if (emboss_reserved_local_other.has_f12().ValueOrDefault() && + !has_f12().ValueOrDefault()) + return false; + if (has_f12().ValueOrDefault() && + !emboss_reserved_local_other.has_f12().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_f12().ValueOrDefault() && + has_f12().ValueOrDefault() && + !f12().Equals(emboss_reserved_local_other.f12())) + return false; + + + + if (!has_f13().Known()) return false; + if (!emboss_reserved_local_other.has_f13().Known()) return false; + + if (emboss_reserved_local_other.has_f13().ValueOrDefault() && + !has_f13().ValueOrDefault()) + return false; + if (has_f13().ValueOrDefault() && + !emboss_reserved_local_other.has_f13().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_f13().ValueOrDefault() && + has_f13().ValueOrDefault() && + !f13().Equals(emboss_reserved_local_other.f13())) + return false; + + + + if (!has_f14().Known()) return false; + if (!emboss_reserved_local_other.has_f14().Known()) return false; + + if (emboss_reserved_local_other.has_f14().ValueOrDefault() && + !has_f14().ValueOrDefault()) + return false; + if (has_f14().ValueOrDefault() && + !emboss_reserved_local_other.has_f14().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_f14().ValueOrDefault() && + has_f14().ValueOrDefault() && + !f14().Equals(emboss_reserved_local_other.f14())) + return false; + + + + if (!has_f15().Known()) return false; + if (!emboss_reserved_local_other.has_f15().Known()) return false; + + if (emboss_reserved_local_other.has_f15().ValueOrDefault() && + !has_f15().ValueOrDefault()) + return false; + if (has_f15().ValueOrDefault() && + !emboss_reserved_local_other.has_f15().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_f15().ValueOrDefault() && + has_f15().ValueOrDefault() && + !f15().Equals(emboss_reserved_local_other.f15())) + return false; + + + + if (!has_f16().Known()) return false; + if (!emboss_reserved_local_other.has_f16().Known()) return false; + + if (emboss_reserved_local_other.has_f16().ValueOrDefault() && + !has_f16().ValueOrDefault()) + return false; + if (has_f16().ValueOrDefault() && + !emboss_reserved_local_other.has_f16().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_f16().ValueOrDefault() && + has_f16().ValueOrDefault() && + !f16().Equals(emboss_reserved_local_other.f16())) + return false; + + + + if (!has_f17().Known()) return false; + if (!emboss_reserved_local_other.has_f17().Known()) return false; + + if (emboss_reserved_local_other.has_f17().ValueOrDefault() && + !has_f17().ValueOrDefault()) + return false; + if (has_f17().ValueOrDefault() && + !emboss_reserved_local_other.has_f17().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_f17().ValueOrDefault() && + has_f17().ValueOrDefault() && + !f17().Equals(emboss_reserved_local_other.f17())) + return false; + + + + if (!has_f18().Known()) return false; + if (!emboss_reserved_local_other.has_f18().Known()) return false; + + if (emboss_reserved_local_other.has_f18().ValueOrDefault() && + !has_f18().ValueOrDefault()) + return false; + if (has_f18().ValueOrDefault() && + !emboss_reserved_local_other.has_f18().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_f18().ValueOrDefault() && + has_f18().ValueOrDefault() && + !f18().Equals(emboss_reserved_local_other.f18())) + return false; + + + + if (!has_f19().Known()) return false; + if (!emboss_reserved_local_other.has_f19().Known()) return false; + + if (emboss_reserved_local_other.has_f19().ValueOrDefault() && + !has_f19().ValueOrDefault()) + return false; + if (has_f19().ValueOrDefault() && + !emboss_reserved_local_other.has_f19().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_f19().ValueOrDefault() && + has_f19().ValueOrDefault() && + !f19().Equals(emboss_reserved_local_other.f19())) + return false; + + + + if (!has_f20().Known()) return false; + if (!emboss_reserved_local_other.has_f20().Known()) return false; + + if (emboss_reserved_local_other.has_f20().ValueOrDefault() && + !has_f20().ValueOrDefault()) + return false; + if (has_f20().ValueOrDefault() && + !emboss_reserved_local_other.has_f20().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_f20().ValueOrDefault() && + has_f20().ValueOrDefault() && + !f20().Equals(emboss_reserved_local_other.f20())) + return false; + + + + if (!has_f21().Known()) return false; + if (!emboss_reserved_local_other.has_f21().Known()) return false; + + if (emboss_reserved_local_other.has_f21().ValueOrDefault() && + !has_f21().ValueOrDefault()) + return false; + if (has_f21().ValueOrDefault() && + !emboss_reserved_local_other.has_f21().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_f21().ValueOrDefault() && + has_f21().ValueOrDefault() && + !f21().Equals(emboss_reserved_local_other.f21())) + return false; + + + + if (!has_f22().Known()) return false; + if (!emboss_reserved_local_other.has_f22().Known()) return false; + + if (emboss_reserved_local_other.has_f22().ValueOrDefault() && + !has_f22().ValueOrDefault()) + return false; + if (has_f22().ValueOrDefault() && + !emboss_reserved_local_other.has_f22().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_f22().ValueOrDefault() && + has_f22().ValueOrDefault() && + !f22().Equals(emboss_reserved_local_other.f22())) + return false; + + + + if (!has_f23().Known()) return false; + if (!emboss_reserved_local_other.has_f23().Known()) return false; + + if (emboss_reserved_local_other.has_f23().ValueOrDefault() && + !has_f23().ValueOrDefault()) + return false; + if (has_f23().ValueOrDefault() && + !emboss_reserved_local_other.has_f23().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_f23().ValueOrDefault() && + has_f23().ValueOrDefault() && + !f23().Equals(emboss_reserved_local_other.f23())) + return false; + + + + if (!has_f24().Known()) return false; + if (!emboss_reserved_local_other.has_f24().Known()) return false; + + if (emboss_reserved_local_other.has_f24().ValueOrDefault() && + !has_f24().ValueOrDefault()) + return false; + if (has_f24().ValueOrDefault() && + !emboss_reserved_local_other.has_f24().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_f24().ValueOrDefault() && + has_f24().ValueOrDefault() && + !f24().Equals(emboss_reserved_local_other.f24())) + return false; + + + + if (!has_f25().Known()) return false; + if (!emboss_reserved_local_other.has_f25().Known()) return false; + + if (emboss_reserved_local_other.has_f25().ValueOrDefault() && + !has_f25().ValueOrDefault()) + return false; + if (has_f25().ValueOrDefault() && + !emboss_reserved_local_other.has_f25().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_f25().ValueOrDefault() && + has_f25().ValueOrDefault() && + !f25().Equals(emboss_reserved_local_other.f25())) + return false; + + + + if (!has_f26().Known()) return false; + if (!emboss_reserved_local_other.has_f26().Known()) return false; + + if (emboss_reserved_local_other.has_f26().ValueOrDefault() && + !has_f26().ValueOrDefault()) + return false; + if (has_f26().ValueOrDefault() && + !emboss_reserved_local_other.has_f26().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_f26().ValueOrDefault() && + has_f26().ValueOrDefault() && + !f26().Equals(emboss_reserved_local_other.f26())) + return false; + + + + if (!has_f27().Known()) return false; + if (!emboss_reserved_local_other.has_f27().Known()) return false; + + if (emboss_reserved_local_other.has_f27().ValueOrDefault() && + !has_f27().ValueOrDefault()) + return false; + if (has_f27().ValueOrDefault() && + !emboss_reserved_local_other.has_f27().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_f27().ValueOrDefault() && + has_f27().ValueOrDefault() && + !f27().Equals(emboss_reserved_local_other.f27())) + return false; + + + + if (!has_f28().Known()) return false; + if (!emboss_reserved_local_other.has_f28().Known()) return false; + + if (emboss_reserved_local_other.has_f28().ValueOrDefault() && + !has_f28().ValueOrDefault()) + return false; + if (has_f28().ValueOrDefault() && + !emboss_reserved_local_other.has_f28().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_f28().ValueOrDefault() && + has_f28().ValueOrDefault() && + !f28().Equals(emboss_reserved_local_other.f28())) + return false; + + + + if (!has_f29().Known()) return false; + if (!emboss_reserved_local_other.has_f29().Known()) return false; + + if (emboss_reserved_local_other.has_f29().ValueOrDefault() && + !has_f29().ValueOrDefault()) + return false; + if (has_f29().ValueOrDefault() && + !emboss_reserved_local_other.has_f29().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_f29().ValueOrDefault() && + has_f29().ValueOrDefault() && + !f29().Equals(emboss_reserved_local_other.f29())) + return false; + + + + if (!has_f30().Known()) return false; + if (!emboss_reserved_local_other.has_f30().Known()) return false; + + if (emboss_reserved_local_other.has_f30().ValueOrDefault() && + !has_f30().ValueOrDefault()) + return false; + if (has_f30().ValueOrDefault() && + !emboss_reserved_local_other.has_f30().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_f30().ValueOrDefault() && + has_f30().ValueOrDefault() && + !f30().Equals(emboss_reserved_local_other.f30())) + return false; + + + + if (!has_f31().Known()) return false; + if (!emboss_reserved_local_other.has_f31().Known()) return false; + + if (emboss_reserved_local_other.has_f31().ValueOrDefault() && + !has_f31().ValueOrDefault()) + return false; + if (has_f31().ValueOrDefault() && + !emboss_reserved_local_other.has_f31().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_f31().ValueOrDefault() && + has_f31().ValueOrDefault() && + !f31().Equals(emboss_reserved_local_other.f31())) + return false; + + + + if (!has_f32().Known()) return false; + if (!emboss_reserved_local_other.has_f32().Known()) return false; + + if (emboss_reserved_local_other.has_f32().ValueOrDefault() && + !has_f32().ValueOrDefault()) + return false; + if (has_f32().ValueOrDefault() && + !emboss_reserved_local_other.has_f32().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_f32().ValueOrDefault() && + has_f32().ValueOrDefault() && + !f32().Equals(emboss_reserved_local_other.f32())) + return false; + + + + if (!has_f33().Known()) return false; + if (!emboss_reserved_local_other.has_f33().Known()) return false; + + if (emboss_reserved_local_other.has_f33().ValueOrDefault() && + !has_f33().ValueOrDefault()) + return false; + if (has_f33().ValueOrDefault() && + !emboss_reserved_local_other.has_f33().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_f33().ValueOrDefault() && + has_f33().ValueOrDefault() && + !f33().Equals(emboss_reserved_local_other.f33())) + return false; + + + + if (!has_f34().Known()) return false; + if (!emboss_reserved_local_other.has_f34().Known()) return false; + + if (emboss_reserved_local_other.has_f34().ValueOrDefault() && + !has_f34().ValueOrDefault()) + return false; + if (has_f34().ValueOrDefault() && + !emboss_reserved_local_other.has_f34().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_f34().ValueOrDefault() && + has_f34().ValueOrDefault() && + !f34().Equals(emboss_reserved_local_other.f34())) + return false; + + + + if (!has_f35().Known()) return false; + if (!emboss_reserved_local_other.has_f35().Known()) return false; + + if (emboss_reserved_local_other.has_f35().ValueOrDefault() && + !has_f35().ValueOrDefault()) + return false; + if (has_f35().ValueOrDefault() && + !emboss_reserved_local_other.has_f35().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_f35().ValueOrDefault() && + has_f35().ValueOrDefault() && + !f35().Equals(emboss_reserved_local_other.f35())) + return false; + + + + if (!has_f36().Known()) return false; + if (!emboss_reserved_local_other.has_f36().Known()) return false; + + if (emboss_reserved_local_other.has_f36().ValueOrDefault() && + !has_f36().ValueOrDefault()) + return false; + if (has_f36().ValueOrDefault() && + !emboss_reserved_local_other.has_f36().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_f36().ValueOrDefault() && + has_f36().ValueOrDefault() && + !f36().Equals(emboss_reserved_local_other.f36())) + return false; + + + + if (!has_f37().Known()) return false; + if (!emboss_reserved_local_other.has_f37().Known()) return false; + + if (emboss_reserved_local_other.has_f37().ValueOrDefault() && + !has_f37().ValueOrDefault()) + return false; + if (has_f37().ValueOrDefault() && + !emboss_reserved_local_other.has_f37().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_f37().ValueOrDefault() && + has_f37().ValueOrDefault() && + !f37().Equals(emboss_reserved_local_other.f37())) + return false; + + + + if (!has_f38().Known()) return false; + if (!emboss_reserved_local_other.has_f38().Known()) return false; + + if (emboss_reserved_local_other.has_f38().ValueOrDefault() && + !has_f38().ValueOrDefault()) + return false; + if (has_f38().ValueOrDefault() && + !emboss_reserved_local_other.has_f38().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_f38().ValueOrDefault() && + has_f38().ValueOrDefault() && + !f38().Equals(emboss_reserved_local_other.f38())) + return false; + + + + if (!has_f39().Known()) return false; + if (!emboss_reserved_local_other.has_f39().Known()) return false; + + if (emboss_reserved_local_other.has_f39().ValueOrDefault() && + !has_f39().ValueOrDefault()) + return false; + if (has_f39().ValueOrDefault() && + !emboss_reserved_local_other.has_f39().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_f39().ValueOrDefault() && + has_f39().ValueOrDefault() && + !f39().Equals(emboss_reserved_local_other.f39())) + return false; + + + + if (!has_f40().Known()) return false; + if (!emboss_reserved_local_other.has_f40().Known()) return false; + + if (emboss_reserved_local_other.has_f40().ValueOrDefault() && + !has_f40().ValueOrDefault()) + return false; + if (has_f40().ValueOrDefault() && + !emboss_reserved_local_other.has_f40().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_f40().ValueOrDefault() && + has_f40().ValueOrDefault() && + !f40().Equals(emboss_reserved_local_other.f40())) + return false; + + + + if (!has_f41().Known()) return false; + if (!emboss_reserved_local_other.has_f41().Known()) return false; + + if (emboss_reserved_local_other.has_f41().ValueOrDefault() && + !has_f41().ValueOrDefault()) + return false; + if (has_f41().ValueOrDefault() && + !emboss_reserved_local_other.has_f41().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_f41().ValueOrDefault() && + has_f41().ValueOrDefault() && + !f41().Equals(emboss_reserved_local_other.f41())) + return false; + + + + if (!has_f42().Known()) return false; + if (!emboss_reserved_local_other.has_f42().Known()) return false; + + if (emboss_reserved_local_other.has_f42().ValueOrDefault() && + !has_f42().ValueOrDefault()) + return false; + if (has_f42().ValueOrDefault() && + !emboss_reserved_local_other.has_f42().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_f42().ValueOrDefault() && + has_f42().ValueOrDefault() && + !f42().Equals(emboss_reserved_local_other.f42())) + return false; + + + + if (!has_f43().Known()) return false; + if (!emboss_reserved_local_other.has_f43().Known()) return false; + + if (emboss_reserved_local_other.has_f43().ValueOrDefault() && + !has_f43().ValueOrDefault()) + return false; + if (has_f43().ValueOrDefault() && + !emboss_reserved_local_other.has_f43().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_f43().ValueOrDefault() && + has_f43().ValueOrDefault() && + !f43().Equals(emboss_reserved_local_other.f43())) + return false; + + + + if (!has_f44().Known()) return false; + if (!emboss_reserved_local_other.has_f44().Known()) return false; + + if (emboss_reserved_local_other.has_f44().ValueOrDefault() && + !has_f44().ValueOrDefault()) + return false; + if (has_f44().ValueOrDefault() && + !emboss_reserved_local_other.has_f44().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_f44().ValueOrDefault() && + has_f44().ValueOrDefault() && + !f44().Equals(emboss_reserved_local_other.f44())) + return false; + + + + if (!has_f45().Known()) return false; + if (!emboss_reserved_local_other.has_f45().Known()) return false; + + if (emboss_reserved_local_other.has_f45().ValueOrDefault() && + !has_f45().ValueOrDefault()) + return false; + if (has_f45().ValueOrDefault() && + !emboss_reserved_local_other.has_f45().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_f45().ValueOrDefault() && + has_f45().ValueOrDefault() && + !f45().Equals(emboss_reserved_local_other.f45())) + return false; + + + + if (!has_f46().Known()) return false; + if (!emboss_reserved_local_other.has_f46().Known()) return false; + + if (emboss_reserved_local_other.has_f46().ValueOrDefault() && + !has_f46().ValueOrDefault()) + return false; + if (has_f46().ValueOrDefault() && + !emboss_reserved_local_other.has_f46().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_f46().ValueOrDefault() && + has_f46().ValueOrDefault() && + !f46().Equals(emboss_reserved_local_other.f46())) + return false; + + + + if (!has_f47().Known()) return false; + if (!emboss_reserved_local_other.has_f47().Known()) return false; + + if (emboss_reserved_local_other.has_f47().ValueOrDefault() && + !has_f47().ValueOrDefault()) + return false; + if (has_f47().ValueOrDefault() && + !emboss_reserved_local_other.has_f47().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_f47().ValueOrDefault() && + has_f47().ValueOrDefault() && + !f47().Equals(emboss_reserved_local_other.f47())) + return false; + + + + if (!has_f48().Known()) return false; + if (!emboss_reserved_local_other.has_f48().Known()) return false; + + if (emboss_reserved_local_other.has_f48().ValueOrDefault() && + !has_f48().ValueOrDefault()) + return false; + if (has_f48().ValueOrDefault() && + !emboss_reserved_local_other.has_f48().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_f48().ValueOrDefault() && + has_f48().ValueOrDefault() && + !f48().Equals(emboss_reserved_local_other.f48())) + return false; + + + + if (!has_f49().Known()) return false; + if (!emboss_reserved_local_other.has_f49().Known()) return false; + + if (emboss_reserved_local_other.has_f49().ValueOrDefault() && + !has_f49().ValueOrDefault()) + return false; + if (has_f49().ValueOrDefault() && + !emboss_reserved_local_other.has_f49().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_f49().ValueOrDefault() && + has_f49().ValueOrDefault() && + !f49().Equals(emboss_reserved_local_other.f49())) + return false; + + + + if (!has_f50().Known()) return false; + if (!emboss_reserved_local_other.has_f50().Known()) return false; + + if (emboss_reserved_local_other.has_f50().ValueOrDefault() && + !has_f50().ValueOrDefault()) + return false; + if (has_f50().ValueOrDefault() && + !emboss_reserved_local_other.has_f50().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_f50().ValueOrDefault() && + has_f50().ValueOrDefault() && + !f50().Equals(emboss_reserved_local_other.f50())) + return false; + + + + if (!has_f51().Known()) return false; + if (!emboss_reserved_local_other.has_f51().Known()) return false; + + if (emboss_reserved_local_other.has_f51().ValueOrDefault() && + !has_f51().ValueOrDefault()) + return false; + if (has_f51().ValueOrDefault() && + !emboss_reserved_local_other.has_f51().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_f51().ValueOrDefault() && + has_f51().ValueOrDefault() && + !f51().Equals(emboss_reserved_local_other.f51())) + return false; + + + + if (!has_f52().Known()) return false; + if (!emboss_reserved_local_other.has_f52().Known()) return false; + + if (emboss_reserved_local_other.has_f52().ValueOrDefault() && + !has_f52().ValueOrDefault()) + return false; + if (has_f52().ValueOrDefault() && + !emboss_reserved_local_other.has_f52().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_f52().ValueOrDefault() && + has_f52().ValueOrDefault() && + !f52().Equals(emboss_reserved_local_other.f52())) + return false; + + + + if (!has_f53().Known()) return false; + if (!emboss_reserved_local_other.has_f53().Known()) return false; + + if (emboss_reserved_local_other.has_f53().ValueOrDefault() && + !has_f53().ValueOrDefault()) + return false; + if (has_f53().ValueOrDefault() && + !emboss_reserved_local_other.has_f53().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_f53().ValueOrDefault() && + has_f53().ValueOrDefault() && + !f53().Equals(emboss_reserved_local_other.f53())) + return false; + + + + if (!has_f54().Known()) return false; + if (!emboss_reserved_local_other.has_f54().Known()) return false; + + if (emboss_reserved_local_other.has_f54().ValueOrDefault() && + !has_f54().ValueOrDefault()) + return false; + if (has_f54().ValueOrDefault() && + !emboss_reserved_local_other.has_f54().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_f54().ValueOrDefault() && + has_f54().ValueOrDefault() && + !f54().Equals(emboss_reserved_local_other.f54())) + return false; + + + + if (!has_f55().Known()) return false; + if (!emboss_reserved_local_other.has_f55().Known()) return false; + + if (emboss_reserved_local_other.has_f55().ValueOrDefault() && + !has_f55().ValueOrDefault()) + return false; + if (has_f55().ValueOrDefault() && + !emboss_reserved_local_other.has_f55().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_f55().ValueOrDefault() && + has_f55().ValueOrDefault() && + !f55().Equals(emboss_reserved_local_other.f55())) + return false; + + + + if (!has_f56().Known()) return false; + if (!emboss_reserved_local_other.has_f56().Known()) return false; + + if (emboss_reserved_local_other.has_f56().ValueOrDefault() && + !has_f56().ValueOrDefault()) + return false; + if (has_f56().ValueOrDefault() && + !emboss_reserved_local_other.has_f56().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_f56().ValueOrDefault() && + has_f56().ValueOrDefault() && + !f56().Equals(emboss_reserved_local_other.f56())) + return false; + + + + if (!has_f57().Known()) return false; + if (!emboss_reserved_local_other.has_f57().Known()) return false; + + if (emboss_reserved_local_other.has_f57().ValueOrDefault() && + !has_f57().ValueOrDefault()) + return false; + if (has_f57().ValueOrDefault() && + !emboss_reserved_local_other.has_f57().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_f57().ValueOrDefault() && + has_f57().ValueOrDefault() && + !f57().Equals(emboss_reserved_local_other.f57())) + return false; + + + + if (!has_f58().Known()) return false; + if (!emboss_reserved_local_other.has_f58().Known()) return false; + + if (emboss_reserved_local_other.has_f58().ValueOrDefault() && + !has_f58().ValueOrDefault()) + return false; + if (has_f58().ValueOrDefault() && + !emboss_reserved_local_other.has_f58().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_f58().ValueOrDefault() && + has_f58().ValueOrDefault() && + !f58().Equals(emboss_reserved_local_other.f58())) + return false; + + + + if (!has_f59().Known()) return false; + if (!emboss_reserved_local_other.has_f59().Known()) return false; + + if (emboss_reserved_local_other.has_f59().ValueOrDefault() && + !has_f59().ValueOrDefault()) + return false; + if (has_f59().ValueOrDefault() && + !emboss_reserved_local_other.has_f59().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_f59().ValueOrDefault() && + has_f59().ValueOrDefault() && + !f59().Equals(emboss_reserved_local_other.f59())) + return false; + + + + if (!has_f60().Known()) return false; + if (!emboss_reserved_local_other.has_f60().Known()) return false; + + if (emboss_reserved_local_other.has_f60().ValueOrDefault() && + !has_f60().ValueOrDefault()) + return false; + if (has_f60().ValueOrDefault() && + !emboss_reserved_local_other.has_f60().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_f60().ValueOrDefault() && + has_f60().ValueOrDefault() && + !f60().Equals(emboss_reserved_local_other.f60())) + return false; + + + + if (!has_f61().Known()) return false; + if (!emboss_reserved_local_other.has_f61().Known()) return false; + + if (emboss_reserved_local_other.has_f61().ValueOrDefault() && + !has_f61().ValueOrDefault()) + return false; + if (has_f61().ValueOrDefault() && + !emboss_reserved_local_other.has_f61().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_f61().ValueOrDefault() && + has_f61().ValueOrDefault() && + !f61().Equals(emboss_reserved_local_other.f61())) + return false; + + + + if (!has_f62().Known()) return false; + if (!emboss_reserved_local_other.has_f62().Known()) return false; + + if (emboss_reserved_local_other.has_f62().ValueOrDefault() && + !has_f62().ValueOrDefault()) + return false; + if (has_f62().ValueOrDefault() && + !emboss_reserved_local_other.has_f62().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_f62().ValueOrDefault() && + has_f62().ValueOrDefault() && + !f62().Equals(emboss_reserved_local_other.f62())) + return false; + + + + if (!has_f63().Known()) return false; + if (!emboss_reserved_local_other.has_f63().Known()) return false; + + if (emboss_reserved_local_other.has_f63().ValueOrDefault() && + !has_f63().ValueOrDefault()) + return false; + if (has_f63().ValueOrDefault() && + !emboss_reserved_local_other.has_f63().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_f63().ValueOrDefault() && + has_f63().ValueOrDefault() && + !f63().Equals(emboss_reserved_local_other.f63())) + return false; + + + + if (!has_f64().Known()) return false; + if (!emboss_reserved_local_other.has_f64().Known()) return false; + + if (emboss_reserved_local_other.has_f64().ValueOrDefault() && + !has_f64().ValueOrDefault()) + return false; + if (has_f64().ValueOrDefault() && + !emboss_reserved_local_other.has_f64().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_f64().ValueOrDefault() && + has_f64().ValueOrDefault() && + !f64().Equals(emboss_reserved_local_other.f64())) + return false; + + + + if (!has_f65().Known()) return false; + if (!emboss_reserved_local_other.has_f65().Known()) return false; + + if (emboss_reserved_local_other.has_f65().ValueOrDefault() && + !has_f65().ValueOrDefault()) + return false; + if (has_f65().ValueOrDefault() && + !emboss_reserved_local_other.has_f65().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_f65().ValueOrDefault() && + has_f65().ValueOrDefault() && + !f65().Equals(emboss_reserved_local_other.f65())) + return false; + + + + if (!has_f66().Known()) return false; + if (!emboss_reserved_local_other.has_f66().Known()) return false; + + if (emboss_reserved_local_other.has_f66().ValueOrDefault() && + !has_f66().ValueOrDefault()) + return false; + if (has_f66().ValueOrDefault() && + !emboss_reserved_local_other.has_f66().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_f66().ValueOrDefault() && + has_f66().ValueOrDefault() && + !f66().Equals(emboss_reserved_local_other.f66())) + return false; + + + + if (!has_f67().Known()) return false; + if (!emboss_reserved_local_other.has_f67().Known()) return false; + + if (emboss_reserved_local_other.has_f67().ValueOrDefault() && + !has_f67().ValueOrDefault()) + return false; + if (has_f67().ValueOrDefault() && + !emboss_reserved_local_other.has_f67().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_f67().ValueOrDefault() && + has_f67().ValueOrDefault() && + !f67().Equals(emboss_reserved_local_other.f67())) + return false; + + + + if (!has_f68().Known()) return false; + if (!emboss_reserved_local_other.has_f68().Known()) return false; + + if (emboss_reserved_local_other.has_f68().ValueOrDefault() && + !has_f68().ValueOrDefault()) + return false; + if (has_f68().ValueOrDefault() && + !emboss_reserved_local_other.has_f68().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_f68().ValueOrDefault() && + has_f68().ValueOrDefault() && + !f68().Equals(emboss_reserved_local_other.f68())) + return false; + + + + if (!has_f69().Known()) return false; + if (!emboss_reserved_local_other.has_f69().Known()) return false; + + if (emboss_reserved_local_other.has_f69().ValueOrDefault() && + !has_f69().ValueOrDefault()) + return false; + if (has_f69().ValueOrDefault() && + !emboss_reserved_local_other.has_f69().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_f69().ValueOrDefault() && + has_f69().ValueOrDefault() && + !f69().Equals(emboss_reserved_local_other.f69())) + return false; + + + + if (!has_f70().Known()) return false; + if (!emboss_reserved_local_other.has_f70().Known()) return false; + + if (emboss_reserved_local_other.has_f70().ValueOrDefault() && + !has_f70().ValueOrDefault()) + return false; + if (has_f70().ValueOrDefault() && + !emboss_reserved_local_other.has_f70().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_f70().ValueOrDefault() && + has_f70().ValueOrDefault() && + !f70().Equals(emboss_reserved_local_other.f70())) + return false; + + + + if (!has_f71().Known()) return false; + if (!emboss_reserved_local_other.has_f71().Known()) return false; + + if (emboss_reserved_local_other.has_f71().ValueOrDefault() && + !has_f71().ValueOrDefault()) + return false; + if (has_f71().ValueOrDefault() && + !emboss_reserved_local_other.has_f71().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_f71().ValueOrDefault() && + has_f71().ValueOrDefault() && + !f71().Equals(emboss_reserved_local_other.f71())) + return false; + + + + if (!has_f72().Known()) return false; + if (!emboss_reserved_local_other.has_f72().Known()) return false; + + if (emboss_reserved_local_other.has_f72().ValueOrDefault() && + !has_f72().ValueOrDefault()) + return false; + if (has_f72().ValueOrDefault() && + !emboss_reserved_local_other.has_f72().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_f72().ValueOrDefault() && + has_f72().ValueOrDefault() && + !f72().Equals(emboss_reserved_local_other.f72())) + return false; + + + + if (!has_f73().Known()) return false; + if (!emboss_reserved_local_other.has_f73().Known()) return false; + + if (emboss_reserved_local_other.has_f73().ValueOrDefault() && + !has_f73().ValueOrDefault()) + return false; + if (has_f73().ValueOrDefault() && + !emboss_reserved_local_other.has_f73().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_f73().ValueOrDefault() && + has_f73().ValueOrDefault() && + !f73().Equals(emboss_reserved_local_other.f73())) + return false; + + + + if (!has_f74().Known()) return false; + if (!emboss_reserved_local_other.has_f74().Known()) return false; + + if (emboss_reserved_local_other.has_f74().ValueOrDefault() && + !has_f74().ValueOrDefault()) + return false; + if (has_f74().ValueOrDefault() && + !emboss_reserved_local_other.has_f74().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_f74().ValueOrDefault() && + has_f74().ValueOrDefault() && + !f74().Equals(emboss_reserved_local_other.f74())) + return false; + + + + if (!has_f75().Known()) return false; + if (!emboss_reserved_local_other.has_f75().Known()) return false; + + if (emboss_reserved_local_other.has_f75().ValueOrDefault() && + !has_f75().ValueOrDefault()) + return false; + if (has_f75().ValueOrDefault() && + !emboss_reserved_local_other.has_f75().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_f75().ValueOrDefault() && + has_f75().ValueOrDefault() && + !f75().Equals(emboss_reserved_local_other.f75())) + return false; + + + + if (!has_f76().Known()) return false; + if (!emboss_reserved_local_other.has_f76().Known()) return false; + + if (emboss_reserved_local_other.has_f76().ValueOrDefault() && + !has_f76().ValueOrDefault()) + return false; + if (has_f76().ValueOrDefault() && + !emboss_reserved_local_other.has_f76().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_f76().ValueOrDefault() && + has_f76().ValueOrDefault() && + !f76().Equals(emboss_reserved_local_other.f76())) + return false; + + + + if (!has_f77().Known()) return false; + if (!emboss_reserved_local_other.has_f77().Known()) return false; + + if (emboss_reserved_local_other.has_f77().ValueOrDefault() && + !has_f77().ValueOrDefault()) + return false; + if (has_f77().ValueOrDefault() && + !emboss_reserved_local_other.has_f77().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_f77().ValueOrDefault() && + has_f77().ValueOrDefault() && + !f77().Equals(emboss_reserved_local_other.f77())) + return false; + + + + if (!has_f78().Known()) return false; + if (!emboss_reserved_local_other.has_f78().Known()) return false; + + if (emboss_reserved_local_other.has_f78().ValueOrDefault() && + !has_f78().ValueOrDefault()) + return false; + if (has_f78().ValueOrDefault() && + !emboss_reserved_local_other.has_f78().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_f78().ValueOrDefault() && + has_f78().ValueOrDefault() && + !f78().Equals(emboss_reserved_local_other.f78())) + return false; + + + + if (!has_f79().Known()) return false; + if (!emboss_reserved_local_other.has_f79().Known()) return false; + + if (emboss_reserved_local_other.has_f79().ValueOrDefault() && + !has_f79().ValueOrDefault()) + return false; + if (has_f79().ValueOrDefault() && + !emboss_reserved_local_other.has_f79().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_f79().ValueOrDefault() && + has_f79().ValueOrDefault() && + !f79().Equals(emboss_reserved_local_other.f79())) + return false; + + + + if (!has_f80().Known()) return false; + if (!emboss_reserved_local_other.has_f80().Known()) return false; + + if (emboss_reserved_local_other.has_f80().ValueOrDefault() && + !has_f80().ValueOrDefault()) + return false; + if (has_f80().ValueOrDefault() && + !emboss_reserved_local_other.has_f80().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_f80().ValueOrDefault() && + has_f80().ValueOrDefault() && + !f80().Equals(emboss_reserved_local_other.f80())) + return false; + + + + if (!has_f81().Known()) return false; + if (!emboss_reserved_local_other.has_f81().Known()) return false; + + if (emboss_reserved_local_other.has_f81().ValueOrDefault() && + !has_f81().ValueOrDefault()) + return false; + if (has_f81().ValueOrDefault() && + !emboss_reserved_local_other.has_f81().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_f81().ValueOrDefault() && + has_f81().ValueOrDefault() && + !f81().Equals(emboss_reserved_local_other.f81())) + return false; + + + + if (!has_f82().Known()) return false; + if (!emboss_reserved_local_other.has_f82().Known()) return false; + + if (emboss_reserved_local_other.has_f82().ValueOrDefault() && + !has_f82().ValueOrDefault()) + return false; + if (has_f82().ValueOrDefault() && + !emboss_reserved_local_other.has_f82().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_f82().ValueOrDefault() && + has_f82().ValueOrDefault() && + !f82().Equals(emboss_reserved_local_other.f82())) + return false; + + + + if (!has_f83().Known()) return false; + if (!emboss_reserved_local_other.has_f83().Known()) return false; + + if (emboss_reserved_local_other.has_f83().ValueOrDefault() && + !has_f83().ValueOrDefault()) + return false; + if (has_f83().ValueOrDefault() && + !emboss_reserved_local_other.has_f83().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_f83().ValueOrDefault() && + has_f83().ValueOrDefault() && + !f83().Equals(emboss_reserved_local_other.f83())) + return false; + + + + if (!has_f84().Known()) return false; + if (!emboss_reserved_local_other.has_f84().Known()) return false; + + if (emboss_reserved_local_other.has_f84().ValueOrDefault() && + !has_f84().ValueOrDefault()) + return false; + if (has_f84().ValueOrDefault() && + !emboss_reserved_local_other.has_f84().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_f84().ValueOrDefault() && + has_f84().ValueOrDefault() && + !f84().Equals(emboss_reserved_local_other.f84())) + return false; + + + + if (!has_f85().Known()) return false; + if (!emboss_reserved_local_other.has_f85().Known()) return false; + + if (emboss_reserved_local_other.has_f85().ValueOrDefault() && + !has_f85().ValueOrDefault()) + return false; + if (has_f85().ValueOrDefault() && + !emboss_reserved_local_other.has_f85().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_f85().ValueOrDefault() && + has_f85().ValueOrDefault() && + !f85().Equals(emboss_reserved_local_other.f85())) + return false; + + + + if (!has_f86().Known()) return false; + if (!emboss_reserved_local_other.has_f86().Known()) return false; + + if (emboss_reserved_local_other.has_f86().ValueOrDefault() && + !has_f86().ValueOrDefault()) + return false; + if (has_f86().ValueOrDefault() && + !emboss_reserved_local_other.has_f86().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_f86().ValueOrDefault() && + has_f86().ValueOrDefault() && + !f86().Equals(emboss_reserved_local_other.f86())) + return false; + + + + if (!has_f87().Known()) return false; + if (!emboss_reserved_local_other.has_f87().Known()) return false; + + if (emboss_reserved_local_other.has_f87().ValueOrDefault() && + !has_f87().ValueOrDefault()) + return false; + if (has_f87().ValueOrDefault() && + !emboss_reserved_local_other.has_f87().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_f87().ValueOrDefault() && + has_f87().ValueOrDefault() && + !f87().Equals(emboss_reserved_local_other.f87())) + return false; + + + + if (!has_f88().Known()) return false; + if (!emboss_reserved_local_other.has_f88().Known()) return false; + + if (emboss_reserved_local_other.has_f88().ValueOrDefault() && + !has_f88().ValueOrDefault()) + return false; + if (has_f88().ValueOrDefault() && + !emboss_reserved_local_other.has_f88().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_f88().ValueOrDefault() && + has_f88().ValueOrDefault() && + !f88().Equals(emboss_reserved_local_other.f88())) + return false; + + + + if (!has_f89().Known()) return false; + if (!emboss_reserved_local_other.has_f89().Known()) return false; + + if (emboss_reserved_local_other.has_f89().ValueOrDefault() && + !has_f89().ValueOrDefault()) + return false; + if (has_f89().ValueOrDefault() && + !emboss_reserved_local_other.has_f89().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_f89().ValueOrDefault() && + has_f89().ValueOrDefault() && + !f89().Equals(emboss_reserved_local_other.f89())) + return false; + + + + if (!has_f90().Known()) return false; + if (!emboss_reserved_local_other.has_f90().Known()) return false; + + if (emboss_reserved_local_other.has_f90().ValueOrDefault() && + !has_f90().ValueOrDefault()) + return false; + if (has_f90().ValueOrDefault() && + !emboss_reserved_local_other.has_f90().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_f90().ValueOrDefault() && + has_f90().ValueOrDefault() && + !f90().Equals(emboss_reserved_local_other.f90())) + return false; + + + + if (!has_f91().Known()) return false; + if (!emboss_reserved_local_other.has_f91().Known()) return false; + + if (emboss_reserved_local_other.has_f91().ValueOrDefault() && + !has_f91().ValueOrDefault()) + return false; + if (has_f91().ValueOrDefault() && + !emboss_reserved_local_other.has_f91().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_f91().ValueOrDefault() && + has_f91().ValueOrDefault() && + !f91().Equals(emboss_reserved_local_other.f91())) + return false; + + + + if (!has_f92().Known()) return false; + if (!emboss_reserved_local_other.has_f92().Known()) return false; + + if (emboss_reserved_local_other.has_f92().ValueOrDefault() && + !has_f92().ValueOrDefault()) + return false; + if (has_f92().ValueOrDefault() && + !emboss_reserved_local_other.has_f92().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_f92().ValueOrDefault() && + has_f92().ValueOrDefault() && + !f92().Equals(emboss_reserved_local_other.f92())) + return false; + + + + if (!has_f93().Known()) return false; + if (!emboss_reserved_local_other.has_f93().Known()) return false; + + if (emboss_reserved_local_other.has_f93().ValueOrDefault() && + !has_f93().ValueOrDefault()) + return false; + if (has_f93().ValueOrDefault() && + !emboss_reserved_local_other.has_f93().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_f93().ValueOrDefault() && + has_f93().ValueOrDefault() && + !f93().Equals(emboss_reserved_local_other.f93())) + return false; + + + + if (!has_f94().Known()) return false; + if (!emboss_reserved_local_other.has_f94().Known()) return false; + + if (emboss_reserved_local_other.has_f94().ValueOrDefault() && + !has_f94().ValueOrDefault()) + return false; + if (has_f94().ValueOrDefault() && + !emboss_reserved_local_other.has_f94().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_f94().ValueOrDefault() && + has_f94().ValueOrDefault() && + !f94().Equals(emboss_reserved_local_other.f94())) + return false; + + + + if (!has_f95().Known()) return false; + if (!emboss_reserved_local_other.has_f95().Known()) return false; + + if (emboss_reserved_local_other.has_f95().ValueOrDefault() && + !has_f95().ValueOrDefault()) + return false; + if (has_f95().ValueOrDefault() && + !emboss_reserved_local_other.has_f95().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_f95().ValueOrDefault() && + has_f95().ValueOrDefault() && + !f95().Equals(emboss_reserved_local_other.f95())) + return false; + + + + if (!has_f96().Known()) return false; + if (!emboss_reserved_local_other.has_f96().Known()) return false; + + if (emboss_reserved_local_other.has_f96().ValueOrDefault() && + !has_f96().ValueOrDefault()) + return false; + if (has_f96().ValueOrDefault() && + !emboss_reserved_local_other.has_f96().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_f96().ValueOrDefault() && + has_f96().ValueOrDefault() && + !f96().Equals(emboss_reserved_local_other.f96())) + return false; + + + + if (!has_f97().Known()) return false; + if (!emboss_reserved_local_other.has_f97().Known()) return false; + + if (emboss_reserved_local_other.has_f97().ValueOrDefault() && + !has_f97().ValueOrDefault()) + return false; + if (has_f97().ValueOrDefault() && + !emboss_reserved_local_other.has_f97().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_f97().ValueOrDefault() && + has_f97().ValueOrDefault() && + !f97().Equals(emboss_reserved_local_other.f97())) + return false; + + + + if (!has_f98().Known()) return false; + if (!emboss_reserved_local_other.has_f98().Known()) return false; + + if (emboss_reserved_local_other.has_f98().ValueOrDefault() && + !has_f98().ValueOrDefault()) + return false; + if (has_f98().ValueOrDefault() && + !emboss_reserved_local_other.has_f98().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_f98().ValueOrDefault() && + has_f98().ValueOrDefault() && + !f98().Equals(emboss_reserved_local_other.f98())) + return false; + + + + if (!has_f99().Known()) return false; + if (!emboss_reserved_local_other.has_f99().Known()) return false; + + if (emboss_reserved_local_other.has_f99().ValueOrDefault() && + !has_f99().ValueOrDefault()) + return false; + if (has_f99().ValueOrDefault() && + !emboss_reserved_local_other.has_f99().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_f99().ValueOrDefault() && + has_f99().ValueOrDefault() && + !f99().Equals(emboss_reserved_local_other.f99())) + return false; + + return true; + } + template + bool UncheckedEquals( + GenericLargeConditionalsView emboss_reserved_local_other) const { + + if (emboss_reserved_local_other.has_tag().ValueOr(false) && + !has_tag().ValueOr(false)) + return false; + if (has_tag().ValueOr(false) && + !emboss_reserved_local_other.has_tag().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_tag().ValueOr(false) && + has_tag().ValueOr(false) && + !tag().UncheckedEquals(emboss_reserved_local_other.tag())) + return false; + + + + if (emboss_reserved_local_other.has_f0().ValueOr(false) && + !has_f0().ValueOr(false)) + return false; + if (has_f0().ValueOr(false) && + !emboss_reserved_local_other.has_f0().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_f0().ValueOr(false) && + has_f0().ValueOr(false) && + !f0().UncheckedEquals(emboss_reserved_local_other.f0())) + return false; + + + + if (emboss_reserved_local_other.has_f1().ValueOr(false) && + !has_f1().ValueOr(false)) + return false; + if (has_f1().ValueOr(false) && + !emboss_reserved_local_other.has_f1().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_f1().ValueOr(false) && + has_f1().ValueOr(false) && + !f1().UncheckedEquals(emboss_reserved_local_other.f1())) + return false; + + + + if (emboss_reserved_local_other.has_f2().ValueOr(false) && + !has_f2().ValueOr(false)) + return false; + if (has_f2().ValueOr(false) && + !emboss_reserved_local_other.has_f2().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_f2().ValueOr(false) && + has_f2().ValueOr(false) && + !f2().UncheckedEquals(emboss_reserved_local_other.f2())) + return false; + + + + if (emboss_reserved_local_other.has_f3().ValueOr(false) && + !has_f3().ValueOr(false)) + return false; + if (has_f3().ValueOr(false) && + !emboss_reserved_local_other.has_f3().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_f3().ValueOr(false) && + has_f3().ValueOr(false) && + !f3().UncheckedEquals(emboss_reserved_local_other.f3())) + return false; + + + + if (emboss_reserved_local_other.has_f4().ValueOr(false) && + !has_f4().ValueOr(false)) + return false; + if (has_f4().ValueOr(false) && + !emboss_reserved_local_other.has_f4().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_f4().ValueOr(false) && + has_f4().ValueOr(false) && + !f4().UncheckedEquals(emboss_reserved_local_other.f4())) + return false; + + + + if (emboss_reserved_local_other.has_f5().ValueOr(false) && + !has_f5().ValueOr(false)) + return false; + if (has_f5().ValueOr(false) && + !emboss_reserved_local_other.has_f5().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_f5().ValueOr(false) && + has_f5().ValueOr(false) && + !f5().UncheckedEquals(emboss_reserved_local_other.f5())) + return false; + + + + if (emboss_reserved_local_other.has_f6().ValueOr(false) && + !has_f6().ValueOr(false)) + return false; + if (has_f6().ValueOr(false) && + !emboss_reserved_local_other.has_f6().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_f6().ValueOr(false) && + has_f6().ValueOr(false) && + !f6().UncheckedEquals(emboss_reserved_local_other.f6())) + return false; + + + + if (emboss_reserved_local_other.has_f7().ValueOr(false) && + !has_f7().ValueOr(false)) + return false; + if (has_f7().ValueOr(false) && + !emboss_reserved_local_other.has_f7().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_f7().ValueOr(false) && + has_f7().ValueOr(false) && + !f7().UncheckedEquals(emboss_reserved_local_other.f7())) + return false; + + + + if (emboss_reserved_local_other.has_f8().ValueOr(false) && + !has_f8().ValueOr(false)) + return false; + if (has_f8().ValueOr(false) && + !emboss_reserved_local_other.has_f8().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_f8().ValueOr(false) && + has_f8().ValueOr(false) && + !f8().UncheckedEquals(emboss_reserved_local_other.f8())) + return false; + + + + if (emboss_reserved_local_other.has_f9().ValueOr(false) && + !has_f9().ValueOr(false)) + return false; + if (has_f9().ValueOr(false) && + !emboss_reserved_local_other.has_f9().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_f9().ValueOr(false) && + has_f9().ValueOr(false) && + !f9().UncheckedEquals(emboss_reserved_local_other.f9())) + return false; + + + + if (emboss_reserved_local_other.has_f10().ValueOr(false) && + !has_f10().ValueOr(false)) + return false; + if (has_f10().ValueOr(false) && + !emboss_reserved_local_other.has_f10().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_f10().ValueOr(false) && + has_f10().ValueOr(false) && + !f10().UncheckedEquals(emboss_reserved_local_other.f10())) + return false; + + + + if (emboss_reserved_local_other.has_f11().ValueOr(false) && + !has_f11().ValueOr(false)) + return false; + if (has_f11().ValueOr(false) && + !emboss_reserved_local_other.has_f11().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_f11().ValueOr(false) && + has_f11().ValueOr(false) && + !f11().UncheckedEquals(emboss_reserved_local_other.f11())) + return false; + + + + if (emboss_reserved_local_other.has_f12().ValueOr(false) && + !has_f12().ValueOr(false)) + return false; + if (has_f12().ValueOr(false) && + !emboss_reserved_local_other.has_f12().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_f12().ValueOr(false) && + has_f12().ValueOr(false) && + !f12().UncheckedEquals(emboss_reserved_local_other.f12())) + return false; + + + + if (emboss_reserved_local_other.has_f13().ValueOr(false) && + !has_f13().ValueOr(false)) + return false; + if (has_f13().ValueOr(false) && + !emboss_reserved_local_other.has_f13().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_f13().ValueOr(false) && + has_f13().ValueOr(false) && + !f13().UncheckedEquals(emboss_reserved_local_other.f13())) + return false; + + + + if (emboss_reserved_local_other.has_f14().ValueOr(false) && + !has_f14().ValueOr(false)) + return false; + if (has_f14().ValueOr(false) && + !emboss_reserved_local_other.has_f14().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_f14().ValueOr(false) && + has_f14().ValueOr(false) && + !f14().UncheckedEquals(emboss_reserved_local_other.f14())) + return false; + + + + if (emboss_reserved_local_other.has_f15().ValueOr(false) && + !has_f15().ValueOr(false)) + return false; + if (has_f15().ValueOr(false) && + !emboss_reserved_local_other.has_f15().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_f15().ValueOr(false) && + has_f15().ValueOr(false) && + !f15().UncheckedEquals(emboss_reserved_local_other.f15())) + return false; + + + + if (emboss_reserved_local_other.has_f16().ValueOr(false) && + !has_f16().ValueOr(false)) + return false; + if (has_f16().ValueOr(false) && + !emboss_reserved_local_other.has_f16().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_f16().ValueOr(false) && + has_f16().ValueOr(false) && + !f16().UncheckedEquals(emboss_reserved_local_other.f16())) + return false; + + + + if (emboss_reserved_local_other.has_f17().ValueOr(false) && + !has_f17().ValueOr(false)) + return false; + if (has_f17().ValueOr(false) && + !emboss_reserved_local_other.has_f17().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_f17().ValueOr(false) && + has_f17().ValueOr(false) && + !f17().UncheckedEquals(emboss_reserved_local_other.f17())) + return false; + + + + if (emboss_reserved_local_other.has_f18().ValueOr(false) && + !has_f18().ValueOr(false)) + return false; + if (has_f18().ValueOr(false) && + !emboss_reserved_local_other.has_f18().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_f18().ValueOr(false) && + has_f18().ValueOr(false) && + !f18().UncheckedEquals(emboss_reserved_local_other.f18())) + return false; + + + + if (emboss_reserved_local_other.has_f19().ValueOr(false) && + !has_f19().ValueOr(false)) + return false; + if (has_f19().ValueOr(false) && + !emboss_reserved_local_other.has_f19().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_f19().ValueOr(false) && + has_f19().ValueOr(false) && + !f19().UncheckedEquals(emboss_reserved_local_other.f19())) + return false; + + + + if (emboss_reserved_local_other.has_f20().ValueOr(false) && + !has_f20().ValueOr(false)) + return false; + if (has_f20().ValueOr(false) && + !emboss_reserved_local_other.has_f20().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_f20().ValueOr(false) && + has_f20().ValueOr(false) && + !f20().UncheckedEquals(emboss_reserved_local_other.f20())) + return false; + + + + if (emboss_reserved_local_other.has_f21().ValueOr(false) && + !has_f21().ValueOr(false)) + return false; + if (has_f21().ValueOr(false) && + !emboss_reserved_local_other.has_f21().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_f21().ValueOr(false) && + has_f21().ValueOr(false) && + !f21().UncheckedEquals(emboss_reserved_local_other.f21())) + return false; + + + + if (emboss_reserved_local_other.has_f22().ValueOr(false) && + !has_f22().ValueOr(false)) + return false; + if (has_f22().ValueOr(false) && + !emboss_reserved_local_other.has_f22().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_f22().ValueOr(false) && + has_f22().ValueOr(false) && + !f22().UncheckedEquals(emboss_reserved_local_other.f22())) + return false; + + + + if (emboss_reserved_local_other.has_f23().ValueOr(false) && + !has_f23().ValueOr(false)) + return false; + if (has_f23().ValueOr(false) && + !emboss_reserved_local_other.has_f23().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_f23().ValueOr(false) && + has_f23().ValueOr(false) && + !f23().UncheckedEquals(emboss_reserved_local_other.f23())) + return false; + + + + if (emboss_reserved_local_other.has_f24().ValueOr(false) && + !has_f24().ValueOr(false)) + return false; + if (has_f24().ValueOr(false) && + !emboss_reserved_local_other.has_f24().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_f24().ValueOr(false) && + has_f24().ValueOr(false) && + !f24().UncheckedEquals(emboss_reserved_local_other.f24())) + return false; + + + + if (emboss_reserved_local_other.has_f25().ValueOr(false) && + !has_f25().ValueOr(false)) + return false; + if (has_f25().ValueOr(false) && + !emboss_reserved_local_other.has_f25().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_f25().ValueOr(false) && + has_f25().ValueOr(false) && + !f25().UncheckedEquals(emboss_reserved_local_other.f25())) + return false; + + + + if (emboss_reserved_local_other.has_f26().ValueOr(false) && + !has_f26().ValueOr(false)) + return false; + if (has_f26().ValueOr(false) && + !emboss_reserved_local_other.has_f26().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_f26().ValueOr(false) && + has_f26().ValueOr(false) && + !f26().UncheckedEquals(emboss_reserved_local_other.f26())) + return false; + + + + if (emboss_reserved_local_other.has_f27().ValueOr(false) && + !has_f27().ValueOr(false)) + return false; + if (has_f27().ValueOr(false) && + !emboss_reserved_local_other.has_f27().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_f27().ValueOr(false) && + has_f27().ValueOr(false) && + !f27().UncheckedEquals(emboss_reserved_local_other.f27())) + return false; + + + + if (emboss_reserved_local_other.has_f28().ValueOr(false) && + !has_f28().ValueOr(false)) + return false; + if (has_f28().ValueOr(false) && + !emboss_reserved_local_other.has_f28().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_f28().ValueOr(false) && + has_f28().ValueOr(false) && + !f28().UncheckedEquals(emboss_reserved_local_other.f28())) + return false; + + + + if (emboss_reserved_local_other.has_f29().ValueOr(false) && + !has_f29().ValueOr(false)) + return false; + if (has_f29().ValueOr(false) && + !emboss_reserved_local_other.has_f29().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_f29().ValueOr(false) && + has_f29().ValueOr(false) && + !f29().UncheckedEquals(emboss_reserved_local_other.f29())) + return false; + + + + if (emboss_reserved_local_other.has_f30().ValueOr(false) && + !has_f30().ValueOr(false)) + return false; + if (has_f30().ValueOr(false) && + !emboss_reserved_local_other.has_f30().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_f30().ValueOr(false) && + has_f30().ValueOr(false) && + !f30().UncheckedEquals(emboss_reserved_local_other.f30())) + return false; + + + + if (emboss_reserved_local_other.has_f31().ValueOr(false) && + !has_f31().ValueOr(false)) + return false; + if (has_f31().ValueOr(false) && + !emboss_reserved_local_other.has_f31().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_f31().ValueOr(false) && + has_f31().ValueOr(false) && + !f31().UncheckedEquals(emboss_reserved_local_other.f31())) + return false; + + + + if (emboss_reserved_local_other.has_f32().ValueOr(false) && + !has_f32().ValueOr(false)) + return false; + if (has_f32().ValueOr(false) && + !emboss_reserved_local_other.has_f32().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_f32().ValueOr(false) && + has_f32().ValueOr(false) && + !f32().UncheckedEquals(emboss_reserved_local_other.f32())) + return false; + + + + if (emboss_reserved_local_other.has_f33().ValueOr(false) && + !has_f33().ValueOr(false)) + return false; + if (has_f33().ValueOr(false) && + !emboss_reserved_local_other.has_f33().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_f33().ValueOr(false) && + has_f33().ValueOr(false) && + !f33().UncheckedEquals(emboss_reserved_local_other.f33())) + return false; + + + + if (emboss_reserved_local_other.has_f34().ValueOr(false) && + !has_f34().ValueOr(false)) + return false; + if (has_f34().ValueOr(false) && + !emboss_reserved_local_other.has_f34().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_f34().ValueOr(false) && + has_f34().ValueOr(false) && + !f34().UncheckedEquals(emboss_reserved_local_other.f34())) + return false; + + + + if (emboss_reserved_local_other.has_f35().ValueOr(false) && + !has_f35().ValueOr(false)) + return false; + if (has_f35().ValueOr(false) && + !emboss_reserved_local_other.has_f35().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_f35().ValueOr(false) && + has_f35().ValueOr(false) && + !f35().UncheckedEquals(emboss_reserved_local_other.f35())) + return false; + + + + if (emboss_reserved_local_other.has_f36().ValueOr(false) && + !has_f36().ValueOr(false)) + return false; + if (has_f36().ValueOr(false) && + !emboss_reserved_local_other.has_f36().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_f36().ValueOr(false) && + has_f36().ValueOr(false) && + !f36().UncheckedEquals(emboss_reserved_local_other.f36())) + return false; + + + + if (emboss_reserved_local_other.has_f37().ValueOr(false) && + !has_f37().ValueOr(false)) + return false; + if (has_f37().ValueOr(false) && + !emboss_reserved_local_other.has_f37().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_f37().ValueOr(false) && + has_f37().ValueOr(false) && + !f37().UncheckedEquals(emboss_reserved_local_other.f37())) + return false; + + + + if (emboss_reserved_local_other.has_f38().ValueOr(false) && + !has_f38().ValueOr(false)) + return false; + if (has_f38().ValueOr(false) && + !emboss_reserved_local_other.has_f38().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_f38().ValueOr(false) && + has_f38().ValueOr(false) && + !f38().UncheckedEquals(emboss_reserved_local_other.f38())) + return false; + + + + if (emboss_reserved_local_other.has_f39().ValueOr(false) && + !has_f39().ValueOr(false)) + return false; + if (has_f39().ValueOr(false) && + !emboss_reserved_local_other.has_f39().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_f39().ValueOr(false) && + has_f39().ValueOr(false) && + !f39().UncheckedEquals(emboss_reserved_local_other.f39())) + return false; + + + + if (emboss_reserved_local_other.has_f40().ValueOr(false) && + !has_f40().ValueOr(false)) + return false; + if (has_f40().ValueOr(false) && + !emboss_reserved_local_other.has_f40().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_f40().ValueOr(false) && + has_f40().ValueOr(false) && + !f40().UncheckedEquals(emboss_reserved_local_other.f40())) + return false; + + + + if (emboss_reserved_local_other.has_f41().ValueOr(false) && + !has_f41().ValueOr(false)) + return false; + if (has_f41().ValueOr(false) && + !emboss_reserved_local_other.has_f41().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_f41().ValueOr(false) && + has_f41().ValueOr(false) && + !f41().UncheckedEquals(emboss_reserved_local_other.f41())) + return false; + + + + if (emboss_reserved_local_other.has_f42().ValueOr(false) && + !has_f42().ValueOr(false)) + return false; + if (has_f42().ValueOr(false) && + !emboss_reserved_local_other.has_f42().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_f42().ValueOr(false) && + has_f42().ValueOr(false) && + !f42().UncheckedEquals(emboss_reserved_local_other.f42())) + return false; + + + + if (emboss_reserved_local_other.has_f43().ValueOr(false) && + !has_f43().ValueOr(false)) + return false; + if (has_f43().ValueOr(false) && + !emboss_reserved_local_other.has_f43().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_f43().ValueOr(false) && + has_f43().ValueOr(false) && + !f43().UncheckedEquals(emboss_reserved_local_other.f43())) + return false; + + + + if (emboss_reserved_local_other.has_f44().ValueOr(false) && + !has_f44().ValueOr(false)) + return false; + if (has_f44().ValueOr(false) && + !emboss_reserved_local_other.has_f44().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_f44().ValueOr(false) && + has_f44().ValueOr(false) && + !f44().UncheckedEquals(emboss_reserved_local_other.f44())) + return false; + + + + if (emboss_reserved_local_other.has_f45().ValueOr(false) && + !has_f45().ValueOr(false)) + return false; + if (has_f45().ValueOr(false) && + !emboss_reserved_local_other.has_f45().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_f45().ValueOr(false) && + has_f45().ValueOr(false) && + !f45().UncheckedEquals(emboss_reserved_local_other.f45())) + return false; + + + + if (emboss_reserved_local_other.has_f46().ValueOr(false) && + !has_f46().ValueOr(false)) + return false; + if (has_f46().ValueOr(false) && + !emboss_reserved_local_other.has_f46().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_f46().ValueOr(false) && + has_f46().ValueOr(false) && + !f46().UncheckedEquals(emboss_reserved_local_other.f46())) + return false; + + + + if (emboss_reserved_local_other.has_f47().ValueOr(false) && + !has_f47().ValueOr(false)) + return false; + if (has_f47().ValueOr(false) && + !emboss_reserved_local_other.has_f47().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_f47().ValueOr(false) && + has_f47().ValueOr(false) && + !f47().UncheckedEquals(emboss_reserved_local_other.f47())) + return false; + + + + if (emboss_reserved_local_other.has_f48().ValueOr(false) && + !has_f48().ValueOr(false)) + return false; + if (has_f48().ValueOr(false) && + !emboss_reserved_local_other.has_f48().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_f48().ValueOr(false) && + has_f48().ValueOr(false) && + !f48().UncheckedEquals(emboss_reserved_local_other.f48())) + return false; + + + + if (emboss_reserved_local_other.has_f49().ValueOr(false) && + !has_f49().ValueOr(false)) + return false; + if (has_f49().ValueOr(false) && + !emboss_reserved_local_other.has_f49().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_f49().ValueOr(false) && + has_f49().ValueOr(false) && + !f49().UncheckedEquals(emboss_reserved_local_other.f49())) + return false; + + + + if (emboss_reserved_local_other.has_f50().ValueOr(false) && + !has_f50().ValueOr(false)) + return false; + if (has_f50().ValueOr(false) && + !emboss_reserved_local_other.has_f50().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_f50().ValueOr(false) && + has_f50().ValueOr(false) && + !f50().UncheckedEquals(emboss_reserved_local_other.f50())) + return false; + + + + if (emboss_reserved_local_other.has_f51().ValueOr(false) && + !has_f51().ValueOr(false)) + return false; + if (has_f51().ValueOr(false) && + !emboss_reserved_local_other.has_f51().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_f51().ValueOr(false) && + has_f51().ValueOr(false) && + !f51().UncheckedEquals(emboss_reserved_local_other.f51())) + return false; + + + + if (emboss_reserved_local_other.has_f52().ValueOr(false) && + !has_f52().ValueOr(false)) + return false; + if (has_f52().ValueOr(false) && + !emboss_reserved_local_other.has_f52().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_f52().ValueOr(false) && + has_f52().ValueOr(false) && + !f52().UncheckedEquals(emboss_reserved_local_other.f52())) + return false; + + + + if (emboss_reserved_local_other.has_f53().ValueOr(false) && + !has_f53().ValueOr(false)) + return false; + if (has_f53().ValueOr(false) && + !emboss_reserved_local_other.has_f53().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_f53().ValueOr(false) && + has_f53().ValueOr(false) && + !f53().UncheckedEquals(emboss_reserved_local_other.f53())) + return false; + + + + if (emboss_reserved_local_other.has_f54().ValueOr(false) && + !has_f54().ValueOr(false)) + return false; + if (has_f54().ValueOr(false) && + !emboss_reserved_local_other.has_f54().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_f54().ValueOr(false) && + has_f54().ValueOr(false) && + !f54().UncheckedEquals(emboss_reserved_local_other.f54())) + return false; + + + + if (emboss_reserved_local_other.has_f55().ValueOr(false) && + !has_f55().ValueOr(false)) + return false; + if (has_f55().ValueOr(false) && + !emboss_reserved_local_other.has_f55().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_f55().ValueOr(false) && + has_f55().ValueOr(false) && + !f55().UncheckedEquals(emboss_reserved_local_other.f55())) + return false; + + + + if (emboss_reserved_local_other.has_f56().ValueOr(false) && + !has_f56().ValueOr(false)) + return false; + if (has_f56().ValueOr(false) && + !emboss_reserved_local_other.has_f56().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_f56().ValueOr(false) && + has_f56().ValueOr(false) && + !f56().UncheckedEquals(emboss_reserved_local_other.f56())) + return false; + + + + if (emboss_reserved_local_other.has_f57().ValueOr(false) && + !has_f57().ValueOr(false)) + return false; + if (has_f57().ValueOr(false) && + !emboss_reserved_local_other.has_f57().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_f57().ValueOr(false) && + has_f57().ValueOr(false) && + !f57().UncheckedEquals(emboss_reserved_local_other.f57())) + return false; + + + + if (emboss_reserved_local_other.has_f58().ValueOr(false) && + !has_f58().ValueOr(false)) + return false; + if (has_f58().ValueOr(false) && + !emboss_reserved_local_other.has_f58().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_f58().ValueOr(false) && + has_f58().ValueOr(false) && + !f58().UncheckedEquals(emboss_reserved_local_other.f58())) + return false; + + + + if (emboss_reserved_local_other.has_f59().ValueOr(false) && + !has_f59().ValueOr(false)) + return false; + if (has_f59().ValueOr(false) && + !emboss_reserved_local_other.has_f59().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_f59().ValueOr(false) && + has_f59().ValueOr(false) && + !f59().UncheckedEquals(emboss_reserved_local_other.f59())) + return false; + + + + if (emboss_reserved_local_other.has_f60().ValueOr(false) && + !has_f60().ValueOr(false)) + return false; + if (has_f60().ValueOr(false) && + !emboss_reserved_local_other.has_f60().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_f60().ValueOr(false) && + has_f60().ValueOr(false) && + !f60().UncheckedEquals(emboss_reserved_local_other.f60())) + return false; + + + + if (emboss_reserved_local_other.has_f61().ValueOr(false) && + !has_f61().ValueOr(false)) + return false; + if (has_f61().ValueOr(false) && + !emboss_reserved_local_other.has_f61().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_f61().ValueOr(false) && + has_f61().ValueOr(false) && + !f61().UncheckedEquals(emboss_reserved_local_other.f61())) + return false; + + + + if (emboss_reserved_local_other.has_f62().ValueOr(false) && + !has_f62().ValueOr(false)) + return false; + if (has_f62().ValueOr(false) && + !emboss_reserved_local_other.has_f62().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_f62().ValueOr(false) && + has_f62().ValueOr(false) && + !f62().UncheckedEquals(emboss_reserved_local_other.f62())) + return false; + + + + if (emboss_reserved_local_other.has_f63().ValueOr(false) && + !has_f63().ValueOr(false)) + return false; + if (has_f63().ValueOr(false) && + !emboss_reserved_local_other.has_f63().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_f63().ValueOr(false) && + has_f63().ValueOr(false) && + !f63().UncheckedEquals(emboss_reserved_local_other.f63())) + return false; + + + + if (emboss_reserved_local_other.has_f64().ValueOr(false) && + !has_f64().ValueOr(false)) + return false; + if (has_f64().ValueOr(false) && + !emboss_reserved_local_other.has_f64().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_f64().ValueOr(false) && + has_f64().ValueOr(false) && + !f64().UncheckedEquals(emboss_reserved_local_other.f64())) + return false; + + + + if (emboss_reserved_local_other.has_f65().ValueOr(false) && + !has_f65().ValueOr(false)) + return false; + if (has_f65().ValueOr(false) && + !emboss_reserved_local_other.has_f65().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_f65().ValueOr(false) && + has_f65().ValueOr(false) && + !f65().UncheckedEquals(emboss_reserved_local_other.f65())) + return false; + + + + if (emboss_reserved_local_other.has_f66().ValueOr(false) && + !has_f66().ValueOr(false)) + return false; + if (has_f66().ValueOr(false) && + !emboss_reserved_local_other.has_f66().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_f66().ValueOr(false) && + has_f66().ValueOr(false) && + !f66().UncheckedEquals(emboss_reserved_local_other.f66())) + return false; + + + + if (emboss_reserved_local_other.has_f67().ValueOr(false) && + !has_f67().ValueOr(false)) + return false; + if (has_f67().ValueOr(false) && + !emboss_reserved_local_other.has_f67().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_f67().ValueOr(false) && + has_f67().ValueOr(false) && + !f67().UncheckedEquals(emboss_reserved_local_other.f67())) + return false; + + + + if (emboss_reserved_local_other.has_f68().ValueOr(false) && + !has_f68().ValueOr(false)) + return false; + if (has_f68().ValueOr(false) && + !emboss_reserved_local_other.has_f68().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_f68().ValueOr(false) && + has_f68().ValueOr(false) && + !f68().UncheckedEquals(emboss_reserved_local_other.f68())) + return false; + + + + if (emboss_reserved_local_other.has_f69().ValueOr(false) && + !has_f69().ValueOr(false)) + return false; + if (has_f69().ValueOr(false) && + !emboss_reserved_local_other.has_f69().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_f69().ValueOr(false) && + has_f69().ValueOr(false) && + !f69().UncheckedEquals(emboss_reserved_local_other.f69())) + return false; + + + + if (emboss_reserved_local_other.has_f70().ValueOr(false) && + !has_f70().ValueOr(false)) + return false; + if (has_f70().ValueOr(false) && + !emboss_reserved_local_other.has_f70().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_f70().ValueOr(false) && + has_f70().ValueOr(false) && + !f70().UncheckedEquals(emboss_reserved_local_other.f70())) + return false; + + + + if (emboss_reserved_local_other.has_f71().ValueOr(false) && + !has_f71().ValueOr(false)) + return false; + if (has_f71().ValueOr(false) && + !emboss_reserved_local_other.has_f71().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_f71().ValueOr(false) && + has_f71().ValueOr(false) && + !f71().UncheckedEquals(emboss_reserved_local_other.f71())) + return false; + + + + if (emboss_reserved_local_other.has_f72().ValueOr(false) && + !has_f72().ValueOr(false)) + return false; + if (has_f72().ValueOr(false) && + !emboss_reserved_local_other.has_f72().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_f72().ValueOr(false) && + has_f72().ValueOr(false) && + !f72().UncheckedEquals(emboss_reserved_local_other.f72())) + return false; + + + + if (emboss_reserved_local_other.has_f73().ValueOr(false) && + !has_f73().ValueOr(false)) + return false; + if (has_f73().ValueOr(false) && + !emboss_reserved_local_other.has_f73().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_f73().ValueOr(false) && + has_f73().ValueOr(false) && + !f73().UncheckedEquals(emboss_reserved_local_other.f73())) + return false; + + + + if (emboss_reserved_local_other.has_f74().ValueOr(false) && + !has_f74().ValueOr(false)) + return false; + if (has_f74().ValueOr(false) && + !emboss_reserved_local_other.has_f74().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_f74().ValueOr(false) && + has_f74().ValueOr(false) && + !f74().UncheckedEquals(emboss_reserved_local_other.f74())) + return false; + + + + if (emboss_reserved_local_other.has_f75().ValueOr(false) && + !has_f75().ValueOr(false)) + return false; + if (has_f75().ValueOr(false) && + !emboss_reserved_local_other.has_f75().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_f75().ValueOr(false) && + has_f75().ValueOr(false) && + !f75().UncheckedEquals(emboss_reserved_local_other.f75())) + return false; + + + + if (emboss_reserved_local_other.has_f76().ValueOr(false) && + !has_f76().ValueOr(false)) + return false; + if (has_f76().ValueOr(false) && + !emboss_reserved_local_other.has_f76().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_f76().ValueOr(false) && + has_f76().ValueOr(false) && + !f76().UncheckedEquals(emboss_reserved_local_other.f76())) + return false; + + + + if (emboss_reserved_local_other.has_f77().ValueOr(false) && + !has_f77().ValueOr(false)) + return false; + if (has_f77().ValueOr(false) && + !emboss_reserved_local_other.has_f77().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_f77().ValueOr(false) && + has_f77().ValueOr(false) && + !f77().UncheckedEquals(emboss_reserved_local_other.f77())) + return false; + + + + if (emboss_reserved_local_other.has_f78().ValueOr(false) && + !has_f78().ValueOr(false)) + return false; + if (has_f78().ValueOr(false) && + !emboss_reserved_local_other.has_f78().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_f78().ValueOr(false) && + has_f78().ValueOr(false) && + !f78().UncheckedEquals(emboss_reserved_local_other.f78())) + return false; + + + + if (emboss_reserved_local_other.has_f79().ValueOr(false) && + !has_f79().ValueOr(false)) + return false; + if (has_f79().ValueOr(false) && + !emboss_reserved_local_other.has_f79().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_f79().ValueOr(false) && + has_f79().ValueOr(false) && + !f79().UncheckedEquals(emboss_reserved_local_other.f79())) + return false; + + + + if (emboss_reserved_local_other.has_f80().ValueOr(false) && + !has_f80().ValueOr(false)) + return false; + if (has_f80().ValueOr(false) && + !emboss_reserved_local_other.has_f80().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_f80().ValueOr(false) && + has_f80().ValueOr(false) && + !f80().UncheckedEquals(emboss_reserved_local_other.f80())) + return false; + + + + if (emboss_reserved_local_other.has_f81().ValueOr(false) && + !has_f81().ValueOr(false)) + return false; + if (has_f81().ValueOr(false) && + !emboss_reserved_local_other.has_f81().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_f81().ValueOr(false) && + has_f81().ValueOr(false) && + !f81().UncheckedEquals(emboss_reserved_local_other.f81())) + return false; + + + + if (emboss_reserved_local_other.has_f82().ValueOr(false) && + !has_f82().ValueOr(false)) + return false; + if (has_f82().ValueOr(false) && + !emboss_reserved_local_other.has_f82().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_f82().ValueOr(false) && + has_f82().ValueOr(false) && + !f82().UncheckedEquals(emboss_reserved_local_other.f82())) + return false; + + + + if (emboss_reserved_local_other.has_f83().ValueOr(false) && + !has_f83().ValueOr(false)) + return false; + if (has_f83().ValueOr(false) && + !emboss_reserved_local_other.has_f83().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_f83().ValueOr(false) && + has_f83().ValueOr(false) && + !f83().UncheckedEquals(emboss_reserved_local_other.f83())) + return false; + + + + if (emboss_reserved_local_other.has_f84().ValueOr(false) && + !has_f84().ValueOr(false)) + return false; + if (has_f84().ValueOr(false) && + !emboss_reserved_local_other.has_f84().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_f84().ValueOr(false) && + has_f84().ValueOr(false) && + !f84().UncheckedEquals(emboss_reserved_local_other.f84())) + return false; + + + + if (emboss_reserved_local_other.has_f85().ValueOr(false) && + !has_f85().ValueOr(false)) + return false; + if (has_f85().ValueOr(false) && + !emboss_reserved_local_other.has_f85().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_f85().ValueOr(false) && + has_f85().ValueOr(false) && + !f85().UncheckedEquals(emboss_reserved_local_other.f85())) + return false; + + + + if (emboss_reserved_local_other.has_f86().ValueOr(false) && + !has_f86().ValueOr(false)) + return false; + if (has_f86().ValueOr(false) && + !emboss_reserved_local_other.has_f86().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_f86().ValueOr(false) && + has_f86().ValueOr(false) && + !f86().UncheckedEquals(emboss_reserved_local_other.f86())) + return false; + + + + if (emboss_reserved_local_other.has_f87().ValueOr(false) && + !has_f87().ValueOr(false)) + return false; + if (has_f87().ValueOr(false) && + !emboss_reserved_local_other.has_f87().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_f87().ValueOr(false) && + has_f87().ValueOr(false) && + !f87().UncheckedEquals(emboss_reserved_local_other.f87())) + return false; + + + + if (emboss_reserved_local_other.has_f88().ValueOr(false) && + !has_f88().ValueOr(false)) + return false; + if (has_f88().ValueOr(false) && + !emboss_reserved_local_other.has_f88().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_f88().ValueOr(false) && + has_f88().ValueOr(false) && + !f88().UncheckedEquals(emboss_reserved_local_other.f88())) + return false; + + + + if (emboss_reserved_local_other.has_f89().ValueOr(false) && + !has_f89().ValueOr(false)) + return false; + if (has_f89().ValueOr(false) && + !emboss_reserved_local_other.has_f89().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_f89().ValueOr(false) && + has_f89().ValueOr(false) && + !f89().UncheckedEquals(emboss_reserved_local_other.f89())) + return false; + + + + if (emboss_reserved_local_other.has_f90().ValueOr(false) && + !has_f90().ValueOr(false)) + return false; + if (has_f90().ValueOr(false) && + !emboss_reserved_local_other.has_f90().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_f90().ValueOr(false) && + has_f90().ValueOr(false) && + !f90().UncheckedEquals(emboss_reserved_local_other.f90())) + return false; + + + + if (emboss_reserved_local_other.has_f91().ValueOr(false) && + !has_f91().ValueOr(false)) + return false; + if (has_f91().ValueOr(false) && + !emboss_reserved_local_other.has_f91().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_f91().ValueOr(false) && + has_f91().ValueOr(false) && + !f91().UncheckedEquals(emboss_reserved_local_other.f91())) + return false; + + + + if (emboss_reserved_local_other.has_f92().ValueOr(false) && + !has_f92().ValueOr(false)) + return false; + if (has_f92().ValueOr(false) && + !emboss_reserved_local_other.has_f92().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_f92().ValueOr(false) && + has_f92().ValueOr(false) && + !f92().UncheckedEquals(emboss_reserved_local_other.f92())) + return false; + + + + if (emboss_reserved_local_other.has_f93().ValueOr(false) && + !has_f93().ValueOr(false)) + return false; + if (has_f93().ValueOr(false) && + !emboss_reserved_local_other.has_f93().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_f93().ValueOr(false) && + has_f93().ValueOr(false) && + !f93().UncheckedEquals(emboss_reserved_local_other.f93())) + return false; + + + + if (emboss_reserved_local_other.has_f94().ValueOr(false) && + !has_f94().ValueOr(false)) + return false; + if (has_f94().ValueOr(false) && + !emboss_reserved_local_other.has_f94().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_f94().ValueOr(false) && + has_f94().ValueOr(false) && + !f94().UncheckedEquals(emboss_reserved_local_other.f94())) + return false; + + + + if (emboss_reserved_local_other.has_f95().ValueOr(false) && + !has_f95().ValueOr(false)) + return false; + if (has_f95().ValueOr(false) && + !emboss_reserved_local_other.has_f95().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_f95().ValueOr(false) && + has_f95().ValueOr(false) && + !f95().UncheckedEquals(emboss_reserved_local_other.f95())) + return false; + + + + if (emboss_reserved_local_other.has_f96().ValueOr(false) && + !has_f96().ValueOr(false)) + return false; + if (has_f96().ValueOr(false) && + !emboss_reserved_local_other.has_f96().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_f96().ValueOr(false) && + has_f96().ValueOr(false) && + !f96().UncheckedEquals(emboss_reserved_local_other.f96())) + return false; + + + + if (emboss_reserved_local_other.has_f97().ValueOr(false) && + !has_f97().ValueOr(false)) + return false; + if (has_f97().ValueOr(false) && + !emboss_reserved_local_other.has_f97().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_f97().ValueOr(false) && + has_f97().ValueOr(false) && + !f97().UncheckedEquals(emboss_reserved_local_other.f97())) + return false; + + + + if (emboss_reserved_local_other.has_f98().ValueOr(false) && + !has_f98().ValueOr(false)) + return false; + if (has_f98().ValueOr(false) && + !emboss_reserved_local_other.has_f98().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_f98().ValueOr(false) && + has_f98().ValueOr(false) && + !f98().UncheckedEquals(emboss_reserved_local_other.f98())) + return false; + + + + if (emboss_reserved_local_other.has_f99().ValueOr(false) && + !has_f99().ValueOr(false)) + return false; + if (has_f99().ValueOr(false) && + !emboss_reserved_local_other.has_f99().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_f99().ValueOr(false) && + has_f99().ValueOr(false) && + !f99().UncheckedEquals(emboss_reserved_local_other.f99())) + return false; + + return true; + } + template + void UncheckedCopyFrom( + GenericLargeConditionalsView emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead()); + } + + template + void CopyFrom( + GenericLargeConditionalsView emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + template + bool TryToCopyFrom( + GenericLargeConditionalsView emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + + template + bool UpdateFromTextStream(Stream *emboss_reserved_local_stream) const { + ::std::string emboss_reserved_local_brace; + if (!::emboss::support::ReadToken(emboss_reserved_local_stream, + &emboss_reserved_local_brace)) + return false; + if (emboss_reserved_local_brace != "{") return false; + for (;;) { + ::std::string emboss_reserved_local_name; + if (!::emboss::support::ReadToken(emboss_reserved_local_stream, + &emboss_reserved_local_name)) + return false; + if (emboss_reserved_local_name == ",") + if (!::emboss::support::ReadToken(emboss_reserved_local_stream, + &emboss_reserved_local_name)) + return false; + if (emboss_reserved_local_name == "}") return true; + ::std::string emboss_reserved_local_colon; + if (!::emboss::support::ReadToken(emboss_reserved_local_stream, + &emboss_reserved_local_colon)) + return false; + if (emboss_reserved_local_colon != ":") return false; + if (emboss_reserved_local_name == "tag") { + if (!tag().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "f0") { + if (!f0().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "f1") { + if (!f1().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "f2") { + if (!f2().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "f3") { + if (!f3().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "f4") { + if (!f4().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "f5") { + if (!f5().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "f6") { + if (!f6().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "f7") { + if (!f7().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "f8") { + if (!f8().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "f9") { + if (!f9().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "f10") { + if (!f10().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "f11") { + if (!f11().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "f12") { + if (!f12().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "f13") { + if (!f13().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "f14") { + if (!f14().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "f15") { + if (!f15().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "f16") { + if (!f16().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "f17") { + if (!f17().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "f18") { + if (!f18().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "f19") { + if (!f19().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "f20") { + if (!f20().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "f21") { + if (!f21().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "f22") { + if (!f22().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "f23") { + if (!f23().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "f24") { + if (!f24().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "f25") { + if (!f25().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "f26") { + if (!f26().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "f27") { + if (!f27().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "f28") { + if (!f28().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "f29") { + if (!f29().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "f30") { + if (!f30().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "f31") { + if (!f31().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "f32") { + if (!f32().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "f33") { + if (!f33().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "f34") { + if (!f34().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "f35") { + if (!f35().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "f36") { + if (!f36().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "f37") { + if (!f37().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "f38") { + if (!f38().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "f39") { + if (!f39().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "f40") { + if (!f40().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "f41") { + if (!f41().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "f42") { + if (!f42().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "f43") { + if (!f43().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "f44") { + if (!f44().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "f45") { + if (!f45().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "f46") { + if (!f46().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "f47") { + if (!f47().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "f48") { + if (!f48().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "f49") { + if (!f49().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "f50") { + if (!f50().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "f51") { + if (!f51().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "f52") { + if (!f52().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "f53") { + if (!f53().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "f54") { + if (!f54().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "f55") { + if (!f55().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "f56") { + if (!f56().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "f57") { + if (!f57().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "f58") { + if (!f58().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "f59") { + if (!f59().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "f60") { + if (!f60().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "f61") { + if (!f61().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "f62") { + if (!f62().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "f63") { + if (!f63().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "f64") { + if (!f64().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "f65") { + if (!f65().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "f66") { + if (!f66().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "f67") { + if (!f67().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "f68") { + if (!f68().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "f69") { + if (!f69().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "f70") { + if (!f70().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "f71") { + if (!f71().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "f72") { + if (!f72().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "f73") { + if (!f73().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "f74") { + if (!f74().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "f75") { + if (!f75().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "f76") { + if (!f76().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "f77") { + if (!f77().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "f78") { + if (!f78().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "f79") { + if (!f79().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "f80") { + if (!f80().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "f81") { + if (!f81().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "f82") { + if (!f82().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "f83") { + if (!f83().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "f84") { + if (!f84().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "f85") { + if (!f85().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "f86") { + if (!f86().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "f87") { + if (!f87().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "f88") { + if (!f88().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "f89") { + if (!f89().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "f90") { + if (!f90().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "f91") { + if (!f91().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "f92") { + if (!f92().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "f93") { + if (!f93().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "f94") { + if (!f94().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "f95") { + if (!f95().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "f96") { + if (!f96().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "f97") { + if (!f97().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "f98") { + if (!f98().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "f99") { + if (!f99().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + void WriteToTextStream( + Stream *emboss_reserved_local_stream, + ::emboss::TextOutputOptions emboss_reserved_local_options) const { + ::emboss::TextOutputOptions emboss_reserved_local_field_options = + emboss_reserved_local_options.PlusOneIndent(); + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write("{\n"); + } else { + emboss_reserved_local_stream->Write("{"); + } + bool emboss_reserved_local_wrote_field = false; + if (has_tag().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + tag().IsAggregate() || tag().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("tag: "); + tag().WriteToTextStream(emboss_reserved_local_stream, + emboss_reserved_local_field_options); + emboss_reserved_local_wrote_field = true; + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !tag().IsAggregate() && !tag().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } + emboss_reserved_local_stream->Write("# tag: UNREADABLE\n"); + } + } + + if (has_f0().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + f0().IsAggregate() || f0().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("f0: "); + f0().WriteToTextStream(emboss_reserved_local_stream, + emboss_reserved_local_field_options); + emboss_reserved_local_wrote_field = true; + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !f0().IsAggregate() && !f0().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } + emboss_reserved_local_stream->Write("# f0: UNREADABLE\n"); + } + } + + if (has_f1().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + f1().IsAggregate() || f1().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("f1: "); + f1().WriteToTextStream(emboss_reserved_local_stream, + emboss_reserved_local_field_options); + emboss_reserved_local_wrote_field = true; + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !f1().IsAggregate() && !f1().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } + emboss_reserved_local_stream->Write("# f1: UNREADABLE\n"); + } + } + + if (has_f2().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + f2().IsAggregate() || f2().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("f2: "); + f2().WriteToTextStream(emboss_reserved_local_stream, + emboss_reserved_local_field_options); + emboss_reserved_local_wrote_field = true; + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !f2().IsAggregate() && !f2().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } + emboss_reserved_local_stream->Write("# f2: UNREADABLE\n"); + } + } + + if (has_f3().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + f3().IsAggregate() || f3().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("f3: "); + f3().WriteToTextStream(emboss_reserved_local_stream, + emboss_reserved_local_field_options); + emboss_reserved_local_wrote_field = true; + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !f3().IsAggregate() && !f3().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } + emboss_reserved_local_stream->Write("# f3: UNREADABLE\n"); + } + } + + if (has_f4().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + f4().IsAggregate() || f4().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("f4: "); + f4().WriteToTextStream(emboss_reserved_local_stream, + emboss_reserved_local_field_options); + emboss_reserved_local_wrote_field = true; + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !f4().IsAggregate() && !f4().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } + emboss_reserved_local_stream->Write("# f4: UNREADABLE\n"); + } + } + + if (has_f5().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + f5().IsAggregate() || f5().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("f5: "); + f5().WriteToTextStream(emboss_reserved_local_stream, + emboss_reserved_local_field_options); + emboss_reserved_local_wrote_field = true; + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !f5().IsAggregate() && !f5().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } + emboss_reserved_local_stream->Write("# f5: UNREADABLE\n"); + } + } + + if (has_f6().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + f6().IsAggregate() || f6().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("f6: "); + f6().WriteToTextStream(emboss_reserved_local_stream, + emboss_reserved_local_field_options); + emboss_reserved_local_wrote_field = true; + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !f6().IsAggregate() && !f6().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } + emboss_reserved_local_stream->Write("# f6: UNREADABLE\n"); + } + } + + if (has_f7().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + f7().IsAggregate() || f7().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("f7: "); + f7().WriteToTextStream(emboss_reserved_local_stream, + emboss_reserved_local_field_options); + emboss_reserved_local_wrote_field = true; + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !f7().IsAggregate() && !f7().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } + emboss_reserved_local_stream->Write("# f7: UNREADABLE\n"); + } + } + + if (has_f8().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + f8().IsAggregate() || f8().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("f8: "); + f8().WriteToTextStream(emboss_reserved_local_stream, + emboss_reserved_local_field_options); + emboss_reserved_local_wrote_field = true; + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !f8().IsAggregate() && !f8().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } + emboss_reserved_local_stream->Write("# f8: UNREADABLE\n"); + } + } + + if (has_f9().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + f9().IsAggregate() || f9().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("f9: "); + f9().WriteToTextStream(emboss_reserved_local_stream, + emboss_reserved_local_field_options); + emboss_reserved_local_wrote_field = true; + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !f9().IsAggregate() && !f9().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } + emboss_reserved_local_stream->Write("# f9: UNREADABLE\n"); + } + } + + if (has_f10().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + f10().IsAggregate() || f10().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("f10: "); + f10().WriteToTextStream(emboss_reserved_local_stream, + emboss_reserved_local_field_options); + emboss_reserved_local_wrote_field = true; + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !f10().IsAggregate() && !f10().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } + emboss_reserved_local_stream->Write("# f10: UNREADABLE\n"); + } + } + + if (has_f11().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + f11().IsAggregate() || f11().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("f11: "); + f11().WriteToTextStream(emboss_reserved_local_stream, + emboss_reserved_local_field_options); + emboss_reserved_local_wrote_field = true; + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !f11().IsAggregate() && !f11().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } + emboss_reserved_local_stream->Write("# f11: UNREADABLE\n"); + } + } + + if (has_f12().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + f12().IsAggregate() || f12().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("f12: "); + f12().WriteToTextStream(emboss_reserved_local_stream, + emboss_reserved_local_field_options); + emboss_reserved_local_wrote_field = true; + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !f12().IsAggregate() && !f12().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } + emboss_reserved_local_stream->Write("# f12: UNREADABLE\n"); + } + } + + if (has_f13().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + f13().IsAggregate() || f13().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("f13: "); + f13().WriteToTextStream(emboss_reserved_local_stream, + emboss_reserved_local_field_options); + emboss_reserved_local_wrote_field = true; + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !f13().IsAggregate() && !f13().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } + emboss_reserved_local_stream->Write("# f13: UNREADABLE\n"); + } + } + + if (has_f14().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + f14().IsAggregate() || f14().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("f14: "); + f14().WriteToTextStream(emboss_reserved_local_stream, + emboss_reserved_local_field_options); + emboss_reserved_local_wrote_field = true; + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !f14().IsAggregate() && !f14().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } + emboss_reserved_local_stream->Write("# f14: UNREADABLE\n"); + } + } + + if (has_f15().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + f15().IsAggregate() || f15().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("f15: "); + f15().WriteToTextStream(emboss_reserved_local_stream, + emboss_reserved_local_field_options); + emboss_reserved_local_wrote_field = true; + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !f15().IsAggregate() && !f15().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } + emboss_reserved_local_stream->Write("# f15: UNREADABLE\n"); + } + } + + if (has_f16().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + f16().IsAggregate() || f16().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("f16: "); + f16().WriteToTextStream(emboss_reserved_local_stream, + emboss_reserved_local_field_options); + emboss_reserved_local_wrote_field = true; + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !f16().IsAggregate() && !f16().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } + emboss_reserved_local_stream->Write("# f16: UNREADABLE\n"); + } + } + + if (has_f17().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + f17().IsAggregate() || f17().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("f17: "); + f17().WriteToTextStream(emboss_reserved_local_stream, + emboss_reserved_local_field_options); + emboss_reserved_local_wrote_field = true; + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !f17().IsAggregate() && !f17().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } + emboss_reserved_local_stream->Write("# f17: UNREADABLE\n"); + } + } + + if (has_f18().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + f18().IsAggregate() || f18().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("f18: "); + f18().WriteToTextStream(emboss_reserved_local_stream, + emboss_reserved_local_field_options); + emboss_reserved_local_wrote_field = true; + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !f18().IsAggregate() && !f18().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } + emboss_reserved_local_stream->Write("# f18: UNREADABLE\n"); + } + } + + if (has_f19().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + f19().IsAggregate() || f19().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("f19: "); + f19().WriteToTextStream(emboss_reserved_local_stream, + emboss_reserved_local_field_options); + emboss_reserved_local_wrote_field = true; + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !f19().IsAggregate() && !f19().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } + emboss_reserved_local_stream->Write("# f19: UNREADABLE\n"); + } + } + + if (has_f20().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + f20().IsAggregate() || f20().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("f20: "); + f20().WriteToTextStream(emboss_reserved_local_stream, + emboss_reserved_local_field_options); + emboss_reserved_local_wrote_field = true; + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !f20().IsAggregate() && !f20().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } + emboss_reserved_local_stream->Write("# f20: UNREADABLE\n"); + } + } + + if (has_f21().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + f21().IsAggregate() || f21().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("f21: "); + f21().WriteToTextStream(emboss_reserved_local_stream, + emboss_reserved_local_field_options); + emboss_reserved_local_wrote_field = true; + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !f21().IsAggregate() && !f21().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } + emboss_reserved_local_stream->Write("# f21: UNREADABLE\n"); + } + } + + if (has_f22().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + f22().IsAggregate() || f22().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("f22: "); + f22().WriteToTextStream(emboss_reserved_local_stream, + emboss_reserved_local_field_options); + emboss_reserved_local_wrote_field = true; + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !f22().IsAggregate() && !f22().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } + emboss_reserved_local_stream->Write("# f22: UNREADABLE\n"); + } + } + + if (has_f23().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + f23().IsAggregate() || f23().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("f23: "); + f23().WriteToTextStream(emboss_reserved_local_stream, + emboss_reserved_local_field_options); + emboss_reserved_local_wrote_field = true; + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !f23().IsAggregate() && !f23().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } + emboss_reserved_local_stream->Write("# f23: UNREADABLE\n"); + } + } + + if (has_f24().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + f24().IsAggregate() || f24().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("f24: "); + f24().WriteToTextStream(emboss_reserved_local_stream, + emboss_reserved_local_field_options); + emboss_reserved_local_wrote_field = true; + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !f24().IsAggregate() && !f24().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } + emboss_reserved_local_stream->Write("# f24: UNREADABLE\n"); + } + } + + if (has_f25().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + f25().IsAggregate() || f25().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("f25: "); + f25().WriteToTextStream(emboss_reserved_local_stream, + emboss_reserved_local_field_options); + emboss_reserved_local_wrote_field = true; + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !f25().IsAggregate() && !f25().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } + emboss_reserved_local_stream->Write("# f25: UNREADABLE\n"); + } + } + + if (has_f26().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + f26().IsAggregate() || f26().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("f26: "); + f26().WriteToTextStream(emboss_reserved_local_stream, + emboss_reserved_local_field_options); + emboss_reserved_local_wrote_field = true; + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !f26().IsAggregate() && !f26().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } + emboss_reserved_local_stream->Write("# f26: UNREADABLE\n"); + } + } + + if (has_f27().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + f27().IsAggregate() || f27().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("f27: "); + f27().WriteToTextStream(emboss_reserved_local_stream, + emboss_reserved_local_field_options); + emboss_reserved_local_wrote_field = true; + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !f27().IsAggregate() && !f27().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } + emboss_reserved_local_stream->Write("# f27: UNREADABLE\n"); + } + } + + if (has_f28().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + f28().IsAggregate() || f28().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("f28: "); + f28().WriteToTextStream(emboss_reserved_local_stream, + emboss_reserved_local_field_options); + emboss_reserved_local_wrote_field = true; + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !f28().IsAggregate() && !f28().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } + emboss_reserved_local_stream->Write("# f28: UNREADABLE\n"); + } + } + + if (has_f29().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + f29().IsAggregate() || f29().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("f29: "); + f29().WriteToTextStream(emboss_reserved_local_stream, + emboss_reserved_local_field_options); + emboss_reserved_local_wrote_field = true; + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !f29().IsAggregate() && !f29().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } + emboss_reserved_local_stream->Write("# f29: UNREADABLE\n"); + } + } + + if (has_f30().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + f30().IsAggregate() || f30().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("f30: "); + f30().WriteToTextStream(emboss_reserved_local_stream, + emboss_reserved_local_field_options); + emboss_reserved_local_wrote_field = true; + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !f30().IsAggregate() && !f30().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } + emboss_reserved_local_stream->Write("# f30: UNREADABLE\n"); + } + } + + if (has_f31().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + f31().IsAggregate() || f31().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("f31: "); + f31().WriteToTextStream(emboss_reserved_local_stream, + emboss_reserved_local_field_options); + emboss_reserved_local_wrote_field = true; + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !f31().IsAggregate() && !f31().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } + emboss_reserved_local_stream->Write("# f31: UNREADABLE\n"); + } + } + + if (has_f32().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + f32().IsAggregate() || f32().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("f32: "); + f32().WriteToTextStream(emboss_reserved_local_stream, + emboss_reserved_local_field_options); + emboss_reserved_local_wrote_field = true; + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !f32().IsAggregate() && !f32().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } + emboss_reserved_local_stream->Write("# f32: UNREADABLE\n"); + } + } + + if (has_f33().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + f33().IsAggregate() || f33().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("f33: "); + f33().WriteToTextStream(emboss_reserved_local_stream, + emboss_reserved_local_field_options); + emboss_reserved_local_wrote_field = true; + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !f33().IsAggregate() && !f33().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } + emboss_reserved_local_stream->Write("# f33: UNREADABLE\n"); + } + } + + if (has_f34().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + f34().IsAggregate() || f34().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("f34: "); + f34().WriteToTextStream(emboss_reserved_local_stream, + emboss_reserved_local_field_options); + emboss_reserved_local_wrote_field = true; + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !f34().IsAggregate() && !f34().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } + emboss_reserved_local_stream->Write("# f34: UNREADABLE\n"); + } + } + + if (has_f35().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + f35().IsAggregate() || f35().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("f35: "); + f35().WriteToTextStream(emboss_reserved_local_stream, + emboss_reserved_local_field_options); + emboss_reserved_local_wrote_field = true; + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !f35().IsAggregate() && !f35().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } + emboss_reserved_local_stream->Write("# f35: UNREADABLE\n"); + } + } + + if (has_f36().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + f36().IsAggregate() || f36().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("f36: "); + f36().WriteToTextStream(emboss_reserved_local_stream, + emboss_reserved_local_field_options); + emboss_reserved_local_wrote_field = true; + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !f36().IsAggregate() && !f36().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } + emboss_reserved_local_stream->Write("# f36: UNREADABLE\n"); + } + } + + if (has_f37().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + f37().IsAggregate() || f37().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("f37: "); + f37().WriteToTextStream(emboss_reserved_local_stream, + emboss_reserved_local_field_options); + emboss_reserved_local_wrote_field = true; + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !f37().IsAggregate() && !f37().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } + emboss_reserved_local_stream->Write("# f37: UNREADABLE\n"); + } + } + + if (has_f38().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + f38().IsAggregate() || f38().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("f38: "); + f38().WriteToTextStream(emboss_reserved_local_stream, + emboss_reserved_local_field_options); + emboss_reserved_local_wrote_field = true; + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !f38().IsAggregate() && !f38().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } + emboss_reserved_local_stream->Write("# f38: UNREADABLE\n"); + } + } + + if (has_f39().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + f39().IsAggregate() || f39().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("f39: "); + f39().WriteToTextStream(emboss_reserved_local_stream, + emboss_reserved_local_field_options); + emboss_reserved_local_wrote_field = true; + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !f39().IsAggregate() && !f39().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } + emboss_reserved_local_stream->Write("# f39: UNREADABLE\n"); + } + } + + if (has_f40().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + f40().IsAggregate() || f40().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("f40: "); + f40().WriteToTextStream(emboss_reserved_local_stream, + emboss_reserved_local_field_options); + emboss_reserved_local_wrote_field = true; + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !f40().IsAggregate() && !f40().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } + emboss_reserved_local_stream->Write("# f40: UNREADABLE\n"); + } + } + + if (has_f41().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + f41().IsAggregate() || f41().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("f41: "); + f41().WriteToTextStream(emboss_reserved_local_stream, + emboss_reserved_local_field_options); + emboss_reserved_local_wrote_field = true; + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !f41().IsAggregate() && !f41().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } + emboss_reserved_local_stream->Write("# f41: UNREADABLE\n"); + } + } + + if (has_f42().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + f42().IsAggregate() || f42().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("f42: "); + f42().WriteToTextStream(emboss_reserved_local_stream, + emboss_reserved_local_field_options); + emboss_reserved_local_wrote_field = true; + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !f42().IsAggregate() && !f42().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } + emboss_reserved_local_stream->Write("# f42: UNREADABLE\n"); + } + } + + if (has_f43().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + f43().IsAggregate() || f43().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("f43: "); + f43().WriteToTextStream(emboss_reserved_local_stream, + emboss_reserved_local_field_options); + emboss_reserved_local_wrote_field = true; + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !f43().IsAggregate() && !f43().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } + emboss_reserved_local_stream->Write("# f43: UNREADABLE\n"); + } + } + + if (has_f44().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + f44().IsAggregate() || f44().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("f44: "); + f44().WriteToTextStream(emboss_reserved_local_stream, + emboss_reserved_local_field_options); + emboss_reserved_local_wrote_field = true; + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !f44().IsAggregate() && !f44().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } + emboss_reserved_local_stream->Write("# f44: UNREADABLE\n"); + } + } + + if (has_f45().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + f45().IsAggregate() || f45().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("f45: "); + f45().WriteToTextStream(emboss_reserved_local_stream, + emboss_reserved_local_field_options); + emboss_reserved_local_wrote_field = true; + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !f45().IsAggregate() && !f45().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } + emboss_reserved_local_stream->Write("# f45: UNREADABLE\n"); + } + } + + if (has_f46().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + f46().IsAggregate() || f46().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("f46: "); + f46().WriteToTextStream(emboss_reserved_local_stream, + emboss_reserved_local_field_options); + emboss_reserved_local_wrote_field = true; + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !f46().IsAggregate() && !f46().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } + emboss_reserved_local_stream->Write("# f46: UNREADABLE\n"); + } + } + + if (has_f47().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + f47().IsAggregate() || f47().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("f47: "); + f47().WriteToTextStream(emboss_reserved_local_stream, + emboss_reserved_local_field_options); + emboss_reserved_local_wrote_field = true; + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !f47().IsAggregate() && !f47().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } + emboss_reserved_local_stream->Write("# f47: UNREADABLE\n"); + } + } + + if (has_f48().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + f48().IsAggregate() || f48().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("f48: "); + f48().WriteToTextStream(emboss_reserved_local_stream, + emboss_reserved_local_field_options); + emboss_reserved_local_wrote_field = true; + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !f48().IsAggregate() && !f48().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } + emboss_reserved_local_stream->Write("# f48: UNREADABLE\n"); + } + } + + if (has_f49().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + f49().IsAggregate() || f49().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("f49: "); + f49().WriteToTextStream(emboss_reserved_local_stream, + emboss_reserved_local_field_options); + emboss_reserved_local_wrote_field = true; + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !f49().IsAggregate() && !f49().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } + emboss_reserved_local_stream->Write("# f49: UNREADABLE\n"); + } + } + + if (has_f50().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + f50().IsAggregate() || f50().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("f50: "); + f50().WriteToTextStream(emboss_reserved_local_stream, + emboss_reserved_local_field_options); + emboss_reserved_local_wrote_field = true; + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !f50().IsAggregate() && !f50().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } + emboss_reserved_local_stream->Write("# f50: UNREADABLE\n"); + } + } + + if (has_f51().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + f51().IsAggregate() || f51().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("f51: "); + f51().WriteToTextStream(emboss_reserved_local_stream, + emboss_reserved_local_field_options); + emboss_reserved_local_wrote_field = true; + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !f51().IsAggregate() && !f51().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } + emboss_reserved_local_stream->Write("# f51: UNREADABLE\n"); + } + } + + if (has_f52().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + f52().IsAggregate() || f52().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("f52: "); + f52().WriteToTextStream(emboss_reserved_local_stream, + emboss_reserved_local_field_options); + emboss_reserved_local_wrote_field = true; + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !f52().IsAggregate() && !f52().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } + emboss_reserved_local_stream->Write("# f52: UNREADABLE\n"); + } + } + + if (has_f53().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + f53().IsAggregate() || f53().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("f53: "); + f53().WriteToTextStream(emboss_reserved_local_stream, + emboss_reserved_local_field_options); + emboss_reserved_local_wrote_field = true; + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !f53().IsAggregate() && !f53().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } + emboss_reserved_local_stream->Write("# f53: UNREADABLE\n"); + } + } + + if (has_f54().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + f54().IsAggregate() || f54().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("f54: "); + f54().WriteToTextStream(emboss_reserved_local_stream, + emboss_reserved_local_field_options); + emboss_reserved_local_wrote_field = true; + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !f54().IsAggregate() && !f54().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } + emboss_reserved_local_stream->Write("# f54: UNREADABLE\n"); + } + } + + if (has_f55().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + f55().IsAggregate() || f55().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("f55: "); + f55().WriteToTextStream(emboss_reserved_local_stream, + emboss_reserved_local_field_options); + emboss_reserved_local_wrote_field = true; + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !f55().IsAggregate() && !f55().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } + emboss_reserved_local_stream->Write("# f55: UNREADABLE\n"); + } + } + + if (has_f56().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + f56().IsAggregate() || f56().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("f56: "); + f56().WriteToTextStream(emboss_reserved_local_stream, + emboss_reserved_local_field_options); + emboss_reserved_local_wrote_field = true; + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !f56().IsAggregate() && !f56().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } + emboss_reserved_local_stream->Write("# f56: UNREADABLE\n"); + } + } + + if (has_f57().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + f57().IsAggregate() || f57().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("f57: "); + f57().WriteToTextStream(emboss_reserved_local_stream, + emboss_reserved_local_field_options); + emboss_reserved_local_wrote_field = true; + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !f57().IsAggregate() && !f57().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } + emboss_reserved_local_stream->Write("# f57: UNREADABLE\n"); + } + } + + if (has_f58().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + f58().IsAggregate() || f58().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("f58: "); + f58().WriteToTextStream(emboss_reserved_local_stream, + emboss_reserved_local_field_options); + emboss_reserved_local_wrote_field = true; + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !f58().IsAggregate() && !f58().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } + emboss_reserved_local_stream->Write("# f58: UNREADABLE\n"); + } + } + + if (has_f59().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + f59().IsAggregate() || f59().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("f59: "); + f59().WriteToTextStream(emboss_reserved_local_stream, + emboss_reserved_local_field_options); + emboss_reserved_local_wrote_field = true; + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !f59().IsAggregate() && !f59().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } + emboss_reserved_local_stream->Write("# f59: UNREADABLE\n"); + } + } + + if (has_f60().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + f60().IsAggregate() || f60().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("f60: "); + f60().WriteToTextStream(emboss_reserved_local_stream, + emboss_reserved_local_field_options); + emboss_reserved_local_wrote_field = true; + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !f60().IsAggregate() && !f60().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } + emboss_reserved_local_stream->Write("# f60: UNREADABLE\n"); + } + } + + if (has_f61().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + f61().IsAggregate() || f61().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("f61: "); + f61().WriteToTextStream(emboss_reserved_local_stream, + emboss_reserved_local_field_options); + emboss_reserved_local_wrote_field = true; + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !f61().IsAggregate() && !f61().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } + emboss_reserved_local_stream->Write("# f61: UNREADABLE\n"); + } + } + + if (has_f62().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + f62().IsAggregate() || f62().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("f62: "); + f62().WriteToTextStream(emboss_reserved_local_stream, + emboss_reserved_local_field_options); + emboss_reserved_local_wrote_field = true; + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !f62().IsAggregate() && !f62().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } + emboss_reserved_local_stream->Write("# f62: UNREADABLE\n"); + } + } + + if (has_f63().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + f63().IsAggregate() || f63().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("f63: "); + f63().WriteToTextStream(emboss_reserved_local_stream, + emboss_reserved_local_field_options); + emboss_reserved_local_wrote_field = true; + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !f63().IsAggregate() && !f63().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } + emboss_reserved_local_stream->Write("# f63: UNREADABLE\n"); + } + } + + if (has_f64().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + f64().IsAggregate() || f64().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("f64: "); + f64().WriteToTextStream(emboss_reserved_local_stream, + emboss_reserved_local_field_options); + emboss_reserved_local_wrote_field = true; + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !f64().IsAggregate() && !f64().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } + emboss_reserved_local_stream->Write("# f64: UNREADABLE\n"); + } + } + + if (has_f65().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + f65().IsAggregate() || f65().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("f65: "); + f65().WriteToTextStream(emboss_reserved_local_stream, + emboss_reserved_local_field_options); + emboss_reserved_local_wrote_field = true; + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !f65().IsAggregate() && !f65().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } + emboss_reserved_local_stream->Write("# f65: UNREADABLE\n"); + } + } + + if (has_f66().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + f66().IsAggregate() || f66().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("f66: "); + f66().WriteToTextStream(emboss_reserved_local_stream, + emboss_reserved_local_field_options); + emboss_reserved_local_wrote_field = true; + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !f66().IsAggregate() && !f66().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } + emboss_reserved_local_stream->Write("# f66: UNREADABLE\n"); + } + } + + if (has_f67().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + f67().IsAggregate() || f67().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("f67: "); + f67().WriteToTextStream(emboss_reserved_local_stream, + emboss_reserved_local_field_options); + emboss_reserved_local_wrote_field = true; + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !f67().IsAggregate() && !f67().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } + emboss_reserved_local_stream->Write("# f67: UNREADABLE\n"); + } + } + + if (has_f68().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + f68().IsAggregate() || f68().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("f68: "); + f68().WriteToTextStream(emboss_reserved_local_stream, + emboss_reserved_local_field_options); + emboss_reserved_local_wrote_field = true; + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !f68().IsAggregate() && !f68().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } + emboss_reserved_local_stream->Write("# f68: UNREADABLE\n"); + } + } + + if (has_f69().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + f69().IsAggregate() || f69().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("f69: "); + f69().WriteToTextStream(emboss_reserved_local_stream, + emboss_reserved_local_field_options); + emboss_reserved_local_wrote_field = true; + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !f69().IsAggregate() && !f69().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } + emboss_reserved_local_stream->Write("# f69: UNREADABLE\n"); + } + } + + if (has_f70().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + f70().IsAggregate() || f70().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("f70: "); + f70().WriteToTextStream(emboss_reserved_local_stream, + emboss_reserved_local_field_options); + emboss_reserved_local_wrote_field = true; + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !f70().IsAggregate() && !f70().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } + emboss_reserved_local_stream->Write("# f70: UNREADABLE\n"); + } + } + + if (has_f71().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + f71().IsAggregate() || f71().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("f71: "); + f71().WriteToTextStream(emboss_reserved_local_stream, + emboss_reserved_local_field_options); + emboss_reserved_local_wrote_field = true; + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !f71().IsAggregate() && !f71().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } + emboss_reserved_local_stream->Write("# f71: UNREADABLE\n"); + } + } + + if (has_f72().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + f72().IsAggregate() || f72().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("f72: "); + f72().WriteToTextStream(emboss_reserved_local_stream, + emboss_reserved_local_field_options); + emboss_reserved_local_wrote_field = true; + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !f72().IsAggregate() && !f72().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } + emboss_reserved_local_stream->Write("# f72: UNREADABLE\n"); + } + } + + if (has_f73().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + f73().IsAggregate() || f73().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("f73: "); + f73().WriteToTextStream(emboss_reserved_local_stream, + emboss_reserved_local_field_options); + emboss_reserved_local_wrote_field = true; + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !f73().IsAggregate() && !f73().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } + emboss_reserved_local_stream->Write("# f73: UNREADABLE\n"); + } + } + + if (has_f74().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + f74().IsAggregate() || f74().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("f74: "); + f74().WriteToTextStream(emboss_reserved_local_stream, + emboss_reserved_local_field_options); + emboss_reserved_local_wrote_field = true; + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !f74().IsAggregate() && !f74().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } + emboss_reserved_local_stream->Write("# f74: UNREADABLE\n"); + } + } + + if (has_f75().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + f75().IsAggregate() || f75().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("f75: "); + f75().WriteToTextStream(emboss_reserved_local_stream, + emboss_reserved_local_field_options); + emboss_reserved_local_wrote_field = true; + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !f75().IsAggregate() && !f75().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } + emboss_reserved_local_stream->Write("# f75: UNREADABLE\n"); + } + } + + if (has_f76().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + f76().IsAggregate() || f76().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("f76: "); + f76().WriteToTextStream(emboss_reserved_local_stream, + emboss_reserved_local_field_options); + emboss_reserved_local_wrote_field = true; + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !f76().IsAggregate() && !f76().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } + emboss_reserved_local_stream->Write("# f76: UNREADABLE\n"); + } + } + + if (has_f77().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + f77().IsAggregate() || f77().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("f77: "); + f77().WriteToTextStream(emboss_reserved_local_stream, + emboss_reserved_local_field_options); + emboss_reserved_local_wrote_field = true; + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !f77().IsAggregate() && !f77().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } + emboss_reserved_local_stream->Write("# f77: UNREADABLE\n"); + } + } + + if (has_f78().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + f78().IsAggregate() || f78().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("f78: "); + f78().WriteToTextStream(emboss_reserved_local_stream, + emboss_reserved_local_field_options); + emboss_reserved_local_wrote_field = true; + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !f78().IsAggregate() && !f78().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } + emboss_reserved_local_stream->Write("# f78: UNREADABLE\n"); + } + } + + if (has_f79().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + f79().IsAggregate() || f79().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("f79: "); + f79().WriteToTextStream(emboss_reserved_local_stream, + emboss_reserved_local_field_options); + emboss_reserved_local_wrote_field = true; + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !f79().IsAggregate() && !f79().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } + emboss_reserved_local_stream->Write("# f79: UNREADABLE\n"); + } + } + + if (has_f80().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + f80().IsAggregate() || f80().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("f80: "); + f80().WriteToTextStream(emboss_reserved_local_stream, + emboss_reserved_local_field_options); + emboss_reserved_local_wrote_field = true; + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !f80().IsAggregate() && !f80().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } + emboss_reserved_local_stream->Write("# f80: UNREADABLE\n"); + } + } + + if (has_f81().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + f81().IsAggregate() || f81().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("f81: "); + f81().WriteToTextStream(emboss_reserved_local_stream, + emboss_reserved_local_field_options); + emboss_reserved_local_wrote_field = true; + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !f81().IsAggregate() && !f81().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } + emboss_reserved_local_stream->Write("# f81: UNREADABLE\n"); + } + } + + if (has_f82().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + f82().IsAggregate() || f82().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("f82: "); + f82().WriteToTextStream(emboss_reserved_local_stream, + emboss_reserved_local_field_options); + emboss_reserved_local_wrote_field = true; + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !f82().IsAggregate() && !f82().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } + emboss_reserved_local_stream->Write("# f82: UNREADABLE\n"); + } + } + + if (has_f83().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + f83().IsAggregate() || f83().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("f83: "); + f83().WriteToTextStream(emboss_reserved_local_stream, + emboss_reserved_local_field_options); + emboss_reserved_local_wrote_field = true; + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !f83().IsAggregate() && !f83().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } + emboss_reserved_local_stream->Write("# f83: UNREADABLE\n"); + } + } + + if (has_f84().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + f84().IsAggregate() || f84().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("f84: "); + f84().WriteToTextStream(emboss_reserved_local_stream, + emboss_reserved_local_field_options); + emboss_reserved_local_wrote_field = true; + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !f84().IsAggregate() && !f84().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } + emboss_reserved_local_stream->Write("# f84: UNREADABLE\n"); + } + } + + if (has_f85().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + f85().IsAggregate() || f85().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("f85: "); + f85().WriteToTextStream(emboss_reserved_local_stream, + emboss_reserved_local_field_options); + emboss_reserved_local_wrote_field = true; + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !f85().IsAggregate() && !f85().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } + emboss_reserved_local_stream->Write("# f85: UNREADABLE\n"); + } + } + + if (has_f86().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + f86().IsAggregate() || f86().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("f86: "); + f86().WriteToTextStream(emboss_reserved_local_stream, + emboss_reserved_local_field_options); + emboss_reserved_local_wrote_field = true; + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !f86().IsAggregate() && !f86().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } + emboss_reserved_local_stream->Write("# f86: UNREADABLE\n"); + } + } + + if (has_f87().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + f87().IsAggregate() || f87().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("f87: "); + f87().WriteToTextStream(emboss_reserved_local_stream, + emboss_reserved_local_field_options); + emboss_reserved_local_wrote_field = true; + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !f87().IsAggregate() && !f87().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } + emboss_reserved_local_stream->Write("# f87: UNREADABLE\n"); + } + } + + if (has_f88().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + f88().IsAggregate() || f88().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("f88: "); + f88().WriteToTextStream(emboss_reserved_local_stream, + emboss_reserved_local_field_options); + emboss_reserved_local_wrote_field = true; + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !f88().IsAggregate() && !f88().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } + emboss_reserved_local_stream->Write("# f88: UNREADABLE\n"); + } + } + + if (has_f89().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + f89().IsAggregate() || f89().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("f89: "); + f89().WriteToTextStream(emboss_reserved_local_stream, + emboss_reserved_local_field_options); + emboss_reserved_local_wrote_field = true; + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !f89().IsAggregate() && !f89().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } + emboss_reserved_local_stream->Write("# f89: UNREADABLE\n"); + } + } + + if (has_f90().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + f90().IsAggregate() || f90().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("f90: "); + f90().WriteToTextStream(emboss_reserved_local_stream, + emboss_reserved_local_field_options); + emboss_reserved_local_wrote_field = true; + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !f90().IsAggregate() && !f90().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } + emboss_reserved_local_stream->Write("# f90: UNREADABLE\n"); + } + } + + if (has_f91().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + f91().IsAggregate() || f91().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("f91: "); + f91().WriteToTextStream(emboss_reserved_local_stream, + emboss_reserved_local_field_options); + emboss_reserved_local_wrote_field = true; + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !f91().IsAggregate() && !f91().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } + emboss_reserved_local_stream->Write("# f91: UNREADABLE\n"); + } + } + + if (has_f92().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + f92().IsAggregate() || f92().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("f92: "); + f92().WriteToTextStream(emboss_reserved_local_stream, + emboss_reserved_local_field_options); + emboss_reserved_local_wrote_field = true; + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !f92().IsAggregate() && !f92().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } + emboss_reserved_local_stream->Write("# f92: UNREADABLE\n"); + } + } + + if (has_f93().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + f93().IsAggregate() || f93().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("f93: "); + f93().WriteToTextStream(emboss_reserved_local_stream, + emboss_reserved_local_field_options); + emboss_reserved_local_wrote_field = true; + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !f93().IsAggregate() && !f93().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } + emboss_reserved_local_stream->Write("# f93: UNREADABLE\n"); + } + } + + if (has_f94().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + f94().IsAggregate() || f94().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("f94: "); + f94().WriteToTextStream(emboss_reserved_local_stream, + emboss_reserved_local_field_options); + emboss_reserved_local_wrote_field = true; + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !f94().IsAggregate() && !f94().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } + emboss_reserved_local_stream->Write("# f94: UNREADABLE\n"); + } + } + + if (has_f95().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + f95().IsAggregate() || f95().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("f95: "); + f95().WriteToTextStream(emboss_reserved_local_stream, + emboss_reserved_local_field_options); + emboss_reserved_local_wrote_field = true; + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !f95().IsAggregate() && !f95().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } + emboss_reserved_local_stream->Write("# f95: UNREADABLE\n"); + } + } + + if (has_f96().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + f96().IsAggregate() || f96().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("f96: "); + f96().WriteToTextStream(emboss_reserved_local_stream, + emboss_reserved_local_field_options); + emboss_reserved_local_wrote_field = true; + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !f96().IsAggregate() && !f96().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } + emboss_reserved_local_stream->Write("# f96: UNREADABLE\n"); + } + } + + if (has_f97().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + f97().IsAggregate() || f97().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("f97: "); + f97().WriteToTextStream(emboss_reserved_local_stream, + emboss_reserved_local_field_options); + emboss_reserved_local_wrote_field = true; + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !f97().IsAggregate() && !f97().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } + emboss_reserved_local_stream->Write("# f97: UNREADABLE\n"); + } + } + + if (has_f98().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + f98().IsAggregate() || f98().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("f98: "); + f98().WriteToTextStream(emboss_reserved_local_stream, + emboss_reserved_local_field_options); + emboss_reserved_local_wrote_field = true; + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !f98().IsAggregate() && !f98().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } + emboss_reserved_local_stream->Write("# f98: UNREADABLE\n"); + } + } + + if (has_f99().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + f99().IsAggregate() || f99().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("f99: "); + f99().WriteToTextStream(emboss_reserved_local_stream, + emboss_reserved_local_field_options); + emboss_reserved_local_wrote_field = true; + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !f99().IsAggregate() && !f99().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } + emboss_reserved_local_stream->Write("# f99: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + emboss_reserved_local_stream->Write(" }"); + } + } + + + + static constexpr bool IsAggregate() { return true; } + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + tag() const; + ::emboss::support::Maybe has_tag() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + f0() const; + ::emboss::support::Maybe has_f0() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + f1() const; + ::emboss::support::Maybe has_f1() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + f2() const; + ::emboss::support::Maybe has_f2() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + f3() const; + ::emboss::support::Maybe has_f3() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + f4() const; + ::emboss::support::Maybe has_f4() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + f5() const; + ::emboss::support::Maybe has_f5() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + f6() const; + ::emboss::support::Maybe has_f6() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + f7() const; + ::emboss::support::Maybe has_f7() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + f8() const; + ::emboss::support::Maybe has_f8() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + f9() const; + ::emboss::support::Maybe has_f9() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + f10() const; + ::emboss::support::Maybe has_f10() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + f11() const; + ::emboss::support::Maybe has_f11() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + f12() const; + ::emboss::support::Maybe has_f12() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + f13() const; + ::emboss::support::Maybe has_f13() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + f14() const; + ::emboss::support::Maybe has_f14() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + f15() const; + ::emboss::support::Maybe has_f15() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + f16() const; + ::emboss::support::Maybe has_f16() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + f17() const; + ::emboss::support::Maybe has_f17() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + f18() const; + ::emboss::support::Maybe has_f18() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + f19() const; + ::emboss::support::Maybe has_f19() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + f20() const; + ::emboss::support::Maybe has_f20() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + f21() const; + ::emboss::support::Maybe has_f21() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + f22() const; + ::emboss::support::Maybe has_f22() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + f23() const; + ::emboss::support::Maybe has_f23() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + f24() const; + ::emboss::support::Maybe has_f24() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + f25() const; + ::emboss::support::Maybe has_f25() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + f26() const; + ::emboss::support::Maybe has_f26() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + f27() const; + ::emboss::support::Maybe has_f27() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + f28() const; + ::emboss::support::Maybe has_f28() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + f29() const; + ::emboss::support::Maybe has_f29() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + f30() const; + ::emboss::support::Maybe has_f30() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + f31() const; + ::emboss::support::Maybe has_f31() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + f32() const; + ::emboss::support::Maybe has_f32() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + f33() const; + ::emboss::support::Maybe has_f33() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + f34() const; + ::emboss::support::Maybe has_f34() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + f35() const; + ::emboss::support::Maybe has_f35() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + f36() const; + ::emboss::support::Maybe has_f36() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + f37() const; + ::emboss::support::Maybe has_f37() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + f38() const; + ::emboss::support::Maybe has_f38() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + f39() const; + ::emboss::support::Maybe has_f39() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + f40() const; + ::emboss::support::Maybe has_f40() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + f41() const; + ::emboss::support::Maybe has_f41() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + f42() const; + ::emboss::support::Maybe has_f42() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + f43() const; + ::emboss::support::Maybe has_f43() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + f44() const; + ::emboss::support::Maybe has_f44() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + f45() const; + ::emboss::support::Maybe has_f45() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + f46() const; + ::emboss::support::Maybe has_f46() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + f47() const; + ::emboss::support::Maybe has_f47() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + f48() const; + ::emboss::support::Maybe has_f48() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + f49() const; + ::emboss::support::Maybe has_f49() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + f50() const; + ::emboss::support::Maybe has_f50() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + f51() const; + ::emboss::support::Maybe has_f51() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + f52() const; + ::emboss::support::Maybe has_f52() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + f53() const; + ::emboss::support::Maybe has_f53() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + f54() const; + ::emboss::support::Maybe has_f54() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + f55() const; + ::emboss::support::Maybe has_f55() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + f56() const; + ::emboss::support::Maybe has_f56() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + f57() const; + ::emboss::support::Maybe has_f57() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + f58() const; + ::emboss::support::Maybe has_f58() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + f59() const; + ::emboss::support::Maybe has_f59() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + f60() const; + ::emboss::support::Maybe has_f60() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + f61() const; + ::emboss::support::Maybe has_f61() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + f62() const; + ::emboss::support::Maybe has_f62() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + f63() const; + ::emboss::support::Maybe has_f63() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + f64() const; + ::emboss::support::Maybe has_f64() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + f65() const; + ::emboss::support::Maybe has_f65() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + f66() const; + ::emboss::support::Maybe has_f66() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + f67() const; + ::emboss::support::Maybe has_f67() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + f68() const; + ::emboss::support::Maybe has_f68() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + f69() const; + ::emboss::support::Maybe has_f69() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + f70() const; + ::emboss::support::Maybe has_f70() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + f71() const; + ::emboss::support::Maybe has_f71() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + f72() const; + ::emboss::support::Maybe has_f72() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + f73() const; + ::emboss::support::Maybe has_f73() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + f74() const; + ::emboss::support::Maybe has_f74() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + f75() const; + ::emboss::support::Maybe has_f75() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + f76() const; + ::emboss::support::Maybe has_f76() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + f77() const; + ::emboss::support::Maybe has_f77() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + f78() const; + ::emboss::support::Maybe has_f78() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + f79() const; + ::emboss::support::Maybe has_f79() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + f80() const; + ::emboss::support::Maybe has_f80() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + f81() const; + ::emboss::support::Maybe has_f81() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + f82() const; + ::emboss::support::Maybe has_f82() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + f83() const; + ::emboss::support::Maybe has_f83() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + f84() const; + ::emboss::support::Maybe has_f84() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + f85() const; + ::emboss::support::Maybe has_f85() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + f86() const; + ::emboss::support::Maybe has_f86() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + f87() const; + ::emboss::support::Maybe has_f87() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + f88() const; + ::emboss::support::Maybe has_f88() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + f89() const; + ::emboss::support::Maybe has_f89() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + f90() const; + ::emboss::support::Maybe has_f90() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + f91() const; + ::emboss::support::Maybe has_f91() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + f92() const; + ::emboss::support::Maybe has_f92() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + f93() const; + ::emboss::support::Maybe has_f93() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + f94() const; + ::emboss::support::Maybe has_f94() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + f95() const; + ::emboss::support::Maybe has_f95() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + f96() const; + ::emboss::support::Maybe has_f96() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + f97() const; + ::emboss::support::Maybe has_f97() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + f98() const; + ::emboss::support::Maybe has_f98() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + f99() const; + ::emboss::support::Maybe has_f99() const; + + public: + class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { + public: + using ValueType = ::std::int32_t; + + explicit EmbossReservedDollarVirtualIntrinsicSizeInBytesView( + const GenericLargeConditionalsView &emboss_reserved_local_view) + : view_(emboss_reserved_local_view) {} + EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = delete; + EmbossReservedDollarVirtualIntrinsicSizeInBytesView(const EmbossReservedDollarVirtualIntrinsicSizeInBytesView &) = default; + EmbossReservedDollarVirtualIntrinsicSizeInBytesView(EmbossReservedDollarVirtualIntrinsicSizeInBytesView &&) = default; + EmbossReservedDollarVirtualIntrinsicSizeInBytesView &operator=(const EmbossReservedDollarVirtualIntrinsicSizeInBytesView &) = + default; + EmbossReservedDollarVirtualIntrinsicSizeInBytesView &operator=(EmbossReservedDollarVirtualIntrinsicSizeInBytesView &&) = + default; + ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; + + ::std::int32_t Read() const { + EMBOSS_CHECK(view_.has_IntrinsicSizeInBytes().ValueOr(false)); + auto emboss_reserved_local_value = MaybeRead(); + EMBOSS_CHECK(emboss_reserved_local_value.Known()); + EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); + return emboss_reserved_local_value.ValueOrDefault(); + } + ::std::int32_t UncheckedRead() const { + return MaybeRead().ValueOrDefault(); + } + bool Ok() const { + auto emboss_reserved_local_value = MaybeRead(); + return emboss_reserved_local_value.Known() && + ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); + } + template + void WriteToTextStream(Stream *emboss_reserved_local_stream, + const ::emboss::TextOutputOptions + &emboss_reserved_local_options) const { + ::emboss::support::WriteIntegerViewToTextStream( + this, emboss_reserved_local_stream, emboss_reserved_local_options); + } + + static constexpr bool IsAggregate() { return false; } + + + + private: + ::emboss::support::Maybe MaybeRead() const { + const auto emboss_reserved_local_subexpr_1 = view_.tag(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_4 = ::emboss::support::Choice(emboss_reserved_local_subexpr_3, ::emboss::support::Maybe(static_cast(8LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_5 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(1LL))); + const auto emboss_reserved_local_subexpr_6 = ::emboss::support::Choice(emboss_reserved_local_subexpr_5, ::emboss::support::Maybe(static_cast(8LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_7 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(2LL))); + const auto emboss_reserved_local_subexpr_8 = ::emboss::support::Choice(emboss_reserved_local_subexpr_7, ::emboss::support::Maybe(static_cast(8LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_9 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(3LL))); + const auto emboss_reserved_local_subexpr_10 = ::emboss::support::Choice(emboss_reserved_local_subexpr_9, ::emboss::support::Maybe(static_cast(8LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_11 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(4LL))); + const auto emboss_reserved_local_subexpr_12 = ::emboss::support::Choice(emboss_reserved_local_subexpr_11, ::emboss::support::Maybe(static_cast(8LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_13 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(5LL))); + const auto emboss_reserved_local_subexpr_14 = ::emboss::support::Choice(emboss_reserved_local_subexpr_13, ::emboss::support::Maybe(static_cast(8LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_15 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(6LL))); + const auto emboss_reserved_local_subexpr_16 = ::emboss::support::Choice(emboss_reserved_local_subexpr_15, ::emboss::support::Maybe(static_cast(8LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_17 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(7LL))); + const auto emboss_reserved_local_subexpr_18 = ::emboss::support::Choice(emboss_reserved_local_subexpr_17, ::emboss::support::Maybe(static_cast(8LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_19 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(8LL))); + const auto emboss_reserved_local_subexpr_20 = ::emboss::support::Choice(emboss_reserved_local_subexpr_19, ::emboss::support::Maybe(static_cast(8LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_21 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(9LL))); + const auto emboss_reserved_local_subexpr_22 = ::emboss::support::Choice(emboss_reserved_local_subexpr_21, ::emboss::support::Maybe(static_cast(8LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_23 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(10LL))); + const auto emboss_reserved_local_subexpr_24 = ::emboss::support::Choice(emboss_reserved_local_subexpr_23, ::emboss::support::Maybe(static_cast(8LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_25 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(11LL))); + const auto emboss_reserved_local_subexpr_26 = ::emboss::support::Choice(emboss_reserved_local_subexpr_25, ::emboss::support::Maybe(static_cast(8LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_27 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(12LL))); + const auto emboss_reserved_local_subexpr_28 = ::emboss::support::Choice(emboss_reserved_local_subexpr_27, ::emboss::support::Maybe(static_cast(8LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_29 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(13LL))); + const auto emboss_reserved_local_subexpr_30 = ::emboss::support::Choice(emboss_reserved_local_subexpr_29, ::emboss::support::Maybe(static_cast(8LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_31 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(14LL))); + const auto emboss_reserved_local_subexpr_32 = ::emboss::support::Choice(emboss_reserved_local_subexpr_31, ::emboss::support::Maybe(static_cast(8LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_33 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(15LL))); + const auto emboss_reserved_local_subexpr_34 = ::emboss::support::Choice(emboss_reserved_local_subexpr_33, ::emboss::support::Maybe(static_cast(8LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_35 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(16LL))); + const auto emboss_reserved_local_subexpr_36 = ::emboss::support::Choice(emboss_reserved_local_subexpr_35, ::emboss::support::Maybe(static_cast(8LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_37 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(17LL))); + const auto emboss_reserved_local_subexpr_38 = ::emboss::support::Choice(emboss_reserved_local_subexpr_37, ::emboss::support::Maybe(static_cast(8LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_39 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(18LL))); + const auto emboss_reserved_local_subexpr_40 = ::emboss::support::Choice(emboss_reserved_local_subexpr_39, ::emboss::support::Maybe(static_cast(8LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_41 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(19LL))); + const auto emboss_reserved_local_subexpr_42 = ::emboss::support::Choice(emboss_reserved_local_subexpr_41, ::emboss::support::Maybe(static_cast(8LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_43 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(20LL))); + const auto emboss_reserved_local_subexpr_44 = ::emboss::support::Choice(emboss_reserved_local_subexpr_43, ::emboss::support::Maybe(static_cast(8LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_45 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(21LL))); + const auto emboss_reserved_local_subexpr_46 = ::emboss::support::Choice(emboss_reserved_local_subexpr_45, ::emboss::support::Maybe(static_cast(8LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_47 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(22LL))); + const auto emboss_reserved_local_subexpr_48 = ::emboss::support::Choice(emboss_reserved_local_subexpr_47, ::emboss::support::Maybe(static_cast(8LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_49 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(23LL))); + const auto emboss_reserved_local_subexpr_50 = ::emboss::support::Choice(emboss_reserved_local_subexpr_49, ::emboss::support::Maybe(static_cast(8LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_51 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(24LL))); + const auto emboss_reserved_local_subexpr_52 = ::emboss::support::Choice(emboss_reserved_local_subexpr_51, ::emboss::support::Maybe(static_cast(8LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_53 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(25LL))); + const auto emboss_reserved_local_subexpr_54 = ::emboss::support::Choice(emboss_reserved_local_subexpr_53, ::emboss::support::Maybe(static_cast(8LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_55 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(26LL))); + const auto emboss_reserved_local_subexpr_56 = ::emboss::support::Choice(emboss_reserved_local_subexpr_55, ::emboss::support::Maybe(static_cast(8LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_57 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(27LL))); + const auto emboss_reserved_local_subexpr_58 = ::emboss::support::Choice(emboss_reserved_local_subexpr_57, ::emboss::support::Maybe(static_cast(8LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_59 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(28LL))); + const auto emboss_reserved_local_subexpr_60 = ::emboss::support::Choice(emboss_reserved_local_subexpr_59, ::emboss::support::Maybe(static_cast(8LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_61 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(29LL))); + const auto emboss_reserved_local_subexpr_62 = ::emboss::support::Choice(emboss_reserved_local_subexpr_61, ::emboss::support::Maybe(static_cast(8LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_63 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(30LL))); + const auto emboss_reserved_local_subexpr_64 = ::emboss::support::Choice(emboss_reserved_local_subexpr_63, ::emboss::support::Maybe(static_cast(8LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_65 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(31LL))); + const auto emboss_reserved_local_subexpr_66 = ::emboss::support::Choice(emboss_reserved_local_subexpr_65, ::emboss::support::Maybe(static_cast(8LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_67 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(32LL))); + const auto emboss_reserved_local_subexpr_68 = ::emboss::support::Choice(emboss_reserved_local_subexpr_67, ::emboss::support::Maybe(static_cast(8LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_69 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(33LL))); + const auto emboss_reserved_local_subexpr_70 = ::emboss::support::Choice(emboss_reserved_local_subexpr_69, ::emboss::support::Maybe(static_cast(8LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_71 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(34LL))); + const auto emboss_reserved_local_subexpr_72 = ::emboss::support::Choice(emboss_reserved_local_subexpr_71, ::emboss::support::Maybe(static_cast(8LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_73 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(35LL))); + const auto emboss_reserved_local_subexpr_74 = ::emboss::support::Choice(emboss_reserved_local_subexpr_73, ::emboss::support::Maybe(static_cast(8LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_75 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(36LL))); + const auto emboss_reserved_local_subexpr_76 = ::emboss::support::Choice(emboss_reserved_local_subexpr_75, ::emboss::support::Maybe(static_cast(8LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_77 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(37LL))); + const auto emboss_reserved_local_subexpr_78 = ::emboss::support::Choice(emboss_reserved_local_subexpr_77, ::emboss::support::Maybe(static_cast(8LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_79 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(38LL))); + const auto emboss_reserved_local_subexpr_80 = ::emboss::support::Choice(emboss_reserved_local_subexpr_79, ::emboss::support::Maybe(static_cast(8LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_81 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(39LL))); + const auto emboss_reserved_local_subexpr_82 = ::emboss::support::Choice(emboss_reserved_local_subexpr_81, ::emboss::support::Maybe(static_cast(8LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_83 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(40LL))); + const auto emboss_reserved_local_subexpr_84 = ::emboss::support::Choice(emboss_reserved_local_subexpr_83, ::emboss::support::Maybe(static_cast(8LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_85 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(41LL))); + const auto emboss_reserved_local_subexpr_86 = ::emboss::support::Choice(emboss_reserved_local_subexpr_85, ::emboss::support::Maybe(static_cast(8LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_87 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(42LL))); + const auto emboss_reserved_local_subexpr_88 = ::emboss::support::Choice(emboss_reserved_local_subexpr_87, ::emboss::support::Maybe(static_cast(8LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_89 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(43LL))); + const auto emboss_reserved_local_subexpr_90 = ::emboss::support::Choice(emboss_reserved_local_subexpr_89, ::emboss::support::Maybe(static_cast(8LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_91 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(44LL))); + const auto emboss_reserved_local_subexpr_92 = ::emboss::support::Choice(emboss_reserved_local_subexpr_91, ::emboss::support::Maybe(static_cast(8LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_93 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(45LL))); + const auto emboss_reserved_local_subexpr_94 = ::emboss::support::Choice(emboss_reserved_local_subexpr_93, ::emboss::support::Maybe(static_cast(8LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_95 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(46LL))); + const auto emboss_reserved_local_subexpr_96 = ::emboss::support::Choice(emboss_reserved_local_subexpr_95, ::emboss::support::Maybe(static_cast(8LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_97 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(47LL))); + const auto emboss_reserved_local_subexpr_98 = ::emboss::support::Choice(emboss_reserved_local_subexpr_97, ::emboss::support::Maybe(static_cast(8LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_99 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(48LL))); + const auto emboss_reserved_local_subexpr_100 = ::emboss::support::Choice(emboss_reserved_local_subexpr_99, ::emboss::support::Maybe(static_cast(8LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_101 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(49LL))); + const auto emboss_reserved_local_subexpr_102 = ::emboss::support::Choice(emboss_reserved_local_subexpr_101, ::emboss::support::Maybe(static_cast(8LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_103 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(50LL))); + const auto emboss_reserved_local_subexpr_104 = ::emboss::support::Choice(emboss_reserved_local_subexpr_103, ::emboss::support::Maybe(static_cast(8LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_105 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(51LL))); + const auto emboss_reserved_local_subexpr_106 = ::emboss::support::Choice(emboss_reserved_local_subexpr_105, ::emboss::support::Maybe(static_cast(8LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_107 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(52LL))); + const auto emboss_reserved_local_subexpr_108 = ::emboss::support::Choice(emboss_reserved_local_subexpr_107, ::emboss::support::Maybe(static_cast(8LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_109 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(53LL))); + const auto emboss_reserved_local_subexpr_110 = ::emboss::support::Choice(emboss_reserved_local_subexpr_109, ::emboss::support::Maybe(static_cast(8LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_111 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(54LL))); + const auto emboss_reserved_local_subexpr_112 = ::emboss::support::Choice(emboss_reserved_local_subexpr_111, ::emboss::support::Maybe(static_cast(8LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_113 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(55LL))); + const auto emboss_reserved_local_subexpr_114 = ::emboss::support::Choice(emboss_reserved_local_subexpr_113, ::emboss::support::Maybe(static_cast(8LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_115 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(56LL))); + const auto emboss_reserved_local_subexpr_116 = ::emboss::support::Choice(emboss_reserved_local_subexpr_115, ::emboss::support::Maybe(static_cast(8LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_117 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(57LL))); + const auto emboss_reserved_local_subexpr_118 = ::emboss::support::Choice(emboss_reserved_local_subexpr_117, ::emboss::support::Maybe(static_cast(8LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_119 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(58LL))); + const auto emboss_reserved_local_subexpr_120 = ::emboss::support::Choice(emboss_reserved_local_subexpr_119, ::emboss::support::Maybe(static_cast(8LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_121 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(59LL))); + const auto emboss_reserved_local_subexpr_122 = ::emboss::support::Choice(emboss_reserved_local_subexpr_121, ::emboss::support::Maybe(static_cast(8LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_123 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(60LL))); + const auto emboss_reserved_local_subexpr_124 = ::emboss::support::Choice(emboss_reserved_local_subexpr_123, ::emboss::support::Maybe(static_cast(8LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_125 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(61LL))); + const auto emboss_reserved_local_subexpr_126 = ::emboss::support::Choice(emboss_reserved_local_subexpr_125, ::emboss::support::Maybe(static_cast(8LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_127 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(62LL))); + const auto emboss_reserved_local_subexpr_128 = ::emboss::support::Choice(emboss_reserved_local_subexpr_127, ::emboss::support::Maybe(static_cast(8LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_129 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(63LL))); + const auto emboss_reserved_local_subexpr_130 = ::emboss::support::Choice(emboss_reserved_local_subexpr_129, ::emboss::support::Maybe(static_cast(8LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_131 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(64LL))); + const auto emboss_reserved_local_subexpr_132 = ::emboss::support::Choice(emboss_reserved_local_subexpr_131, ::emboss::support::Maybe(static_cast(8LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_133 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(65LL))); + const auto emboss_reserved_local_subexpr_134 = ::emboss::support::Choice(emboss_reserved_local_subexpr_133, ::emboss::support::Maybe(static_cast(8LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_135 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(66LL))); + const auto emboss_reserved_local_subexpr_136 = ::emboss::support::Choice(emboss_reserved_local_subexpr_135, ::emboss::support::Maybe(static_cast(8LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_137 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(67LL))); + const auto emboss_reserved_local_subexpr_138 = ::emboss::support::Choice(emboss_reserved_local_subexpr_137, ::emboss::support::Maybe(static_cast(8LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_139 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(68LL))); + const auto emboss_reserved_local_subexpr_140 = ::emboss::support::Choice(emboss_reserved_local_subexpr_139, ::emboss::support::Maybe(static_cast(8LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_141 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(69LL))); + const auto emboss_reserved_local_subexpr_142 = ::emboss::support::Choice(emboss_reserved_local_subexpr_141, ::emboss::support::Maybe(static_cast(8LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_143 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(70LL))); + const auto emboss_reserved_local_subexpr_144 = ::emboss::support::Choice(emboss_reserved_local_subexpr_143, ::emboss::support::Maybe(static_cast(8LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_145 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(71LL))); + const auto emboss_reserved_local_subexpr_146 = ::emboss::support::Choice(emboss_reserved_local_subexpr_145, ::emboss::support::Maybe(static_cast(8LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_147 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(72LL))); + const auto emboss_reserved_local_subexpr_148 = ::emboss::support::Choice(emboss_reserved_local_subexpr_147, ::emboss::support::Maybe(static_cast(8LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_149 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(73LL))); + const auto emboss_reserved_local_subexpr_150 = ::emboss::support::Choice(emboss_reserved_local_subexpr_149, ::emboss::support::Maybe(static_cast(8LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_151 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(74LL))); + const auto emboss_reserved_local_subexpr_152 = ::emboss::support::Choice(emboss_reserved_local_subexpr_151, ::emboss::support::Maybe(static_cast(8LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_153 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(75LL))); + const auto emboss_reserved_local_subexpr_154 = ::emboss::support::Choice(emboss_reserved_local_subexpr_153, ::emboss::support::Maybe(static_cast(8LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_155 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(76LL))); + const auto emboss_reserved_local_subexpr_156 = ::emboss::support::Choice(emboss_reserved_local_subexpr_155, ::emboss::support::Maybe(static_cast(8LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_157 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(77LL))); + const auto emboss_reserved_local_subexpr_158 = ::emboss::support::Choice(emboss_reserved_local_subexpr_157, ::emboss::support::Maybe(static_cast(8LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_159 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(78LL))); + const auto emboss_reserved_local_subexpr_160 = ::emboss::support::Choice(emboss_reserved_local_subexpr_159, ::emboss::support::Maybe(static_cast(8LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_161 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(79LL))); + const auto emboss_reserved_local_subexpr_162 = ::emboss::support::Choice(emboss_reserved_local_subexpr_161, ::emboss::support::Maybe(static_cast(8LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_163 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(80LL))); + const auto emboss_reserved_local_subexpr_164 = ::emboss::support::Choice(emboss_reserved_local_subexpr_163, ::emboss::support::Maybe(static_cast(8LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_165 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(81LL))); + const auto emboss_reserved_local_subexpr_166 = ::emboss::support::Choice(emboss_reserved_local_subexpr_165, ::emboss::support::Maybe(static_cast(8LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_167 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(82LL))); + const auto emboss_reserved_local_subexpr_168 = ::emboss::support::Choice(emboss_reserved_local_subexpr_167, ::emboss::support::Maybe(static_cast(8LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_169 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(83LL))); + const auto emboss_reserved_local_subexpr_170 = ::emboss::support::Choice(emboss_reserved_local_subexpr_169, ::emboss::support::Maybe(static_cast(8LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_171 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(84LL))); + const auto emboss_reserved_local_subexpr_172 = ::emboss::support::Choice(emboss_reserved_local_subexpr_171, ::emboss::support::Maybe(static_cast(8LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_173 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(85LL))); + const auto emboss_reserved_local_subexpr_174 = ::emboss::support::Choice(emboss_reserved_local_subexpr_173, ::emboss::support::Maybe(static_cast(8LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_175 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(86LL))); + const auto emboss_reserved_local_subexpr_176 = ::emboss::support::Choice(emboss_reserved_local_subexpr_175, ::emboss::support::Maybe(static_cast(8LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_177 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(87LL))); + const auto emboss_reserved_local_subexpr_178 = ::emboss::support::Choice(emboss_reserved_local_subexpr_177, ::emboss::support::Maybe(static_cast(8LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_179 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(88LL))); + const auto emboss_reserved_local_subexpr_180 = ::emboss::support::Choice(emboss_reserved_local_subexpr_179, ::emboss::support::Maybe(static_cast(8LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_181 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(89LL))); + const auto emboss_reserved_local_subexpr_182 = ::emboss::support::Choice(emboss_reserved_local_subexpr_181, ::emboss::support::Maybe(static_cast(8LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_183 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(90LL))); + const auto emboss_reserved_local_subexpr_184 = ::emboss::support::Choice(emboss_reserved_local_subexpr_183, ::emboss::support::Maybe(static_cast(8LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_185 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(91LL))); + const auto emboss_reserved_local_subexpr_186 = ::emboss::support::Choice(emboss_reserved_local_subexpr_185, ::emboss::support::Maybe(static_cast(8LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_187 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(92LL))); + const auto emboss_reserved_local_subexpr_188 = ::emboss::support::Choice(emboss_reserved_local_subexpr_187, ::emboss::support::Maybe(static_cast(8LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_189 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(93LL))); + const auto emboss_reserved_local_subexpr_190 = ::emboss::support::Choice(emboss_reserved_local_subexpr_189, ::emboss::support::Maybe(static_cast(8LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_191 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(94LL))); + const auto emboss_reserved_local_subexpr_192 = ::emboss::support::Choice(emboss_reserved_local_subexpr_191, ::emboss::support::Maybe(static_cast(8LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_193 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(95LL))); + const auto emboss_reserved_local_subexpr_194 = ::emboss::support::Choice(emboss_reserved_local_subexpr_193, ::emboss::support::Maybe(static_cast(8LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_195 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(96LL))); + const auto emboss_reserved_local_subexpr_196 = ::emboss::support::Choice(emboss_reserved_local_subexpr_195, ::emboss::support::Maybe(static_cast(8LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_197 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(97LL))); + const auto emboss_reserved_local_subexpr_198 = ::emboss::support::Choice(emboss_reserved_local_subexpr_197, ::emboss::support::Maybe(static_cast(8LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_199 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(98LL))); + const auto emboss_reserved_local_subexpr_200 = ::emboss::support::Choice(emboss_reserved_local_subexpr_199, ::emboss::support::Maybe(static_cast(8LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_201 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(99LL))); + const auto emboss_reserved_local_subexpr_202 = ::emboss::support::Choice(emboss_reserved_local_subexpr_201, ::emboss::support::Maybe(static_cast(8LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_203 = ::emboss::support::Maximum(::emboss::support::Maybe(static_cast(0LL)), ::emboss::support::Maybe(static_cast(4LL)), emboss_reserved_local_subexpr_4, emboss_reserved_local_subexpr_6, emboss_reserved_local_subexpr_8, emboss_reserved_local_subexpr_10, emboss_reserved_local_subexpr_12, emboss_reserved_local_subexpr_14, emboss_reserved_local_subexpr_16, emboss_reserved_local_subexpr_18, emboss_reserved_local_subexpr_20, emboss_reserved_local_subexpr_22, emboss_reserved_local_subexpr_24, emboss_reserved_local_subexpr_26, emboss_reserved_local_subexpr_28, emboss_reserved_local_subexpr_30, emboss_reserved_local_subexpr_32, emboss_reserved_local_subexpr_34, emboss_reserved_local_subexpr_36, emboss_reserved_local_subexpr_38, emboss_reserved_local_subexpr_40, emboss_reserved_local_subexpr_42, emboss_reserved_local_subexpr_44, emboss_reserved_local_subexpr_46, emboss_reserved_local_subexpr_48, emboss_reserved_local_subexpr_50, emboss_reserved_local_subexpr_52, emboss_reserved_local_subexpr_54, emboss_reserved_local_subexpr_56, emboss_reserved_local_subexpr_58, emboss_reserved_local_subexpr_60, emboss_reserved_local_subexpr_62, emboss_reserved_local_subexpr_64, emboss_reserved_local_subexpr_66, emboss_reserved_local_subexpr_68, emboss_reserved_local_subexpr_70, emboss_reserved_local_subexpr_72, emboss_reserved_local_subexpr_74, emboss_reserved_local_subexpr_76, emboss_reserved_local_subexpr_78, emboss_reserved_local_subexpr_80, emboss_reserved_local_subexpr_82, emboss_reserved_local_subexpr_84, emboss_reserved_local_subexpr_86, emboss_reserved_local_subexpr_88, emboss_reserved_local_subexpr_90, emboss_reserved_local_subexpr_92, emboss_reserved_local_subexpr_94, emboss_reserved_local_subexpr_96, emboss_reserved_local_subexpr_98, emboss_reserved_local_subexpr_100, emboss_reserved_local_subexpr_102, emboss_reserved_local_subexpr_104, emboss_reserved_local_subexpr_106, emboss_reserved_local_subexpr_108, emboss_reserved_local_subexpr_110, emboss_reserved_local_subexpr_112, emboss_reserved_local_subexpr_114, emboss_reserved_local_subexpr_116, emboss_reserved_local_subexpr_118, emboss_reserved_local_subexpr_120, emboss_reserved_local_subexpr_122, emboss_reserved_local_subexpr_124, emboss_reserved_local_subexpr_126, emboss_reserved_local_subexpr_128, emboss_reserved_local_subexpr_130, emboss_reserved_local_subexpr_132, emboss_reserved_local_subexpr_134, emboss_reserved_local_subexpr_136, emboss_reserved_local_subexpr_138, emboss_reserved_local_subexpr_140, emboss_reserved_local_subexpr_142, emboss_reserved_local_subexpr_144, emboss_reserved_local_subexpr_146, emboss_reserved_local_subexpr_148, emboss_reserved_local_subexpr_150, emboss_reserved_local_subexpr_152, emboss_reserved_local_subexpr_154, emboss_reserved_local_subexpr_156, emboss_reserved_local_subexpr_158, emboss_reserved_local_subexpr_160, emboss_reserved_local_subexpr_162, emboss_reserved_local_subexpr_164, emboss_reserved_local_subexpr_166, emboss_reserved_local_subexpr_168, emboss_reserved_local_subexpr_170, emboss_reserved_local_subexpr_172, emboss_reserved_local_subexpr_174, emboss_reserved_local_subexpr_176, emboss_reserved_local_subexpr_178, emboss_reserved_local_subexpr_180, emboss_reserved_local_subexpr_182, emboss_reserved_local_subexpr_184, emboss_reserved_local_subexpr_186, emboss_reserved_local_subexpr_188, emboss_reserved_local_subexpr_190, emboss_reserved_local_subexpr_192, emboss_reserved_local_subexpr_194, emboss_reserved_local_subexpr_196, emboss_reserved_local_subexpr_198, emboss_reserved_local_subexpr_200, emboss_reserved_local_subexpr_202); + + return emboss_reserved_local_subexpr_203; + } + + static constexpr bool ValueIsOk( + ::std::int32_t emboss_reserved_local_value) { + return (void)emboss_reserved_local_value, // Silence -Wunused-parameter + ::emboss::support::Maybe(true).ValueOr(false); + } + + const GenericLargeConditionalsView view_; + }; + EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; + + public: + class EmbossReservedDollarVirtualMaxSizeInBytesView final { + public: + using ValueType = ::std::int32_t; + + constexpr EmbossReservedDollarVirtualMaxSizeInBytesView() {} + EmbossReservedDollarVirtualMaxSizeInBytesView(const EmbossReservedDollarVirtualMaxSizeInBytesView &) = default; + EmbossReservedDollarVirtualMaxSizeInBytesView(EmbossReservedDollarVirtualMaxSizeInBytesView &&) = default; + EmbossReservedDollarVirtualMaxSizeInBytesView &operator=(const EmbossReservedDollarVirtualMaxSizeInBytesView &) = + default; + EmbossReservedDollarVirtualMaxSizeInBytesView &operator=(EmbossReservedDollarVirtualMaxSizeInBytesView &&) = + default; + ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; + + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } + template + void WriteToTextStream(Stream *emboss_reserved_local_stream, + const ::emboss::TextOutputOptions + &emboss_reserved_local_options) const { + ::emboss::support::WriteIntegerViewToTextStream( + this, emboss_reserved_local_stream, emboss_reserved_local_options); + } + + static constexpr bool IsAggregate() { return false; } + }; + + static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView MaxSizeInBytes() { + return EmbossReservedDollarVirtualMaxSizeInBytesView(); + } + static constexpr ::emboss::support::Maybe has_MaxSizeInBytes() { + return ::emboss::support::Maybe(true); + } + + public: + class EmbossReservedDollarVirtualMinSizeInBytesView final { + public: + using ValueType = ::std::int32_t; + + constexpr EmbossReservedDollarVirtualMinSizeInBytesView() {} + EmbossReservedDollarVirtualMinSizeInBytesView(const EmbossReservedDollarVirtualMinSizeInBytesView &) = default; + EmbossReservedDollarVirtualMinSizeInBytesView(EmbossReservedDollarVirtualMinSizeInBytesView &&) = default; + EmbossReservedDollarVirtualMinSizeInBytesView &operator=(const EmbossReservedDollarVirtualMinSizeInBytesView &) = + default; + EmbossReservedDollarVirtualMinSizeInBytesView &operator=(EmbossReservedDollarVirtualMinSizeInBytesView &&) = + default; + ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; + + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } + template + void WriteToTextStream(Stream *emboss_reserved_local_stream, + const ::emboss::TextOutputOptions + &emboss_reserved_local_options) const { + ::emboss::support::WriteIntegerViewToTextStream( + this, emboss_reserved_local_stream, emboss_reserved_local_options); + } + + static constexpr bool IsAggregate() { return false; } + }; + + static constexpr EmbossReservedDollarVirtualMinSizeInBytesView MinSizeInBytes() { + return EmbossReservedDollarVirtualMinSizeInBytesView(); + } + static constexpr ::emboss::support::Maybe has_MinSizeInBytes() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericLargeConditionalsView; +}; +using LargeConditionalsView = + GenericLargeConditionalsView; +using LargeConditionalsWriter = + GenericLargeConditionalsView; + +template +struct EmbossReservedInternalIsGenericLargeConditionalsView { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericLargeConditionalsView< + GenericLargeConditionalsView> { + static constexpr const bool value = true; +}; + +template +inline GenericLargeConditionalsView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeLargeConditionalsView( T &&emboss_reserved_local_arg) { + return GenericLargeConditionalsView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericLargeConditionalsView> +MakeLargeConditionalsView( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericLargeConditionalsView>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericLargeConditionalsView< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedLargeConditionalsView( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericLargeConditionalsView< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +namespace LargeConditionals { + +} // namespace LargeConditionals + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericLargeConditionalsView::tag() + const { + + if ( has_tag().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericLargeConditionalsView::has_tag() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericLargeConditionalsView::f0() + const { + + if ( has_f0().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(4LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 4>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericLargeConditionalsView::has_f0() const { + return ::emboss::support::Equal((tag().Ok() ? ::emboss::support::Maybe(static_cast(tag().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(0LL))); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericLargeConditionalsView::f1() + const { + + if ( has_f1().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(4LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 4>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericLargeConditionalsView::has_f1() const { + return ::emboss::support::Equal((tag().Ok() ? ::emboss::support::Maybe(static_cast(tag().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(1LL))); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericLargeConditionalsView::f2() + const { + + if ( has_f2().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(4LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 4>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericLargeConditionalsView::has_f2() const { + return ::emboss::support::Equal((tag().Ok() ? ::emboss::support::Maybe(static_cast(tag().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(2LL))); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericLargeConditionalsView::f3() + const { + + if ( has_f3().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(4LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 4>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericLargeConditionalsView::has_f3() const { + return ::emboss::support::Equal((tag().Ok() ? ::emboss::support::Maybe(static_cast(tag().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(3LL))); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericLargeConditionalsView::f4() + const { + + if ( has_f4().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(4LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 4>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericLargeConditionalsView::has_f4() const { + return ::emboss::support::Equal((tag().Ok() ? ::emboss::support::Maybe(static_cast(tag().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(4LL))); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericLargeConditionalsView::f5() + const { + + if ( has_f5().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(4LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 4>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericLargeConditionalsView::has_f5() const { + return ::emboss::support::Equal((tag().Ok() ? ::emboss::support::Maybe(static_cast(tag().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(5LL))); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericLargeConditionalsView::f6() + const { + + if ( has_f6().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(4LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 4>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericLargeConditionalsView::has_f6() const { + return ::emboss::support::Equal((tag().Ok() ? ::emboss::support::Maybe(static_cast(tag().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(6LL))); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericLargeConditionalsView::f7() + const { + + if ( has_f7().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(4LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 4>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericLargeConditionalsView::has_f7() const { + return ::emboss::support::Equal((tag().Ok() ? ::emboss::support::Maybe(static_cast(tag().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(7LL))); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericLargeConditionalsView::f8() + const { + + if ( has_f8().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(4LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 4>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericLargeConditionalsView::has_f8() const { + return ::emboss::support::Equal((tag().Ok() ? ::emboss::support::Maybe(static_cast(tag().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(8LL))); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericLargeConditionalsView::f9() + const { + + if ( has_f9().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(4LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 4>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericLargeConditionalsView::has_f9() const { + return ::emboss::support::Equal((tag().Ok() ? ::emboss::support::Maybe(static_cast(tag().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(9LL))); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericLargeConditionalsView::f10() + const { + + if ( has_f10().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(4LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 4>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericLargeConditionalsView::has_f10() const { + return ::emboss::support::Equal((tag().Ok() ? ::emboss::support::Maybe(static_cast(tag().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(10LL))); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericLargeConditionalsView::f11() + const { + + if ( has_f11().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(4LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 4>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericLargeConditionalsView::has_f11() const { + return ::emboss::support::Equal((tag().Ok() ? ::emboss::support::Maybe(static_cast(tag().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(11LL))); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericLargeConditionalsView::f12() + const { + + if ( has_f12().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(4LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 4>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericLargeConditionalsView::has_f12() const { + return ::emboss::support::Equal((tag().Ok() ? ::emboss::support::Maybe(static_cast(tag().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(12LL))); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericLargeConditionalsView::f13() + const { + + if ( has_f13().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(4LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 4>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericLargeConditionalsView::has_f13() const { + return ::emboss::support::Equal((tag().Ok() ? ::emboss::support::Maybe(static_cast(tag().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(13LL))); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericLargeConditionalsView::f14() + const { + + if ( has_f14().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(4LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 4>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericLargeConditionalsView::has_f14() const { + return ::emboss::support::Equal((tag().Ok() ? ::emboss::support::Maybe(static_cast(tag().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(14LL))); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericLargeConditionalsView::f15() + const { + + if ( has_f15().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(4LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 4>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericLargeConditionalsView::has_f15() const { + return ::emboss::support::Equal((tag().Ok() ? ::emboss::support::Maybe(static_cast(tag().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(15LL))); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericLargeConditionalsView::f16() + const { + + if ( has_f16().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(4LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 4>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericLargeConditionalsView::has_f16() const { + return ::emboss::support::Equal((tag().Ok() ? ::emboss::support::Maybe(static_cast(tag().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(16LL))); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericLargeConditionalsView::f17() + const { + + if ( has_f17().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(4LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 4>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericLargeConditionalsView::has_f17() const { + return ::emboss::support::Equal((tag().Ok() ? ::emboss::support::Maybe(static_cast(tag().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(17LL))); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericLargeConditionalsView::f18() + const { + + if ( has_f18().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(4LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 4>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericLargeConditionalsView::has_f18() const { + return ::emboss::support::Equal((tag().Ok() ? ::emboss::support::Maybe(static_cast(tag().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(18LL))); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericLargeConditionalsView::f19() + const { + + if ( has_f19().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(4LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 4>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericLargeConditionalsView::has_f19() const { + return ::emboss::support::Equal((tag().Ok() ? ::emboss::support::Maybe(static_cast(tag().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(19LL))); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericLargeConditionalsView::f20() + const { + + if ( has_f20().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(4LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 4>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericLargeConditionalsView::has_f20() const { + return ::emboss::support::Equal((tag().Ok() ? ::emboss::support::Maybe(static_cast(tag().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(20LL))); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericLargeConditionalsView::f21() + const { + + if ( has_f21().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(4LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 4>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericLargeConditionalsView::has_f21() const { + return ::emboss::support::Equal((tag().Ok() ? ::emboss::support::Maybe(static_cast(tag().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(21LL))); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericLargeConditionalsView::f22() + const { + + if ( has_f22().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(4LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 4>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericLargeConditionalsView::has_f22() const { + return ::emboss::support::Equal((tag().Ok() ? ::emboss::support::Maybe(static_cast(tag().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(22LL))); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericLargeConditionalsView::f23() + const { + + if ( has_f23().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(4LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 4>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericLargeConditionalsView::has_f23() const { + return ::emboss::support::Equal((tag().Ok() ? ::emboss::support::Maybe(static_cast(tag().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(23LL))); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericLargeConditionalsView::f24() + const { + + if ( has_f24().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(4LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 4>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericLargeConditionalsView::has_f24() const { + return ::emboss::support::Equal((tag().Ok() ? ::emboss::support::Maybe(static_cast(tag().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(24LL))); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericLargeConditionalsView::f25() + const { + + if ( has_f25().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(4LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 4>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericLargeConditionalsView::has_f25() const { + return ::emboss::support::Equal((tag().Ok() ? ::emboss::support::Maybe(static_cast(tag().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(25LL))); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericLargeConditionalsView::f26() + const { + + if ( has_f26().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(4LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 4>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericLargeConditionalsView::has_f26() const { + return ::emboss::support::Equal((tag().Ok() ? ::emboss::support::Maybe(static_cast(tag().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(26LL))); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericLargeConditionalsView::f27() + const { + + if ( has_f27().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(4LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 4>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericLargeConditionalsView::has_f27() const { + return ::emboss::support::Equal((tag().Ok() ? ::emboss::support::Maybe(static_cast(tag().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(27LL))); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericLargeConditionalsView::f28() + const { + + if ( has_f28().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(4LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 4>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericLargeConditionalsView::has_f28() const { + return ::emboss::support::Equal((tag().Ok() ? ::emboss::support::Maybe(static_cast(tag().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(28LL))); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericLargeConditionalsView::f29() + const { + + if ( has_f29().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(4LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 4>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericLargeConditionalsView::has_f29() const { + return ::emboss::support::Equal((tag().Ok() ? ::emboss::support::Maybe(static_cast(tag().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(29LL))); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericLargeConditionalsView::f30() + const { + + if ( has_f30().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(4LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 4>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericLargeConditionalsView::has_f30() const { + return ::emboss::support::Equal((tag().Ok() ? ::emboss::support::Maybe(static_cast(tag().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(30LL))); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericLargeConditionalsView::f31() + const { + + if ( has_f31().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(4LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 4>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericLargeConditionalsView::has_f31() const { + return ::emboss::support::Equal((tag().Ok() ? ::emboss::support::Maybe(static_cast(tag().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(31LL))); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericLargeConditionalsView::f32() + const { + + if ( has_f32().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(4LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 4>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericLargeConditionalsView::has_f32() const { + return ::emboss::support::Equal((tag().Ok() ? ::emboss::support::Maybe(static_cast(tag().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(32LL))); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericLargeConditionalsView::f33() + const { + + if ( has_f33().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(4LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 4>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericLargeConditionalsView::has_f33() const { + return ::emboss::support::Equal((tag().Ok() ? ::emboss::support::Maybe(static_cast(tag().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(33LL))); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericLargeConditionalsView::f34() + const { + + if ( has_f34().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(4LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 4>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericLargeConditionalsView::has_f34() const { + return ::emboss::support::Equal((tag().Ok() ? ::emboss::support::Maybe(static_cast(tag().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(34LL))); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericLargeConditionalsView::f35() + const { + + if ( has_f35().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(4LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 4>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericLargeConditionalsView::has_f35() const { + return ::emboss::support::Equal((tag().Ok() ? ::emboss::support::Maybe(static_cast(tag().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(35LL))); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericLargeConditionalsView::f36() + const { + + if ( has_f36().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(4LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 4>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericLargeConditionalsView::has_f36() const { + return ::emboss::support::Equal((tag().Ok() ? ::emboss::support::Maybe(static_cast(tag().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(36LL))); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericLargeConditionalsView::f37() + const { + + if ( has_f37().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(4LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 4>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericLargeConditionalsView::has_f37() const { + return ::emboss::support::Equal((tag().Ok() ? ::emboss::support::Maybe(static_cast(tag().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(37LL))); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericLargeConditionalsView::f38() + const { + + if ( has_f38().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(4LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 4>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericLargeConditionalsView::has_f38() const { + return ::emboss::support::Equal((tag().Ok() ? ::emboss::support::Maybe(static_cast(tag().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(38LL))); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericLargeConditionalsView::f39() + const { + + if ( has_f39().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(4LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 4>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericLargeConditionalsView::has_f39() const { + return ::emboss::support::Equal((tag().Ok() ? ::emboss::support::Maybe(static_cast(tag().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(39LL))); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericLargeConditionalsView::f40() + const { + + if ( has_f40().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(4LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 4>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericLargeConditionalsView::has_f40() const { + return ::emboss::support::Equal((tag().Ok() ? ::emboss::support::Maybe(static_cast(tag().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(40LL))); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericLargeConditionalsView::f41() + const { + + if ( has_f41().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(4LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 4>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericLargeConditionalsView::has_f41() const { + return ::emboss::support::Equal((tag().Ok() ? ::emboss::support::Maybe(static_cast(tag().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(41LL))); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericLargeConditionalsView::f42() + const { + + if ( has_f42().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(4LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 4>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericLargeConditionalsView::has_f42() const { + return ::emboss::support::Equal((tag().Ok() ? ::emboss::support::Maybe(static_cast(tag().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(42LL))); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericLargeConditionalsView::f43() + const { + + if ( has_f43().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(4LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 4>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericLargeConditionalsView::has_f43() const { + return ::emboss::support::Equal((tag().Ok() ? ::emboss::support::Maybe(static_cast(tag().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(43LL))); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericLargeConditionalsView::f44() + const { + + if ( has_f44().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(4LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 4>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericLargeConditionalsView::has_f44() const { + return ::emboss::support::Equal((tag().Ok() ? ::emboss::support::Maybe(static_cast(tag().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(44LL))); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericLargeConditionalsView::f45() + const { + + if ( has_f45().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(4LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 4>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericLargeConditionalsView::has_f45() const { + return ::emboss::support::Equal((tag().Ok() ? ::emboss::support::Maybe(static_cast(tag().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(45LL))); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericLargeConditionalsView::f46() + const { + + if ( has_f46().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(4LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 4>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericLargeConditionalsView::has_f46() const { + return ::emboss::support::Equal((tag().Ok() ? ::emboss::support::Maybe(static_cast(tag().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(46LL))); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericLargeConditionalsView::f47() + const { + + if ( has_f47().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(4LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 4>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericLargeConditionalsView::has_f47() const { + return ::emboss::support::Equal((tag().Ok() ? ::emboss::support::Maybe(static_cast(tag().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(47LL))); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericLargeConditionalsView::f48() + const { + + if ( has_f48().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(4LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 4>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericLargeConditionalsView::has_f48() const { + return ::emboss::support::Equal((tag().Ok() ? ::emboss::support::Maybe(static_cast(tag().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(48LL))); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericLargeConditionalsView::f49() + const { + + if ( has_f49().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(4LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 4>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericLargeConditionalsView::has_f49() const { + return ::emboss::support::Equal((tag().Ok() ? ::emboss::support::Maybe(static_cast(tag().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(49LL))); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericLargeConditionalsView::f50() + const { + + if ( has_f50().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(4LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 4>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericLargeConditionalsView::has_f50() const { + return ::emboss::support::Equal((tag().Ok() ? ::emboss::support::Maybe(static_cast(tag().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(50LL))); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericLargeConditionalsView::f51() + const { + + if ( has_f51().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(4LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 4>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericLargeConditionalsView::has_f51() const { + return ::emboss::support::Equal((tag().Ok() ? ::emboss::support::Maybe(static_cast(tag().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(51LL))); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericLargeConditionalsView::f52() + const { + + if ( has_f52().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(4LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 4>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericLargeConditionalsView::has_f52() const { + return ::emboss::support::Equal((tag().Ok() ? ::emboss::support::Maybe(static_cast(tag().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(52LL))); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericLargeConditionalsView::f53() + const { + + if ( has_f53().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(4LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 4>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericLargeConditionalsView::has_f53() const { + return ::emboss::support::Equal((tag().Ok() ? ::emboss::support::Maybe(static_cast(tag().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(53LL))); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericLargeConditionalsView::f54() + const { + + if ( has_f54().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(4LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 4>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericLargeConditionalsView::has_f54() const { + return ::emboss::support::Equal((tag().Ok() ? ::emboss::support::Maybe(static_cast(tag().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(54LL))); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericLargeConditionalsView::f55() + const { + + if ( has_f55().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(4LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 4>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericLargeConditionalsView::has_f55() const { + return ::emboss::support::Equal((tag().Ok() ? ::emboss::support::Maybe(static_cast(tag().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(55LL))); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericLargeConditionalsView::f56() + const { + + if ( has_f56().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(4LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 4>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericLargeConditionalsView::has_f56() const { + return ::emboss::support::Equal((tag().Ok() ? ::emboss::support::Maybe(static_cast(tag().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(56LL))); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericLargeConditionalsView::f57() + const { + + if ( has_f57().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(4LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 4>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericLargeConditionalsView::has_f57() const { + return ::emboss::support::Equal((tag().Ok() ? ::emboss::support::Maybe(static_cast(tag().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(57LL))); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericLargeConditionalsView::f58() + const { + + if ( has_f58().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(4LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 4>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericLargeConditionalsView::has_f58() const { + return ::emboss::support::Equal((tag().Ok() ? ::emboss::support::Maybe(static_cast(tag().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(58LL))); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericLargeConditionalsView::f59() + const { + + if ( has_f59().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(4LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 4>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericLargeConditionalsView::has_f59() const { + return ::emboss::support::Equal((tag().Ok() ? ::emboss::support::Maybe(static_cast(tag().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(59LL))); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericLargeConditionalsView::f60() + const { + + if ( has_f60().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(4LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 4>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericLargeConditionalsView::has_f60() const { + return ::emboss::support::Equal((tag().Ok() ? ::emboss::support::Maybe(static_cast(tag().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(60LL))); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericLargeConditionalsView::f61() + const { + + if ( has_f61().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(4LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 4>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericLargeConditionalsView::has_f61() const { + return ::emboss::support::Equal((tag().Ok() ? ::emboss::support::Maybe(static_cast(tag().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(61LL))); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericLargeConditionalsView::f62() + const { + + if ( has_f62().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(4LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 4>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericLargeConditionalsView::has_f62() const { + return ::emboss::support::Equal((tag().Ok() ? ::emboss::support::Maybe(static_cast(tag().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(62LL))); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericLargeConditionalsView::f63() + const { + + if ( has_f63().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(4LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 4>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericLargeConditionalsView::has_f63() const { + return ::emboss::support::Equal((tag().Ok() ? ::emboss::support::Maybe(static_cast(tag().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(63LL))); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericLargeConditionalsView::f64() + const { + + if ( has_f64().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(4LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 4>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericLargeConditionalsView::has_f64() const { + return ::emboss::support::Equal((tag().Ok() ? ::emboss::support::Maybe(static_cast(tag().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(64LL))); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericLargeConditionalsView::f65() + const { + + if ( has_f65().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(4LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 4>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericLargeConditionalsView::has_f65() const { + return ::emboss::support::Equal((tag().Ok() ? ::emboss::support::Maybe(static_cast(tag().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(65LL))); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericLargeConditionalsView::f66() + const { + + if ( has_f66().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(4LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 4>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericLargeConditionalsView::has_f66() const { + return ::emboss::support::Equal((tag().Ok() ? ::emboss::support::Maybe(static_cast(tag().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(66LL))); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericLargeConditionalsView::f67() + const { + + if ( has_f67().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(4LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 4>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericLargeConditionalsView::has_f67() const { + return ::emboss::support::Equal((tag().Ok() ? ::emboss::support::Maybe(static_cast(tag().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(67LL))); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericLargeConditionalsView::f68() + const { + + if ( has_f68().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(4LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 4>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericLargeConditionalsView::has_f68() const { + return ::emboss::support::Equal((tag().Ok() ? ::emboss::support::Maybe(static_cast(tag().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(68LL))); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericLargeConditionalsView::f69() + const { + + if ( has_f69().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(4LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 4>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericLargeConditionalsView::has_f69() const { + return ::emboss::support::Equal((tag().Ok() ? ::emboss::support::Maybe(static_cast(tag().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(69LL))); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericLargeConditionalsView::f70() + const { + + if ( has_f70().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(4LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 4>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericLargeConditionalsView::has_f70() const { + return ::emboss::support::Equal((tag().Ok() ? ::emboss::support::Maybe(static_cast(tag().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(70LL))); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericLargeConditionalsView::f71() + const { + + if ( has_f71().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(4LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 4>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericLargeConditionalsView::has_f71() const { + return ::emboss::support::Equal((tag().Ok() ? ::emboss::support::Maybe(static_cast(tag().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(71LL))); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericLargeConditionalsView::f72() + const { + + if ( has_f72().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(4LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 4>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericLargeConditionalsView::has_f72() const { + return ::emboss::support::Equal((tag().Ok() ? ::emboss::support::Maybe(static_cast(tag().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(72LL))); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericLargeConditionalsView::f73() + const { + + if ( has_f73().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(4LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 4>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericLargeConditionalsView::has_f73() const { + return ::emboss::support::Equal((tag().Ok() ? ::emboss::support::Maybe(static_cast(tag().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(73LL))); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericLargeConditionalsView::f74() + const { + + if ( has_f74().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(4LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 4>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericLargeConditionalsView::has_f74() const { + return ::emboss::support::Equal((tag().Ok() ? ::emboss::support::Maybe(static_cast(tag().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(74LL))); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericLargeConditionalsView::f75() + const { + + if ( has_f75().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(4LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 4>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericLargeConditionalsView::has_f75() const { + return ::emboss::support::Equal((tag().Ok() ? ::emboss::support::Maybe(static_cast(tag().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(75LL))); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericLargeConditionalsView::f76() + const { + + if ( has_f76().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(4LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 4>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericLargeConditionalsView::has_f76() const { + return ::emboss::support::Equal((tag().Ok() ? ::emboss::support::Maybe(static_cast(tag().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(76LL))); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericLargeConditionalsView::f77() + const { + + if ( has_f77().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(4LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 4>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericLargeConditionalsView::has_f77() const { + return ::emboss::support::Equal((tag().Ok() ? ::emboss::support::Maybe(static_cast(tag().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(77LL))); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericLargeConditionalsView::f78() + const { + + if ( has_f78().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(4LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 4>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericLargeConditionalsView::has_f78() const { + return ::emboss::support::Equal((tag().Ok() ? ::emboss::support::Maybe(static_cast(tag().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(78LL))); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericLargeConditionalsView::f79() + const { + + if ( has_f79().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(4LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 4>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericLargeConditionalsView::has_f79() const { + return ::emboss::support::Equal((tag().Ok() ? ::emboss::support::Maybe(static_cast(tag().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(79LL))); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericLargeConditionalsView::f80() + const { + + if ( has_f80().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(4LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 4>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericLargeConditionalsView::has_f80() const { + return ::emboss::support::Equal((tag().Ok() ? ::emboss::support::Maybe(static_cast(tag().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(80LL))); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericLargeConditionalsView::f81() + const { + + if ( has_f81().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(4LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 4>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericLargeConditionalsView::has_f81() const { + return ::emboss::support::Equal((tag().Ok() ? ::emboss::support::Maybe(static_cast(tag().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(81LL))); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericLargeConditionalsView::f82() + const { + + if ( has_f82().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(4LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 4>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericLargeConditionalsView::has_f82() const { + return ::emboss::support::Equal((tag().Ok() ? ::emboss::support::Maybe(static_cast(tag().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(82LL))); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericLargeConditionalsView::f83() + const { + + if ( has_f83().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(4LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 4>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericLargeConditionalsView::has_f83() const { + return ::emboss::support::Equal((tag().Ok() ? ::emboss::support::Maybe(static_cast(tag().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(83LL))); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericLargeConditionalsView::f84() + const { + + if ( has_f84().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(4LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 4>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericLargeConditionalsView::has_f84() const { + return ::emboss::support::Equal((tag().Ok() ? ::emboss::support::Maybe(static_cast(tag().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(84LL))); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericLargeConditionalsView::f85() + const { + + if ( has_f85().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(4LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 4>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericLargeConditionalsView::has_f85() const { + return ::emboss::support::Equal((tag().Ok() ? ::emboss::support::Maybe(static_cast(tag().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(85LL))); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericLargeConditionalsView::f86() + const { + + if ( has_f86().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(4LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 4>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericLargeConditionalsView::has_f86() const { + return ::emboss::support::Equal((tag().Ok() ? ::emboss::support::Maybe(static_cast(tag().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(86LL))); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericLargeConditionalsView::f87() + const { + + if ( has_f87().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(4LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 4>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericLargeConditionalsView::has_f87() const { + return ::emboss::support::Equal((tag().Ok() ? ::emboss::support::Maybe(static_cast(tag().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(87LL))); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericLargeConditionalsView::f88() + const { + + if ( has_f88().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(4LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 4>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericLargeConditionalsView::has_f88() const { + return ::emboss::support::Equal((tag().Ok() ? ::emboss::support::Maybe(static_cast(tag().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(88LL))); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericLargeConditionalsView::f89() + const { + + if ( has_f89().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(4LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 4>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericLargeConditionalsView::has_f89() const { + return ::emboss::support::Equal((tag().Ok() ? ::emboss::support::Maybe(static_cast(tag().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(89LL))); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericLargeConditionalsView::f90() + const { + + if ( has_f90().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(4LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 4>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericLargeConditionalsView::has_f90() const { + return ::emboss::support::Equal((tag().Ok() ? ::emboss::support::Maybe(static_cast(tag().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(90LL))); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericLargeConditionalsView::f91() + const { + + if ( has_f91().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(4LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 4>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericLargeConditionalsView::has_f91() const { + return ::emboss::support::Equal((tag().Ok() ? ::emboss::support::Maybe(static_cast(tag().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(91LL))); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericLargeConditionalsView::f92() + const { + + if ( has_f92().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(4LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 4>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericLargeConditionalsView::has_f92() const { + return ::emboss::support::Equal((tag().Ok() ? ::emboss::support::Maybe(static_cast(tag().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(92LL))); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericLargeConditionalsView::f93() + const { + + if ( has_f93().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(4LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 4>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericLargeConditionalsView::has_f93() const { + return ::emboss::support::Equal((tag().Ok() ? ::emboss::support::Maybe(static_cast(tag().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(93LL))); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericLargeConditionalsView::f94() + const { + + if ( has_f94().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(4LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 4>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericLargeConditionalsView::has_f94() const { + return ::emboss::support::Equal((tag().Ok() ? ::emboss::support::Maybe(static_cast(tag().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(94LL))); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericLargeConditionalsView::f95() + const { + + if ( has_f95().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(4LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 4>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericLargeConditionalsView::has_f95() const { + return ::emboss::support::Equal((tag().Ok() ? ::emboss::support::Maybe(static_cast(tag().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(95LL))); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericLargeConditionalsView::f96() + const { + + if ( has_f96().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(4LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 4>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericLargeConditionalsView::has_f96() const { + return ::emboss::support::Equal((tag().Ok() ? ::emboss::support::Maybe(static_cast(tag().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(96LL))); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericLargeConditionalsView::f97() + const { + + if ( has_f97().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(4LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 4>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericLargeConditionalsView::has_f97() const { + return ::emboss::support::Equal((tag().Ok() ? ::emboss::support::Maybe(static_cast(tag().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(97LL))); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericLargeConditionalsView::f98() + const { + + if ( has_f98().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(4LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 4>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericLargeConditionalsView::has_f98() const { + return ::emboss::support::Equal((tag().Ok() ? ::emboss::support::Maybe(static_cast(tag().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(98LL))); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericLargeConditionalsView::f99() + const { + + if ( has_f99().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(4LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 4>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericLargeConditionalsView::has_f99() const { + return ::emboss::support::Equal((tag().Ok() ? ::emboss::support::Maybe(static_cast(tag().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(99LL))); +} + + +template +inline typename GenericLargeConditionalsView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView +GenericLargeConditionalsView::IntrinsicSizeInBytes() const { + return + typename GenericLargeConditionalsView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView( + *this); +} + +template +inline ::emboss::support::Maybe +GenericLargeConditionalsView::has_IntrinsicSizeInBytes() const { + return ::emboss::support::Maybe(true); +} + + +namespace LargeConditionals { +inline constexpr ::std::int32_t MaxSizeInBytes() { + return ::emboss::support::Maybe(static_cast(8LL)).ValueOrDefault(); +} +} // namespace LargeConditionals + +template +inline constexpr ::std::int32_t +GenericLargeConditionalsView::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { + return LargeConditionals::MaxSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericLargeConditionalsView< + Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { + return LargeConditionals::MaxSizeInBytes(); +} + +namespace LargeConditionals { +inline constexpr ::std::int32_t MinSizeInBytes() { + return ::emboss::support::Maybe(static_cast(4LL)).ValueOrDefault(); +} +} // namespace LargeConditionals + +template +inline constexpr ::std::int32_t +GenericLargeConditionalsView::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { + return LargeConditionals::MinSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericLargeConditionalsView< + Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { + return LargeConditionals::MinSizeInBytes(); +} + + + +} // namespace test + + + +} // namespace emboss + + + +/* NOLINTEND */ + +#endif // TESTDATA_MANY_CONDITIONALS_EMB_H_ +