diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index 50bfa69..0000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,65 +0,0 @@ -name: CI - -on: - push: - branches-ignore: gh-pages - pull_request: - branches-ignore: gh-pages - -jobs: - deploy: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - - name: Create gh-pages directory - run: mkdir -p generation/gh-pages - - - name: Install dependencies - run: sudo apt-get install m4 graphviz - - - name: "Generate C++20 flowcharts" - run: | - set -eu -o pipefail - - out='generation/gh-pages/std-2020' - mkdir -- "$out" - - m4 cpp20/flowchart.dot.m4 | dot -Tsvg -start=1000 > "$out"/initialization.svg - m4 cpp20/flowchart.dot.m4 | dot -Tpng -start=1000 > "$out"/initialization.png - - - name: "Generate C++23 flowcharts" - run: | - set -eu -o pipefail - - out='generation/gh-pages/std-2023' - mkdir -- "$out" - - cpp23/build.sh "$out"/initialization.svg "$out"/initialization.png - - - name: Deploy generated flowcharts to Github Pages - if: github.ref == 'refs/heads/main' - run: | - # Set Git committer identity - git config user.name "ci-build" - git config user.email "ci-build@randomcat.org" - - # Clear the index - EMPTY_TREE="$(git hash-object -t tree /dev/null)" - git read-tree -- "$EMPTY_TREE" - - # Add site data to index - git add generation/gh-pages - - git fetch origin gh-pages - ORIG_SITE_TREE="$(git rev-parse origin/gh-pages^{tree})" - NEW_SITE_TREE="$(git write-tree --prefix=generation/gh-pages)" - - if [ "$ORIG_SITE_TREE" != "$NEW_SITE_TREE" ]; then - SITE_COMMIT="$(git commit-tree -p origin/gh-pages -m "CI updates" -- "$NEW_SITE_TREE")" - echo Updating GitHub pages site to commit "$SITE_COMMIT" - git push origin "$SITE_COMMIT":gh-pages - else - echo Not updating GitHub pages site - fi diff --git a/.gitignore b/.gitignore deleted file mode 100644 index fa32d71..0000000 --- a/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -generated-flowchart.dot -rendered.svg diff --git a/LICENSE.md b/LICENSE.md deleted file mode 100644 index af3376c..0000000 --- a/LICENSE.md +++ /dev/null @@ -1,4 +0,0 @@ -Copyright Jason Cobb 2020 - -The hosted images are licensed to you under the Creattive Commons Attribution 4.0 License (CC BY 4.0), available [here](https://creativecommons.org/licenses/by/4.0/legalcode). - diff --git a/README.md b/README.md deleted file mode 100644 index 7bad1a0..0000000 --- a/README.md +++ /dev/null @@ -1,8 +0,0 @@ -# C++ Initialization Flowchart - -This repository contains code to generate a flowchart showing the initialization rules for C++20 and C++23. - -The generated files are hosted on Github Pages: -* C++20: [SVG](https://randomcat.org/cpp-initialization/std-2020/initialization.svg), [PNG](https://randomcat.org/cpp-initialization/std-2020/initialization.png). -* C++23: [SVG](https://randomcat.org/cpp-initialization/std-2023/initialization.svg), [PNG](https://randomcat.org/cpp-initialization/std-2023/initialization.png). - diff --git a/cpp20/flowchart.dot.m4 b/cpp20/flowchart.dot.m4 deleted file mode 100644 index 5bd1fdb..0000000 --- a/cpp20/flowchart.dot.m4 +++ /dev/null @@ -1,657 +0,0 @@ -define(`DEFINE_DONE', `$1 [label="Done", style=filled, fillcolor=green, shape=box, color=green, fontcolor=white] -') -define(`LINK_TO_DONE', `$1 -> $1'`__generated_done '`$2'` -DEFINE_DONE(`$1'`__generated_done') -') - -define(`QUESTION_NODE', `$1 [label="$2'ifelse($3,`', `', `\n'$3)`", shape=diamond]') -define(`INSTRUCTION_NODE', `$1 [label="$2'ifelse($3,`', `', `\n'$3)`", shape=box]') - -define(`YN_QUESTION_NODE', `QUESTION_NODE($1, $2, $3) -$1 -> $4 [label="Yes"] -$1 -> $5 [label="No"] -') - -define(`YN_QUESTION_NODE_NO_CITE', `QUESTION_NODE($1, $2) -$1 -> $3 [label="Yes"] -$1 -> $4 [label="No"] -') - -define(`ILL_FORMED_NODE', `$1 [label="The program is ill-formed.", shape=box, style=filled, color=red, fontcolor=white] -') - -define(`LINK_TO_ILL_FORMED', `$1 -> $1'`__generated_ill_formed $2'` -ILL_FORMED_NODE(`$1'`__generated_ill_formed') -') - -digraph initialization { - start [label="So you want to initialize something?\n[dcl.init]/16\nCopyright Janet Cobb 2020, Licensed CC BY 4.0", style=filled, fillcolor=green, shape=box, color=green, fontcolor=white] - start -> is_braced - - YN_QUESTION_NODE(is_braced, `Is the initializer in braces?', `[dcl.init]/16.1', list_initialization_head, is_dest_reference) - - YN_QUESTION_NODE(is_dest_reference, `Is the destination type a reference type?', `[dcl.init]/16.2', reference_initialization_head, is_char_arr_init) - - YN_QUESTION_NODE(is_char_arr_init, `Is the destination type a char[] or a char*_t[]?', `[dcl.init]/16.3', is_char_arr_literal_init, is_initializer_empty_parens) - - YN_QUESTION_NODE(is_char_arr_literal_init, `Is the initializer a string literal?', `[dcl.init]/16.3', string_literal_initialization_head, is_initializer_empty_parens) - - YN_QUESTION_NODE(is_initializer_empty_parens, `Is the initializer \"()\"?', `[dcl.init]/16.4', value_initialization_head, is_dest_array) - - YN_QUESTION_NODE(is_dest_array, `Is the destination type an array?', `[dcl.init]/16.5', array_initialization_head, is_dest_class_type) - - subgraph cluster_array_initialization { - INSTRUCTION_NODE(array_initialization_head, `Initialization as follows:', `[dcl.init]/16.5') - array_initialization_head -> array_k_definition - - INSTRUCTION_NODE(array_k_definition, `Let k be the number of elements in the initializer's expression list.') - array_k_definition -> array_is_unsized - - YN_QUESTION_NODE_NO_CITE(array_is_unsized, `Is destination type an array of unknown bound?', array_unsized_n_defn, array_sized_n_defn) - - INSTRUCTION_NODE(array_unsized_n_defn, `Let n be k.') - array_unsized_n_defn -> array_initialize_first_k - - INSTRUCTION_NODE(array_sized_n_defn, `Let n be the array size of the destination type.') - array_sized_n_defn -> array_k_gt_n - - YN_QUESTION_NODE_NO_CITE(array_k_gt_n, `Is k > n?', array_k_gt_n_ill_formed, array_initialize_first_k) - - ILL_FORMED_NODE(array_k_gt_n_ill_formed) - - INSTRUCTION_NODE(array_initialize_first_k, `Copy-initialize the first k array elements from the expressions in the initailizer.') - array_initialize_first_k -> array_initialize_rest - - INSTRUCTION_NODE(array_initialize_rest, `Value-initialize the remaining elements.') - LINK_TO_DONE(array_initialize_rest) - } - - YN_QUESTION_NODE(is_dest_class_type, `Is the destination type a class type?', `[dcl.init]/16.6', class_dest_initialization_head, is_source_class_type) - - YN_QUESTION_NODE(is_source_class_type, `Is the source type a class type?', `[dcl.init]/16.7', class_source_initialization_head, is_direct_init_for_nullptr) - - YN_QUESTION_NODE(is_direct_init_for_nullptr, `Is the initialization direct-initialization?', `[dcl.init]/16.8', is_source_type_nullptr, standard_conv_seq_initialization_head) - - YN_QUESTION_NODE(is_source_type_nullptr, `Is the source type std::nullptr_t?', `[dcl.init]/16.8', is_dest_type_bool_for_nullptr, standard_conv_seq_initialization_head) - - YN_QUESTION_NODE(is_dest_type_bool_for_nullptr, `Is the destination type bool?', `[dcl.init]/16.8', nullptr_to_bool_init, standard_conv_seq_initialization_head) - - INSTRUCTION_NODE(nullptr_to_bool_init, `The bool is initialized to false.', `[dcl.init]/16.8') - LINK_TO_DONE(nullptr_to_bool_init) - - subgraph cluster_class_dest_initialization { - INSTRUCTION_NODE(class_dest_initialization_head, `Initialization as follows:', `[dcl.init]/16.6') - class_dest_initialization_head -> class_is_initializer_prvalue - - YN_QUESTION_NODE(class_is_initializer_prvalue, `Is the initializer a prvalue?', `[dcl.init]/16.6.1', class_is_initializer_prvalue_same_class, class_is_copy_init) - - YN_QUESTION_NODE(class_is_initializer_prvalue_same_class, `Is the source type the same as the destination type (up to cv-qualification)?', `[dcl.init]/16.6.1', class_initialize_by_prvalue, class_is_copy_init) - - INSTRUCTION_NODE(class_initialize_by_prvalue, `Use the prvalue to initialize the destination object.', `[dcl.init]/16.6.1') - LINK_TO_DONE(class_initialize_by_prvalue) - - YN_QUESTION_NODE(class_is_copy_init, `Is the initialization copy-initialization?', `[dcl.init]/16.6.2', class_is_copy_init_same_class, class_is_direct_init) - - INSTRUCTION_NODE(class_is_copy_init_same_class, `Is the source type the same class as the destination type (up to cv qualification)?', `[dcl.init]/16.6.2') - class_is_copy_init_same_class -> class_consider_constructors [label="Yes"] - class_is_copy_init_same_class -> class_is_copy_init_derived_class [label="No"] - - INSTRUCTION_NODE(class_is_copy_init_derived_class, `Is the source type a derived class of the destination type?', `[dcl.init]/16.6.2') - class_is_copy_init_derived_class -> class_consider_constructors [label="Yes"] - class_is_copy_init_derived_class -> class_user_defined_conv_head [label="No"] - - INSTRUCTION_NODE(class_is_direct_init, `The initialization is direct-initialization.', `[dcl.init]/16.6.2') - class_is_direct_init -> class_consider_constructors - - INSTRUCTION_NODE(class_consider_constructors, `Enumerate constructors and select best through overload resolution.', `[dcl.init]/16.6.2') - class_consider_constructors -> class_constructors_is_resolution_successful - - YN_QUESTION_NODE(class_constructors_is_resolution_successful, `Is overload resolution succesful?', `[dcl.init]/16.6.2', class_constructors_use_selected, class_is_aggregate) - - INSTRUCTION_NODE(class_constructors_use_selected, `Use the selected constructor to initialize the object, using the expression or expression-list as argument(s).', `[dcl.init]/16.6.2.1') - LINK_TO_DONE(class_constructors_use_selected) - - YN_QUESTION_NODE(class_is_aggregate, `Is the destination type an aggregate class?', `[dcl.init]/16.6.2.2', class_aggregate_is_initializer_expr_list, class_ill_formed) - - YN_QUESTION_NODE(class_aggregate_is_initializer_expr_list, `Is the initializer a parenthesized expression-list?', `[dcl.init]/16.6.2.2', class_aggregate_paren_init_head, class_ill_formed) - - ILL_FORMED_NODE(class_ill_formed) - - subgraph class_aggregate_paren_init { - INSTRUCTION_NODE(class_aggregate_paren_init_head, `Initialized as follows:', `[dcl.init]/16.6.2.2') - class_aggregate_paren_init_head -> class_aggregate_paren_n_defn - - INSTRUCTION_NODE(class_aggregate_paren_n_defn, `Let n be the number of elements in the aggregate.') - class_aggregate_paren_n_defn -> class_aggregate_paren_k_defn - - INSTRUCTION_NODE(class_aggregate_paren_k_defn, `Let k be the number of elements in the initializer'`''s expression list.') - class_aggregate_paren_k_defn -> class_aggregate_paren_is_k_gt_n - - YN_QUESTION_NODE_NO_CITE(class_aggregate_paren_is_k_gt_n, `Is k > n?', class_aggregate_paren_ill_formed, class_aggregate_paren_initialize_first_k) - - INSTRUCTION_NODE(class_aggregate_paren_initialize_first_k, `Copy-initialize the first k elements from the expression list.') - class_aggregate_paren_initialize_first_k -> class_aggregate_paren_initialize_rest - - INSTRUCTION_NODE(class_aggregate_paren_initialize_rest, `Use default member initializer or value-initialize the remaining elements.') - LINK_TO_DONE(class_aggregate_paren_initialize_rest) - - ILL_FORMED_NODE(class_aggregate_paren_ill_formed) - } - - subgraph class_user_defined_conv { - INSTRUCTION_NODE(class_user_defined_conv_head, `Initialization as follows:', `[dcl.init]/16.6.3') - class_user_defined_conv_head -> class_user_defined_conv_overload_resolution - - INSTRUCTION_NODE(class_user_defined_conv_overload_resolution, `Use overload resolution to select the best user-defined conversion that can convert from the source type to the destination type or (when a conversion function is used) to a derived class thereof.') - class_user_defined_conv_overload_resolution -> class_user_defined_conv_is_possible - - YN_QUESTION_NODE_NO_CITE(class_user_defined_conv_is_possible, `Is the conversion ambiguous or impossible?', class_user_defined_conv_ill_formed, class_user_defined_conv_do_conversion) - - INSTRUCTION_NODE(class_user_defined_conv_do_conversion, `Call the selected function with the initializer-expression as its argument.') - class_user_defined_conv_do_conversion -> class_user_defined_conv_initialize - - INSTRUCTION_NODE(class_user_defined_conv_initialize, `Direct-initialize the destination object with the result of the conversion.') - LINK_TO_DONE(class_user_defined_conv_initialize) - - ILL_FORMED_NODE(class_user_defined_conv_ill_formed) - } - } - - subgraph cluster_string_literal_initialization { - INSTRUCTION_NODE(string_literal_initialization_head, `Initialization as follows:', `[dcl.init.string]') - string_literal_initialization_head -> string_literal_verify_kind - - INSTRUCTION_NODE(string_literal_verify_kind, `Verify array type and literal type match.') - string_literal_verify_kind -> { string_literal_kind_char, string_literal_kind_char8, string_literal_kind_char16, string_literal_kind_char32, string_literal_kind_wchar, string_literal_kind_other } - - { - rank=same; - string_literal_kind_char [label="char[] / ordinary literal"] - string_literal_kind_char8 [label="char8_t[] / UTF-8 literal"] - string_literal_kind_char16 [label="char16_t[] / UTF-16 literal"] - string_literal_kind_char32 [label="char32_t[] / UTF-32 literal"] - string_literal_kind_wchar [label="wchar_t[] / wide literal"] - string_literal_kind_other [label="Anything else"] - - // Force these nodes to layout in the following order - string_literal_kind_char -> string_literal_kind_char8 -> string_literal_kind_char16 -> string_literal_kind_char32 -> string_literal_kind_wchar -> string_literal_kind_other [style=invis] - } - - LINK_TO_ILL_FORMED(string_literal_kind_other) - - { string_literal_kind_char, string_literal_kind_char8, string_literal_kind_char16, string_literal_kind_char32, string_literal_kind_wchar } -> string_literal_initialize_first - - INSTRUCTION_NODE(string_literal_initialize_first, `Initialize the first elements of the array with successive values from the string literal.') - string_literal_initialize_first -> string_literal_has_too_many - - YN_QUESTION_NODE_NO_CITE(string_literal_has_too_many, `Are there more initializers than array elements?', string_literal_ill_formed_too_many, string_literal_initialize_rest) - - ILL_FORMED_NODE(string_literal_ill_formed_too_many) - - INSTRUCTION_NODE(string_literal_initialize_rest, `Zero-initialize the remaining elements of the array (if any).') - LINK_TO_DONE(string_literal_initialize_rest) - } - - subgraph cluster_class_source_initialization { - INSTRUCTION_NODE(class_source_initialization_head, `Initialized as follows:', `[dcl.init]/16.7') - class_source_initialization_head -> class_source_consider_conversion_functions - - INSTRUCTION_NODE(class_source_consider_conversion_functions, `Use overload resolution to select the best applicable conversion function.') - class_source_consider_conversion_functions -> class_source_conversion_is_impossible - - YN_QUESTION_NODE_NO_CITE(class_source_conversion_is_impossible, `Is the conversion impossible or ambiguous?', class_source_conversion_ill_formed, class_source_initialize) - - ILL_FORMED_NODE(class_source_conversion_ill_formed) - - INSTRUCTION_NODE(class_source_initialize, `Use the result of the conversion to convert the initializer to the object being initialized.') - LINK_TO_DONE(class_source_initialize) - } - - subgraph cluster_standard_conv_seq_initialization { - INSTRUCTION_NODE(standard_conv_seq_initialization_head, `The object is initialized as follows:', `[dcl.init]/6.9') - standard_conv_seq_initialization_head -> standard_conv_seq_do_init - - INSTRUCTION_NODE(standard_conv_seq_do_init, `Initialize the object using the value of the initializer expression, using a standard conversion sequence if necessary, not considering any user-defined conversions.') - standard_conv_seq_do_init -> standard_conv_seq_is_possible - - YN_QUESTION_NODE_NO_CITE(standard_conv_seq_is_possible, `Is the conversion possible?', standard_conv_seq_is_bitfield, standard_conv_seq_ill_formed) - - ILL_FORMED_NODE(standard_conv_seq_ill_formed) - - QUESTION_NODE(standard_conv_seq_is_bitfield, `Is the object to be initialized a bit-field?') - standard_conv_seq_is_bitfield -> standard_conv_seq_is_bitfield_in_range [label="Yes"] - LINK_TO_DONE(standard_conv_seq_is_bitfield, [label="No"]) - - QUESTION_NODE(standard_conv_seq_is_bitfield_in_range, `Is the value representable by the bit-field?') - standard_conv_seq_is_bitfield_in_range -> standard_conv_seq_bitfield_imp_def [label="No"] - LINK_TO_DONE(standard_conv_seq_is_bitfield_in_range, [label="Yes"]) - - INSTRUCTION_NODE(standard_conv_seq_bitfield_imp_def, `The value of the bit-field is implementation-defined.') - LINK_TO_DONE(standard_conv_seq_bitfield_imp_def) - } - - subgraph cluster_reference_initialization { - INSTRUCTION_NODE(reference_initialization_head, `Reference initialization', `[dcl.init.ref]') - reference_initialization_head -> reference_dest_type_defn - - INSTRUCTION_NODE(reference_dest_type_defn, `Let the destination type be \"reference to cv1 T1\".', `[dcl.init.ref]/5') - reference_dest_type_defn -> reference_source_type_defn - - INSTRUCTION_NODE(reference_source_type_defn, `Let the source type be \"cv2 T2\".', `[dcl.init.ref]/5') - reference_source_type_defn -> reference_is_dest_lval - - YN_QUESTION_NODE(reference_is_dest_lval, `Is the destination type an lvalue reference?', `[dcl.init.ref]/5.1', reference_dest_lval_is_source_lval, reference_dest_is_lval_non_const) - - YN_QUESTION_NODE(reference_dest_lval_is_source_lval, `Is the initializer an lvalue?', `[dcl.init.ref]/5.1', reference_lvals_is_compatible, reference_dest_lval_is_source_class) - - YN_QUESTION_NODE(reference_lvals_is_compatible, `Is cv1 T1 reference-compatibile with cv2 T2?', `[dcl.init.ref]/5.1', reference_lvals_compatible_bind, reference_dest_lval_is_source_class) - - INSTRUCTION_NODE(reference_lvals_compatible_bind, `The destination reference is bound to the initializer lvalue (or appropriate base).', `[dcl.init.ref]/5.1') - LINK_TO_DONE(reference_lvals_compatible_bind) - - YN_QUESTION_NODE(reference_dest_lval_is_source_class, `Is T2 a class type?', `[dcl.init.ref]/5.1.2', reference_dest_lval_source_class_is_reference_related, reference_dest_is_lval_non_const) - - YN_QUESTION_NODE(reference_dest_lval_source_class_is_reference_related, `Is T1 reference-related to T2?', `[dcl.init.ref]/5.1.2', reference_dest_is_lval_non_const, reference_dest_lval_source_class_is_convertible) - - YN_QUESTION_NODE(reference_dest_lval_source_class_is_convertible, `Is T2 convertible to an lvalue of type cv3 T3 such that cv1 T1 is reference-compatible with cv3 T3?', `[dcl.init.ref]/5.1.2', reference_class_select_conversion, reference_dest_is_lval_non_const) - - INSTRUCTION_NODE(reference_class_select_conversion, `Select the best applicable conversion function.', `[dcl.init.ref]/5.1.2') - reference_class_select_conversion -> reference_class_do_initialization - - INSTRUCTION_NODE(reference_class_do_initialization, `The destination reference is bound to the result of the conversion (or appropriate base).', `[dcl.init.ref]/5.1') - LINK_TO_DONE(reference_class_do_initialization) - - YN_QUESTION_NODE(reference_dest_is_lval_non_const, `Is the destination an lvalue reference to a non-const type?', `[dcl.init.ref]/5.2', reference_dest_non_const_ill_formed, reference_dest_is_volatile) - - ILL_FORMED_NODE(reference_dest_non_const_ill_formed) - - YN_QUESTION_NODE(reference_dest_is_volatile, `Is the destination's referenced type volatile-qualified', `[dcl.init.ref]/5.2', reference_dest_volatile_ill_formed, reference_rval_conv_source_is_rvalue) - - ILL_FORMED_NODE(reference_dest_volatile_ill_formed) - - YN_QUESTION_NODE(reference_rval_conv_source_is_rvalue, `Is the initializer an rvalue?', `[dcl.init.ref]/5.3.1', reference_rval_conv_source_is_rvalue_bitfield, reference_rval_conv_source_is_function_lval) - - YN_QUESTION_NODE(reference_rval_conv_source_is_rvalue_bitfield, `Is the initializer a bit-field?', `[dcl.init.ref]/5.3.1', reference_rval_conv_source_is_function_lval, reference_rval_conv_source_rval_or_function_is_ref_compat) - - YN_QUESTION_NODE(reference_rval_conv_source_is_function_lval, `Is the initializer a function lvalue?', `[dcl.init.ref]/5.3.1', reference_rval_conv_source_rval_or_function_is_ref_compat, reference_rval_conv_source_is_class) - - YN_QUESTION_NODE(reference_rval_conv_source_rval_or_function_is_ref_compat, `Is cv1 T1 reference-compatible with cv2 T2?', `[dcl.init.ref]/5.3.1', reference_rval_conv_bind_direct, reference_rval_conv_source_is_class) - - YN_QUESTION_NODE(reference_rval_conv_source_is_class, `Is T2 a class type?', `[dcl.init.ref]/5.3.2', reference_rval_conv_source_class_is_ref_related, reference_temp_is_dest_class) - - YN_QUESTION_NODE(reference_rval_conv_source_class_is_ref_related, `Is T1 reference-related to T2?', `[dcl.init.ref]/5.3.2', reference_temp_is_dest_class, reference_rval_conv_source_class_convertible_target) - - YN_QUESTION_NODE(reference_rval_conv_source_class_convertible_target, `Is the initializer convertible to an rvalue or function lvalue of type \"cv3 T3\", where \"cv1 T1\" is reference-compatible with \"cv3 T3\"?', `[dcl.init.ref]/5.3.2', reference_rval_conv_bind_converted, reference_temp_is_dest_class) - - INSTRUCTION_NODE(reference_rval_conv_bind_direct, `The converted initializer is the value of the initializer.', `[dcl.init.ref]/5.3') - reference_rval_conv_bind_direct -> reference_rval_conv_is_converted_prval - - INSTRUCTION_NODE(reference_rval_conv_bind_converted, `The converted initializer is the result of the conversion.', `[dcl.init.ref]/5.3') - reference_rval_conv_bind_converted -> reference_rval_conv_is_converted_prval - - YN_QUESTION_NODE(reference_rval_conv_is_converted_prval, `Is the converted initializer a prvalue?', `[dcl.init.ref]/5.3', reference_rval_conv_prval_adjust_type, reference_rval_conv_bind_glval) - - INSTRUCTION_NODE(reference_rval_conv_prval_adjust_type, `Its type T4 is adjusted to \"cv1 T4\".', `[dcl.init.ref]/5.3') - reference_rval_conv_prval_adjust_type -> reference_rval_conv_prval_materialize - - INSTRUCTION_NODE(reference_rval_conv_prval_materialize, `The prvalue is materialized.', `[dcl.init.ref]/5.3') - reference_rval_conv_prval_materialize -> reference_rval_conv_bind_glval - - INSTRUCTION_NODE(reference_rval_conv_bind_glval, `The destination reference is bound to the resulting glvalue.', `[dcl.init.ref]/5.3') - LINK_TO_DONE(reference_rval_conv_bind_glval) - - YN_QUESTION_NODE(reference_temp_is_dest_class, `Is T1 a class type?', `[dcl.init.ref]/5.4.1', reference_temp_is_related, reference_temp_is_source_class) - - YN_QUESTION_NODE(reference_temp_is_source_class, `Is T2 a class type?', `[dcl.init.ref]/5.4.1', reference_temp_is_related, reference_temp_implicit_conv) - - YN_QUESTION_NODE(reference_temp_is_related, `Is T1 reference-related to T2?', `[dcl.init.ref]/5.4.1', reference_temp_implicit_conv, reference_temp_user_defined_conv) - - INSTRUCTION_NODE(reference_temp_user_defined_conv, `Consider user-defined conversions for the copy-initialization of an object of type \"cv1 T1\" by user-defined-conversion.', `[dcl.init.ref]/5.4.1') - reference_temp_user_defined_conv -> reference_temp_user_defined_conv_is_ill_formed - - YN_QUESTION_NODE(reference_temp_user_defined_conv_is_ill_formed, `Would the non-reference copy-initialization be ill-formed?', `[dcl.init.ref]/5.4.1', reference_temp_user_defined_conv_ill_formed, reference_temp_user_defined_conv_direct_initialize) - - ILL_FORMED_NODE(reference_temp_user_defined_conv_ill_formed) - - INSTRUCTION_NODE(reference_temp_user_defined_conv_direct_initialize, `The result of the call to the conversion function, as described by non-reference copy-initialization, is used to direct-initialize the reference. For the direct-initialization, user-defined conversions are not considered.', `[dcl.init.ref]/5.4.1') - LINK_TO_DONE(reference_temp_user_defined_conv_direct_initialize) - - INSTRUCTION_NODE(reference_temp_implicit_conv, `The initializer expression is implicitly converted to a prvalue of type \"cv1 T1\".', `[dcl.init.ref]/5.4.2') - reference_temp_implicit_conv -> reference_temp_implicit_conv_materialize - - INSTRUCTION_NODE(reference_temp_implicit_conv_materialize, `The temporary is materialized.', `[dcl.init.ref]/5.4.2') - reference_temp_implicit_conv_materialize -> reference_temp_implicit_conv_materialize_bind - - INSTRUCTION_NODE(reference_temp_implicit_conv_materialize_bind, `The reference is bound to the result.', `[dcl.init.ref]/5.4.2') - reference_temp_implicit_conv_materialize_bind -> reference_temp_implicit_conv_materialize_is_reference_related - - QUESTION_NODE(reference_temp_implicit_conv_materialize_is_reference_related, `Is T1 reference-related to T2?', `[dcl.init.ref]/5.4') - reference_temp_implicit_conv_materialize_is_reference_related -> reference_temp_implicit_conv_materialize_is_cv_okay [label="Yes"] - LINK_TO_DONE(reference_temp_implicit_conv_materialize_is_reference_related, [label="No"]) - - YN_QUESTION_NODE(reference_temp_implicit_conv_materialize_is_cv_okay, `Is cv1 at least as qualified as cv2?', `[dcl.init.ref]/5.4.3', reference_temp_implicit_conv_materialize_is_dest_rval, reference_temp_implicit_conv_materialize_cv_ill_formed) - - ILL_FORMED_NODE(reference_temp_implicit_conv_materialize_cv_ill_formed) - - QUESTION_NODE(reference_temp_implicit_conv_materialize_is_dest_rval, `Is the destination an rvalue reference?', `[dcl.init.ref]/5.4.3') - reference_temp_implicit_conv_materialize_is_dest_rval -> reference_temp_implicit_conv_materialize_is_source_lval [label="Yes"] - LINK_TO_DONE(reference_temp_implicit_conv_materialize_is_dest_rval, [label="No"]) - - QUESTION_NODE(reference_temp_implicit_conv_materialize_is_source_lval, `Is the initializer an lvalue?', `[dcl.init.ref]/5.4.4') - LINK_TO_ILL_FORMED(reference_temp_implicit_conv_materialize_is_source_lval, [label="Yes"]) - LINK_TO_DONE(reference_temp_implicit_conv_materialize_is_source_lval, [label="No"]) - } - - subgraph cluster_value_initialization { - INSTRUCTION_NODE(value_initialization_head, `Value-initialization', `[dcl.init]/8') - value_initialization_head -> value_is_class - - YN_QUESTION_NODE(value_is_class, `Is the type a class type?', `[dcl.init]/8.1', value_has_dflt_ctor, value_is_array) - - YN_QUESTION_NODE(value_has_dflt_ctor, `Does the type have a default constructor?', `[dcl.init]/8.1.1', value_has_deleted_dflt_ctor, value_default_initialize) - - YN_QUESTION_NODE(value_has_deleted_dflt_ctor, `Does the type have a deleted default constructor?', `[dcl.init]/8.1.1', value_default_initialize, value_has_user_dflt_ctor) - - YN_QUESTION_NODE(value_has_user_dflt_ctor, `Does the type have a user-provided default constructor?', `[dcl.init]/8.1.1', value_default_initialize, value_zero_initialize_class) - - INSTRUCTION_NODE(value_zero_initialize_class, `The object is zero-initialized.') - value_zero_initialize_class -> value_check_default - - YN_QUESTION_NODE(value_is_array, `Is the type an array type?', `[dcl.init]/8.2', value_value_initialize_elements, value_zero_initialize_fallback) - - INSTRUCTION_NODE(value_value_initialize_elements, `Each element is value-initialized.') - LINK_TO_DONE(value_value_initialize_elements) - - INSTRUCTION_NODE(value_zero_initialize_fallback, `The object is zero-initialized.') - LINK_TO_DONE(value_zero_initialize_fallback) - - INSTRUCTION_NODE(value_default_initialize, `The object is default-initialized.', `[dcl.init]/8.1.*') - LINK_TO_DONE(value_default_initialize) - - INSTRUCTION_NODE(value_check_default, `The semantic constraints for default-initialization are checked.', `[dcl.init]/8.1.2') - value_check_default -> value_has_nontrivial_dflt_ctor - - QUESTION_NODE(value_has_nontrivial_dflt_ctor, `Does the type have a non-trivial default constructor?', `[dcl.init]/8.1.2') - value_has_nontrivial_dflt_ctor -> value_default_initialize [label="Yes"] - LINK_TO_DONE(value_has_nontrivial_dflt_ctor, [label="No"]) - } - - subgraph list_initialization { - INSTRUCTION_NODE(list_initialization_head, `List-initialization', `[dcl.init.list]/3') - list_initialization_head -> list_has_designated_initializer - - YN_QUESTION_NODE(list_has_designated_initializer, `Does the braced-init-list contain a designated-initializer-list?', `[dcl.init.list]/3.1', list_designated_initalizer_is_aggregate, list_is_aggregate_class) - - YN_QUESTION_NODE(list_designated_initalizer_is_aggregate, `Is the type an aggregate class?', `[dcl.init.list]/3.1', list_designated_initializer_are_identifiers_valid, list_designated_initalizer_nonaggregate_ill_formed) - - ILL_FORMED_NODE(list_designated_initalizer_nonaggregate_ill_formed) - - YN_QUESTION_NODE(list_designated_initializer_are_identifiers_valid, `Do the designators form a subsequence of the ordered idenitifiers in the direct non-static data members of the type?', `[dcl.init.list]/3.1', list_designated_initializer_aggregate_init, list_designated_initalizer_initializers_ill_formed) - - ILL_FORMED_NODE(list_designated_initalizer_initializers_ill_formed) - - INSTRUCTION_NODE(list_designated_initializer_aggregate_init, `Aggregate initialization is performed.', `[dcl.init.list]/3.1') - list_designated_initializer_aggregate_init -> aggregate_initialization_head - - YN_QUESTION_NODE(list_is_aggregate_class, `Is the type an aggregate class?', `[dcl.init.list]/3.2', list_aggregate_is_list_singleton, list_is_type_char_array) - - YN_QUESTION_NODE(list_aggregate_is_list_singleton, `Does the initializer list have a single element?', `[dcl.init.list]/3.2', list_aggregate_singleton_is_type_valid, list_is_type_char_array) - - YN_QUESTION_NODE(list_aggregate_singleton_is_type_valid, `Does the sole element have type \"cv U\", where U is the initialized type or a type derived of it?', `[dcl.init.list]/3.2', list_aggregate_singleton_type_init_type, list_is_type_char_array) - - QUESTION_NODE(list_aggregate_singleton_type_init_type, `What is the type of initialization?', `[dcl.init.list]/3.2') - list_aggregate_singleton_type_init_type -> list_aggregate_singleton_type_copy [label="copy-list-initialization"] - list_aggregate_singleton_type_init_type -> list_aggregate_singleton_type_direct [label="direct-list-initialization"] - - INSTRUCTION_NODE(list_aggregate_singleton_type_copy, `The object is copy-initialized from the sole element.', `[dcl.init.list]/3.2') - LINK_TO_DONE(list_aggregate_singleton_type_copy) - - INSTRUCTION_NODE(list_aggregate_singleton_type_direct, `The object is direct-initialized from the sole element.', `[dcl.init.list]/3.2') - LINK_TO_DONE(list_aggregate_singleton_type_direct) - - YN_QUESTION_NODE(list_is_type_char_array, `Is the type a character array?', `[dcl.init.list]/3.3', list_char_array_is_singleton, list_is_aggregate) - - YN_QUESTION_NODE(list_char_array_is_singleton, `Does the initializer list have a single element?', `[dcl.init.list/]3.3', list_char_array_singleton_is_typed, list_is_aggregate) - - YN_QUESTION_NODE(list_char_array_singleton_is_typed, `Is that element an appropriately-typed string-literal?', `[dcl.init.list]/3.3', list_char_array_string_literal_init, list_is_aggregate) - - INSTRUCTION_NODE(list_char_array_string_literal_init, `Initialization as in [dcl.init.string]', `[dcl.init.list]/3.3') - list_char_array_string_literal_init -> string_literal_initialization_head - - YN_QUESTION_NODE(list_is_aggregate, `Is the type an aggregate?', `[dcl.init.list]/3.4', list_aggregate_aggregate_initialization, list_is_list_empty) - - INSTRUCTION_NODE(list_aggregate_aggregate_initialization, `Aggregate initialization is performed.', `[dcl.init.list]/3.4') - list_aggregate_aggregate_initialization -> aggregate_initialization_head - - YN_QUESTION_NODE(list_is_list_empty, `Is the initializer list empty?', `[dcl.init.list]/3.5', list_empty_is_class, list_dest_is_initializer_list) - - YN_QUESTION_NODE(list_empty_is_class, `Is the destination type a class type?', `[dcl.init.list]/3.5', list_empty_has_default_constructor, list_dest_is_initializer_list) - - YN_QUESTION_NODE(list_empty_has_default_constructor, `Does the class have a default constructor?', `[dcl.init.list]/3.5', list_empty_value_initialize, list_dest_is_initializer_list) - - INSTRUCTION_NODE(list_empty_value_initialize, `The object is value-initialized.', `[dcl.init.list]/3.5') - LINK_TO_DONE(list_empty_value_initialize) - - YN_QUESTION_NODE(list_dest_is_initializer_list, `Is the type a specialization of std::initializer_list?', `[dcl.init.list]/3.6', list_initializer_list_init, list_is_class) - - INSTRUCTION_NODE(list_initializer_list_init, `Initialized as follows:', `[dcl.init.list]/5') - list_initializer_list_init -> list_initializer_list_n_defn - - INSTRUCTION_NODE(list_initializer_list_n_defn, `Let N be the number of elements in the initalizer list.') - list_initializer_list_n_defn -> list_initializer_list_materialize_array - - INSTRUCTION_NODE(list_initializer_list_materialize_array, `Where type is std::initializer_list, a prvalue of type \"array of N const E\" is materialized.') - list_initializer_list_materialize_array -> list_initializer_list_init_array - - INSTRUCTION_NODE(list_initializer_list_init_array, `Each element of the array is copy-initialized with the corresponding element of the initializer list.') - list_initializer_list_init_array -> list_initializer_list_is_narrowing - - YN_QUESTION_NODE_NO_CITE(list_initializer_list_is_narrowing, `Is a narrowing conversion required to initialize any of the elements?', list_initializer_list_narrowing_ill_formed, list_initializer_list_init_object) - - ILL_FORMED_NODE(list_initializer_list_narrowing_ill_formed) - - INSTRUCTION_NODE(list_initializer_list_init_object, `The initializer_list is constructed to refer to the materialized array.') - LINK_TO_DONE(list_initializer_list_init_object) - - YN_QUESTION_NODE(list_is_class, `Is the type a class type?', `[dcl.init.list]/3.7', list_class_ctors, list_is_enum) - - INSTRUCTION_NODE(list_class_ctors, `Constructors are considered, and the best match is selected through overload resolution.', `[dcl.init.list]/3.7') - list_class_ctors -> list_class_is_narrowing - - QUESTION_NODE(list_class_is_narrowing, `Is a narrowing conversion required to convert any of the arguments?', `[dcl.init.list]/3.7') - LINK_TO_ILL_FORMED(list_class_is_narrowing, [label="Yes"]) - LINK_TO_DONE(list_class_is_narrowing, [label="No"]) - - YN_QUESTION_NODE(list_is_enum, `Is the type an enumeration?', `[dcl.init.list]/3.8', list_enum_is_fixed, list_final_is_singleton) - - YN_QUESTION_NODE(list_enum_is_fixed, `Does the enumeration have fixed underlying type?', `[dcl.init.list]/3.8', list_enum_underlying_defn, list_final_is_singleton) - - INSTRUCTION_NODE(list_enum_underlying_defn, `Let U be the underlying type.', `[dcl.init.list]/3.8') - list_enum_underlying_defn -> list_enum_is_singleton - - YN_QUESTION_NODE(list_enum_is_singleton, `Does the initializer list have a single element?', `[dcl.init.list]/3.8', list_enum_elem_defn, list_final_is_singleton) - - INSTRUCTION_NODE(list_enum_elem_defn, `Let v be that element.', `[dcl.init.list]/3.8') - list_enum_elem_defn -> list_enum_is_convertible - - YN_QUESTION_NODE(list_enum_is_convertible, `Can v be implicitly converted to U?', `[dcl.init.list]/3.8', list_enum_is_direct, list_final_is_singleton) - - YN_QUESTION_NODE(list_enum_is_direct, `Is the initialization direct-list-initialization?', `[dcl.init.list]/3.8', list_enum_is_narrowing, list_final_is_singleton) - - YN_QUESTION_NODE(list_enum_is_narrowing, `Is a narrowing conversion required to convert v to U?', `[dcl.init.list]/3.8', list_enum_narrowing_ill_formed, list_enum_initialization) - - INSTRUCTION_NODE(list_enum_initialization, `The object is initialized with the value T(u).') - LINK_TO_DONE(list_enum_initialization) - - ILL_FORMED_NODE(list_enum_narrowing_ill_formed) - - // Final just because I couldn't come up with a better name for it. "Final" as in "last". - - YN_QUESTION_NODE(list_final_is_singleton, `Does the initializer list have a single element?', `[dcl.init.list]/3.9', list_final_singleton_type_defn, list_ref_prvalue_is_ref) - - INSTRUCTION_NODE(list_final_singleton_type_defn, `Let E be the type of that element.', `[dcl.init.list]/3.9') - list_final_singleton_type_defn -> list_final_singleton_is_dest_ref - - YN_QUESTION_NODE(list_final_singleton_is_dest_ref, `Is the destination type a reference?', `[dcl.init.list]/3.9', list_final_singleton_is_dest_ref_related, list_final_singleton_type) - - YN_QUESTION_NODE(list_final_singleton_is_dest_ref_related, `Is the destination type's referenced type reference-related to E?', `[dcl.init.list]/3.9', list_final_singleton_type, list_ref_prvalue_is_ref) - - QUESTION_NODE(list_final_singleton_type, `What is the type of initialization?', `[dcl.init.list]/3.9') - list_final_singleton_type -> list_final_singleton_direct [label="direct-list-initialization"] - list_final_singleton_type -> list_final_singleton_copy [label="copy-list-initialization"] - - INSTRUCTION_NODE(list_final_singleton_direct, `The destination is initialized by direct-initialization from the element.', `[dcl.init.list]/3.9') - list_final_singleton_direct -> list_final_singleton_is_narrowing - - INSTRUCTION_NODE(list_final_singleton_copy, `The destination is initialized by copy-initialization from the element.', `[dcl.init.list]/3.9') - list_final_singleton_copy -> list_final_singleton_is_narrowing - - QUESTION_NODE(list_final_singleton_is_narrowing, `Is a narrowing conversion required to convert the element to the destination type?', `[dcl.init.list]/3.9') - LINK_TO_ILL_FORMED(list_final_singleton_is_narrowing, [label="Yes"]) - LINK_TO_DONE(list_final_singleton_is_narrowing, [label="No"]) - - YN_QUESTION_NODE(list_ref_prvalue_is_ref, `Is the destination type a reference type?', `[dcl.init.list]/3.10', list_ref_prvalue_prvalue_generated, list_final_is_empty) - - INSTRUCTION_NODE(list_ref_prvalue_prvalue_generated, `A prvalue is generated.', `[dcl.init.list]/3.10') - list_ref_prvalue_prvalue_generated -> list_ref_prvalue_type_is_unknown_bound - - YN_QUESTION_NODE(list_ref_prvalue_type_is_unknown_bound, `Is the destination type an array of unknown bound?', `[dcl.init.list]/3.10', list_ref_prvalue_type_unknown_bound, list_ref_prvalue_type_normal) - - INSTRUCTION_NODE(list_ref_prvalue_type_normal, `The type of the prvalue is the type referenced by the destination type.', `[dcl.init.list]/3.10') - list_ref_prvalue_type_normal -> list_ref_prvalue_init_prvalue - - INSTRUCTION_NODE(list_ref_prvalue_type_unknown_bound, `The type of the prvalue is the type of x in U x[] H, where H is the initializer list.', `[dcl.init.list]/3.10') - list_ref_prvalue_type_unknown_bound -> list_ref_prvalue_init_prvalue - - INSTRUCTION_NODE(list_ref_prvalue_init_prvalue, `The prvalue initializes a result object by copy-list-initialization.', `[dcl.init.list]/3.10') - list_ref_prvalue_init_prvalue -> list_ref_prvalue_init_ref - - INSTRUCTION_NODE(list_ref_prvalue_init_ref, `The reference is direct-initialized by the prvalue.', `[dcl.init.list]/3.10') - LINK_TO_DONE(list_ref_prvalue_init_ref) - - // Final, again, as in "last". - YN_QUESTION_NODE(list_final_is_empty, `Is the initializer list empty?', `[dcl.init.list]/3.11', list_final_empty_value_init, list_nothing_else_ill_formed) - - INSTRUCTION_NODE(list_final_empty_value_init, `The object is value-initialized.', `[dcl.init.list]/3.12') - LINK_TO_DONE(list_final_empty_value_init) - - ILL_FORMED_NODE(list_nothing_else_ill_formed) - - } - - subgraph cluster_aggregate_initialization { - INSTRUCTION_NODE(aggregate_initialization_head, `Aggregate initialization', `[dcl.init.aggr]') - aggregate_initialization_head -> aggregate_determine_elements - - INSTRUCTION_NODE(aggregate_determine_elements, `Determine the elements of the aggregate.', `[dcl.init.aggr]/2') - aggregate_determine_elements -> aggregate_elements_type - - QUESTION_NODE(aggregate_elements_type, `What is the type of the aggregate?', `[dcl.init.aggr]/2') - aggregate_elements_type -> aggregate_elements_array [label="an array type"] - aggregate_elements_type -> aggregate_elements_class [label="a class type"] - - INSTRUCTION_NODE(aggregate_elements_array, `The elements are the array elements in increasing subscript order.', `[dcl.init.aggr]/2.1') - aggregate_elements_array -> aggregate_determine_explicit_init_elems - - INSTRUCTION_NODE(aggregate_elements_class, `The elements are the direct base classes in declaration order, followed by the direct non-static data members that are not members of an anonymous union, in declaration order.', `[dcl.init.aggr]/2.2') - aggregate_elements_class -> aggregate_determine_explicit_init_elems - - INSTRUCTION_NODE(aggregate_determine_explicit_init_elems, `Determine the explicitly initialized elements', `[dcl.init.aggr]/3') - aggregate_determine_explicit_init_elems -> aggregate_explicit_is_designated - - YN_QUESTION_NODE(aggregate_explicit_is_designated, `Is the initializer list a designated-initializer-list?', `[dcl.init.aggr]/3.1', aggregate_explicit_desginated_is_class, aggregate_explicit_is_init_list) - - QUESTION_NODE(aggregate_explicit_desginated_is_class, `Is the aggregate of class type?', `[dcl.init.aggr]/3.1') - aggregate_explicit_desginated_is_class -> aggregate_explicit_designated_are_designators_valid [label="Yes"] - LINK_TO_ILL_FORMED(aggregate_explicit_desginated_is_class, [label="No"]) - - QUESTION_NODE(aggregate_explicit_designated_are_designators_valid, `Does each designator`''s identifier name a direct non-static data member of that class?, `[dcl.init.aggr]/3.1') - aggregate_explicit_designated_are_designators_valid -> aggregate_explicit_desginated [label="Yes"] - LINK_TO_ILL_FORMED(aggregate_explicit_designated_are_designators_valid, [label="No"]) - - INSTRUCTION_NODE(aggregate_explicit_desginated, `The explicitly initialized elements are those named by the designator'`''`s initializers '`(or those that contain the named elements)', `[dcl.init.aggr]/3.1') - aggregate_explicit_desginated -> aggregate_explicit_is_union - - YN_QUESTION_NODE(aggregate_explicit_is_init_list, `Is the initializer list an initializer-list' `(i.e. does it have at least one element)?', `[dcl.init.aggr]/3.2', aggregate_explicit_init_list, aggregate_explicit_empty) - - INSTRUCTION_NODE(aggregate_explicit_init_list, `The explicitly initialized elements are the first elements of the aggregate, matching the number in the initializer list.', `[dcl.init.aggr]/3.2') - aggregate_explicit_init_list -> aggregate_explicit_is_union - - YN_QUESTION_NODE(aggregate_explicit_is_union, `Is the aggregate a union?', `[dcl.init.aggr]/19', aggregate_explicit_list_union_is_excess_explicit_init, aggregate_initialize_explicit) - - QUESTION_NODE(aggregate_explicit_list_union_is_excess_explicit_init, `Is there more than one explicitly initialized element?', `[dcl.init.aggr]/19') - LINK_TO_ILL_FORMED(aggregate_explicit_list_union_is_excess_explicit_init, [label="Yes"]) - aggregate_explicit_list_union_is_excess_explicit_init -> aggregate_initialize_explicit [label="No"] - - INSTRUCTION_NODE(aggregate_explicit_empty, `The initializer list is \"{}\", and there are no explicitly initialized elements.', `[dcl.init.aggr]/3.3') - aggregate_explicit_empty -> aggregate_explicit_is_union - - INSTRUCTION_NODE(aggregate_initialize_explicit, `The explicitly initialized elements are initialized as follows:', `[dcl.init.aggr]/4') - aggregate_initialize_explicit -> aggregate_initialize_explicit_foreach - - INSTRUCTION_NODE(aggregate_initialize_explicit_foreach, `For each explicitly initialized element...', `[dcl.init.aggr]/4') - aggregate_initialize_explicit_foreach -> aggregate_initialize_explicit_is_anon_union - - YN_QUESTION_NODE(aggregate_initialize_explicit_is_anon_union, `Is the element an anonymous union object?', `[dcl.init.aggr]/4.1', aggregate_initialize_explicit_union_is_designated, aggregate_initialize_explicit_copy_kind) - - YN_QUESTION_NODE(aggregate_initialize_explicit_union_is_designated, `Is the initializer-list a designated-initializer-list?', `[dcl.init.aggr]/4.1', aggregate_initialize_explicit_union_is_duplicate_designator, aggregate_initialize_explicit_copy_kind) - - QUESTION_NODE(aggregate_initialize_explicit_union_is_duplicate_designator, `Is there more than one designator that names a member of that anonymous union?', `[dcl.init.aggr]/4.1') - LINK_TO_ILL_FORMED(aggregate_initialize_explicit_union_is_duplicate_designator, [label="Yes"]) - aggregate_initialize_explicit_union_is_duplicate_designator -> aggregate_initialize_explicit_union_init [label="No"] - - INSTRUCTION_NODE(aggregate_initialize_explicit_union_init, `The anonymous union object is initialized by { D }, where D is the designated-initializer-clause naming a member of the anonymous union object.') - aggregate_initialize_explicit_union_init -> aggregate_initialize_explicit_repeat_next - - QUESTION_NODE(aggregate_initialize_explicit_copy_kind, `What is the kind of brace initializer?', `[dcl.init.aggr]/4.2') - aggregate_initialize_explicit_copy_kind -> aggregate_initialize_explicit_copy_init_list [label="initializer-list"] - aggregate_initialize_explicit_copy_kind -> aggregate_initialize_explicit_copy_designated [label="designated-initializer-list"] - - INSTRUCTION_NODE(aggregate_initialize_explicit_copy_init_list, `The element is copy-initialized from the corresponding initializer-clause.', `[dcl.init.aggr]/4.2') - aggregate_initialize_explicit_copy_init_list -> aggregate_initialize_explicit_is_narrowing_checked - - INSTRUCTION_NODE(aggregate_initialize_explicit_copy_designated, `The element is initialized with the brace-or-equal initializer of the corresponding designated-initializer-clause.', `[dcl.init.aggr]/4.2') - aggregate_initialize_explicit_copy_designated -> aggregate_initialize_explicit_is_narrowing_checked - - YN_QUESTION_NODE(aggregate_initialize_explicit_is_narrowing_checked, `Is the initializer of the form \"assignment-expression\" or \"= assignment-expression\"?', `[dcl.init.aggr]/4.2', aggregate_initialize_explicit_is_narrowing, aggregate_initialize_explicit_repeat_next) - - QUESTION_NODE(aggregate_initialize_explicit_is_narrowing, `Is a narrowing conversion required to convert the expression?', `[dcl.init.aggr]/4.2') - LINK_TO_ILL_FORMED(aggregate_initialize_explicit_is_narrowing, [label="Yes"]) - aggregate_initialize_explicit_is_narrowing -> aggregate_initialize_explicit_repeat_next [label="No"] - - INSTRUCTION_NODE(aggregate_initialize_explicit_repeat_next, `Repeat with the next explicitly initialized element.') - aggregate_initialize_explicit_repeat_next -> aggregate_initialize_nonexplicit_is_union [label="Once done with all explicitly initialized elements"] - - YN_QUESTION_NODE(aggregate_initialize_nonexplicit_is_union, `Is the aggregate a union?', `[dcl.init.aggr]/5', aggregate_initialize_nonexplicit_union_is_list_empty, aggregate_initialize_nonexplicit_nonunion) - - INSTRUCTION_NODE(aggregate_initialize_nonexplicit_nonunion, `For each non-explicitly-initialized element:', `[dcl.init.aggr]/5') - aggregate_initialize_nonexplicit_nonunion -> aggregate_initialize_nonexplicit_nonunion_has_dflt_mem_init - - YN_QUESTION_NODE(aggregate_initialize_nonexplicit_nonunion_has_dflt_mem_init, `Does the element have a default member initializer?', `[dcl.init.aggr]/5.1', aggregate_initialize_nonexplicit_nonunion_dflt_mem_init, aggregate_initialize_nonexplicit_nonunion_is_reference) - - INSTRUCTION_NODE(aggregate_initialize_nonexplicit_nonunion_dflt_mem_init, `The element is initialized from that initializer.', `[dcl.init.aggr]/5.1') - aggregate_initialize_nonexplicit_nonunion_dflt_mem_init -> aggregate_initialize_nonexplicit_nonunion_repeat_next - - QUESTION_NODE(aggregate_initialize_nonexplicit_nonunion_is_reference, `Is the element a reference?', `[dcl.init.aggr]/5.2') - aggregate_initialize_nonexplicit_nonunion_is_reference -> aggregate_initialize_nonexplicit_nonunion_copy_init [label="No"] - LINK_TO_ILL_FORMED(aggregate_initialize_nonexplicit_nonunion_is_reference, [label="Yes"]) - - INSTRUCTION_NODE(aggregate_initialize_nonexplicit_nonunion_copy_init, `The element is copy-initialized from an empty initializer list.', `[dcl.init.aggr]/5.2') - aggregate_initialize_nonexplicit_nonunion_copy_init -> aggregate_initialize_nonexplicit_nonunion_repeat_next - - INSTRUCTION_NODE(aggregate_initialize_nonexplicit_nonunion_repeat_next, `Repeat with the next non-explicitly-initialized element.') - LINK_TO_DONE(aggregate_initialize_nonexplicit_nonunion_repeat_next, [label="Once done with all explicitly initialized elements"]) - - QUESTION_NODE(aggregate_initialize_nonexplicit_union_is_list_empty, `Is the initializer list empty?', `[dcl.init.aggr]/5') - aggregate_initialize_nonexplicit_union_is_list_empty -> aggregate_initialize_nonexplicit_union_empty_has_dflt [label="Yes"] - LINK_TO_DONE(aggregate_initialize_nonexplicit_union_is_list_empty, [label="No"]) - - YN_QUESTION_NODE(aggregate_initialize_nonexplicit_union_empty_has_dflt, `Does any variant member of the union have a default member initializer?', `[dcl.init.aggr]/5.4', aggregate_initialize_nonexplicit_union_dflt_mem, aggregate_initialize_nonexplicit_union_first_mem) - - INSTRUCTION_NODE(aggregate_initialize_nonexplicit_union_dflt_mem, `That member is initialized from its default member initializer.', `[dcl.init.aggr]/5.4') - LINK_TO_DONE(aggregate_initialize_nonexplicit_union_dflt_mem) - - INSTRUCTION_NODE(aggregate_initialize_nonexplicit_union_first_mem, `The first member of the union' `(if any)' `is copy-initialized from an empty initializer list.', `[dcl.init.aggr]/5.5') - LINK_TO_DONE(aggregate_initialize_nonexplicit_union_first_mem) - } -} diff --git a/cpp23/aggregate_init.dot.cpp b/cpp23/aggregate_init.dot.cpp deleted file mode 100644 index 8049d55..0000000 --- a/cpp23/aggregate_init.dot.cpp +++ /dev/null @@ -1,161 +0,0 @@ -#ifndef AGGREGATE_INIT_INCLUDED -#define AGGREGATE_INIT_INCLUDED - -#include "common.h" - -#define AGGREGATE_INIT_HEAD aggregate_initialization_head - -// [dcl.init.aggr] -subgraph cluster_aggregate_initialization { - // 2 - { - INSTRUCTION_NODE(AGGREGATE_INIT_HEAD, "Aggregate initialization", "[dcl.init.aggr]") - -> INSTRUCTION_NODE(aggregate_determine_elements, "Determine the elements of the aggregate.", "[dcl.init.aggr]/2") - -> aggregate_elements_type - - QUESTION_NODE(aggregate_elements_type, "What is the type of the aggregate?", "[dcl.init.aggr]/2") - aggregate_elements_type -> aggregate_elements_array [label="an array type"] - aggregate_elements_type -> aggregate_elements_class [label="a class type"] - - INSTRUCTION_NODE(aggregate_elements_array, "The elements are the array elements in increasing subscript order.", "[dcl.init.aggr]/2.1") - aggregate_elements_array -> aggregate_determine_explicit_init_elems - - INSTRUCTION_NODE(aggregate_elements_class, "The elements are the direct base classes in declaration order, followed by the direct non-static data members that are not members of an anonymous union, in declaration order.", "[dcl.init.aggr]/2.2") - aggregate_elements_class -> aggregate_determine_explicit_init_elems - } - - // 3 - { - INSTRUCTION_NODE(aggregate_determine_explicit_init_elems, "Determine the explicitly initialized elements", "[dcl.init.aggr]/3") - -> aggregate_explicit_is_designated - - // 3.1 - { - YN_QUESTION_NODE(aggregate_explicit_is_designated, "Is the initializer list a brace-enclosed designated-initializer-list?", "[dcl.init.aggr]/3.1", aggregate_explicit_desginated_is_class, aggregate_explicit_is_init_list) - - YN_QUESTION_NODE(aggregate_explicit_desginated_is_class, "Is the aggregate of class type?", "[dcl.init.aggr]/3.1", aggregate_explicit_designated_are_designators_valid, NEW_ILL_FORMED()) - YN_QUESTION_NODE(aggregate_explicit_designated_are_designators_valid, "Does each designator's identifier name a direct non-static data member of that class?", "[dcl.init.aggr]/3.1", aggregate_explicit_desginated, NEW_ILL_FORMED()) - - INSTRUCTION_NODE(aggregate_explicit_desginated, "The explicitly initialized elements are those named by the designator's initializers (or those that contain the named elements).", "[dcl.init.aggr]/3.1") - -> aggregate_explicit_is_union - } - - // 3.2 - { - YN_QUESTION_NODE(aggregate_explicit_is_init_list, "Is the initializer list a brace-enclosed initializer-list?", "[dcl.init.aggr]/3.2", aggregate_explicit_init_list_defn_n, aggregate_explicit_empty) - - INSTRUCTION_NODE(aggregate_explicit_init_list_defn_n, "Let n be the number of elements in the initializer list.", "[dcl.init.aggr]/3.2") - -> INSTRUCTION_NODE(aggregate_explicit_init_list, "The explicitly initialized elements are the first n elements of the aggregate.", "[dcl.init.aggr]/3.2") - -> aggregate_explicit_is_union - } - - // 3.3 - { - INSTRUCTION_NODE(aggregate_explicit_empty, "The initializer list is \"{}\", and there are no explicitly initialized elements.", "[dcl.init.aggr]/3.3") - -> aggregate_explicit_is_union - } - } - - // 20 - { - YN_QUESTION_NODE(aggregate_explicit_is_union, "Is the aggregate a union?", "[dcl.init.aggr]/20", aggregate_explicit_list_union_is_excess_explicit_init, aggregate_initialize_explicit) - YN_QUESTION_NODE(aggregate_explicit_list_union_is_excess_explicit_init, "Is there more than one explicitly initialized element?", "[dcl.init.aggr]/20", NEW_ILL_FORMED(), aggregate_initialize_explicit) - } - - // 4 - { - INSTRUCTION_NODE(aggregate_initialize_explicit, "The explicitly initialized elements are initialized as follows:", "[dcl.init.aggr]/4") - -> INSTRUCTION_NODE(aggregate_initialize_explicit_foreach, "For each explicitly initialized element...", "[dcl.init.aggr]/4") - -> aggregate_initialize_explicit_is_anon_union - - // 4.1 - { - YN_QUESTION_NODE(aggregate_initialize_explicit_is_anon_union, "Is the element an anonymous union member?", "[dcl.init.aggr]/4.1", aggregate_initialize_explicit_union_is_designated, aggregate_initialize_explicit_copy_kind) - YN_QUESTION_NODE(aggregate_initialize_explicit_union_is_designated, "Is the initializer list a brace-enclosed designated-iniitializer-list?", "[dcl.init.aggr]/4.1", aggregate_initialize_explicit_union_is_duplicate_designator, aggregate_initialize_explicit_copy_kind) - - YN_QUESTION_NODE(aggregate_initialize_explicit_union_is_duplicate_designator, "Is there more than one designator that names a member of that anonymous union member?", "[dcl.init.aggr]/4.1", NEW_ILL_FORMED(), aggregate_initialization_explicit_union_defn_d) - - INSTRUCTION_NODE(aggregate_initialization_explicit_union_defn_d, "Let D be the designated-initializer-clause naming a member of the anonymous union member.", "[dcl.init.aggr]/4.1") - -> INSTRUCTION_NODE(aggregate_initialize_explicit_union_init, "Initialize the element with the braced-init-list { D }.") - -> NEW_RECURSE_SUBOBJECT() - -> aggregate_initialize_explicit_repeat_next - } - - // 4.2 - { - QUESTION_NODE(aggregate_initialize_explicit_copy_kind, "What is the kind of brace initializer?", "[dcl.init.aggr]/4.2") - aggregate_initialize_explicit_copy_kind -> aggregate_initialize_explicit_copy_init_list [label="initializer-list"] - aggregate_initialize_explicit_copy_kind -> aggregate_initialize_explicit_copy_designated [label="designated-initializer-list"] - - INSTRUCTION_NODE(aggregate_initialize_explicit_copy_init_list, "Copy-initialize the element from the corresponding initializer-clause.", "[dcl.init.aggr]/4.2") - -> NEW_RECURSE_SUBOBJECT() - -> aggregate_initialize_explicit_is_narrowing_checked_no_eq - - INSTRUCTION_NODE(aggregate_initialize_explicit_copy_designated, "Initialize the element with the brace-or-equal-initializer of the corresponding designated-initializer-clause.", "[dcl.init.aggr]/4.2") - -> NEW_RECURSE_SUBOBJECT() - -> aggregate_initialize_explicit_is_narrowing_checked_no_eq - - YN_QUESTION_NODE(aggregate_initialize_explicit_is_narrowing_checked_no_eq, "Is that initializer of the form \"assignment-expression\"?", "[dcl.init.aggr]/4.2", aggregate_initialize_explicit_is_narrowing, aggregate_initialize_explicit_is_narrowing_checked_eq) - YN_QUESTION_NODE(aggregate_initialize_explicit_is_narrowing_checked_eq, "Is that initializer of the form \"= assignment-expression\"?", "[dcl.init.aggr]/4.2", aggregate_initialize_explicit_is_narrowing, aggregate_initialize_explicit_repeat_next) - YN_QUESTION_NODE(aggregate_initialize_explicit_is_narrowing, "Is a narrowing conversion required to convert the expression?", "[dcl.init.aggr]/4.2", NEW_ILL_FORMED(), aggregate_initialize_explicit_repeat_next) - } - - INSTRUCTION_NODE(aggregate_initialize_explicit_repeat_next, "Repeat with the next explicitly initialized element.") - -> aggregate_initialize_nonexplicit_is_union [label="Once done with all explicitly initialized elements"] - - LOOP_BACKEDGE(aggregate_initialize_explicit_repeat_next, aggregate_initialize_explicit_foreach) - } - - // 5 - { - YN_QUESTION_NODE(aggregate_initialize_nonexplicit_is_union, "Is the aggregate a union?", "[dcl.init.aggr]/5", aggregate_initialize_nonexplicit_union_is_list_empty, aggregate_initialize_nonexplicit_nonunion) - - INSTRUCTION_NODE(aggregate_initialize_nonexplicit_nonunion, "For each non-explicitly-initialized element:", "[dcl.init.aggr]/5") - aggregate_initialize_nonexplicit_nonunion -> aggregate_initialize_nonexplicit_nonunion_has_dflt_mem_init - - // 5.1 - { - YN_QUESTION_NODE(aggregate_initialize_nonexplicit_nonunion_has_dflt_mem_init, "Does the element have a default member initializer?", "[dcl.init.aggr]/5.1", aggregate_initialize_nonexplicit_nonunion_dflt_mem_init, aggregate_initialize_nonexplicit_nonunion_is_reference) - - INSTRUCTION_NODE(aggregate_initialize_nonexplicit_nonunion_dflt_mem_init, "The element is initialized from that initializer.", "[dcl.init.aggr]/5.1") - -> NEW_RECURSE_SUBOBJECT() - -> aggregate_initialize_nonexplicit_nonunion_repeat_next - } - - // 5.2 - { - YN_QUESTION_NODE(aggregate_initialize_nonexplicit_nonunion_is_reference, "Is the element a reference?", "[dcl.init.aggr]/5.2", NEW_ILL_FORMED(), aggregate_initialize_nonexplicit_nonunion_copy_init) - - INSTRUCTION_NODE(aggregate_initialize_nonexplicit_nonunion_copy_init, "The element is copy-initialized from an empty initializer list.", "[dcl.init.aggr]/5.2") - -> NEW_RECURSE_SUBOBJECT() - -> aggregate_initialize_nonexplicit_nonunion_repeat_next - } - - INSTRUCTION_NODE(aggregate_initialize_nonexplicit_nonunion_repeat_next, "Repeat with the next non-explicitly-initialized element.") - -> NEW_DONE() [label="Once done with all explicitly initialized elements"] - - LOOP_BACKEDGE(aggregate_initialize_nonexplicit_nonunion_repeat_next, aggregate_initialize_nonexplicit_nonunion) - - QUESTION_NODE(aggregate_initialize_nonexplicit_union_is_list_empty, "Is the initializer list empty?", "[dcl.init.aggr]/5") - aggregate_initialize_nonexplicit_union_is_list_empty -> aggregate_initialize_nonexplicit_union_empty_has_dflt [label="Yes"] - LINK_TO_DONE(aggregate_initialize_nonexplicit_union_is_list_empty, [label="No"]) - - // 5.3 - { - YN_QUESTION_NODE(aggregate_initialize_nonexplicit_union_empty_has_dflt, "Does any variant member of the union have a default member initializer?", "[dcl.init.aggr]/5.4", aggregate_initialize_nonexplicit_union_dflt_mem, aggregate_initialize_nonexplicit_union_first_mem) - - INSTRUCTION_NODE(aggregate_initialize_nonexplicit_union_dflt_mem, "That member is initialized from its default member initializer.", "[dcl.init.aggr]/5.4") - -> NEW_RECURSE_SUBOBJECT() - -> NEW_DONE() - } - - // 5.4 - { - INSTRUCTION_NODE(aggregate_initialize_nonexplicit_union_first_mem, "The first member of the union (if any) is copy-initialized from an empty initializer list.", "[dcl.init.aggr]/5.5") - -> NEW_RECURSE_SUBOBJECT() - -> NEW_DONE() - } - } -} - -#endif diff --git a/cpp23/build.sh b/cpp23/build.sh deleted file mode 100755 index bffcb81..0000000 --- a/cpp23/build.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env bash - -set -eu -o pipefail - -cd_source_dir() { - cd -- "$(dirname -- "${BASH_SOURCE[0]}")" > /dev/null 2>&1 -} - -(cd_source_dir; cat flowchart.dot.cpp | gcc -E - | ./wrap.perl 70 | dot -Tsvg) > "$1" -(cd_source_dir; cat flowchart.dot.cpp | gcc -E - | ./wrap.perl 70 | dot -Tpng) > "$2" diff --git a/cpp23/common.h b/cpp23/common.h deleted file mode 100644 index 2ebb2a7..0000000 --- a/cpp23/common.h +++ /dev/null @@ -1,46 +0,0 @@ -#define TOKEN_CAT_(X, Y) X##Y -#define TOKEN_CAT(X, Y) TOKEN_CAT_(X, Y) - -#define COLOR_GREEN "#008000" - -#define DONE_NODE(id) { id [label="Done.", style=filled, fillcolor=COLOR_GREEN, shape=box, color=COLOR_GREEN, fontcolor=white]; } -#define ILL_FORMED_NODE(id) { id [label="The program is ill-formed.", shape=box, style=filled, color=red, fontcolor=white]; } -#define RECURSE_SUBOBJECT_NODE(id) { id [label="Partially recurse.", shape=box, style=filled, color=lightblue, fontcolor=black]} -#define RECURSE_NODE(id) { id [label="Recurse.", shape=box, style=filled, color=blue, fontcolor=white]} -#define YES_NODE(id, text) { id [label=text, shape=box, color=COLOR_GREEN, fontcolor=black]; } -#define NO_NODE(id, text) { id [label=text, shape=box, color=red, fontcolor=black]; } - -#define NEW_DONE() { DONE_NODE(TOKEN_CAT(__local_done_, __COUNTER__)); } -#define NEW_ILL_FORMED() { ILL_FORMED_NODE(TOKEN_CAT(__local_ill_formed_, __COUNTER__)); } -#define NEW_RECURSE() { RECURSE_NODE(TOKEN_CAT(__local_recurse, __COUNTER__)); } -#define NEW_RECURSE_SUBOBJECT() { RECURSE_SUBOBJECT_NODE(TOKEN_CAT(__local_recurse_subobject, __COUNTER__)); } -#define NEW_YES(label) { YES_NODE(TOKEN_CAT(__local_yes_, __COUNTER__), label); } -#define NEW_NO(label) { NO_NODE(TOKEN_CAT(__local_no_, __COUNTER__), label); } - -#define INTERNALLY_RECURSES_SUBOBJECT(id) { id -> { RECURSE_SUBOBJECT_NODE(TOKEN_CAT(id, __recurse)); } [style="dotted"]; } - -// Arguments: name of source node, optional edge attrs. -#define LINK_TO_DONE(id, ...) { id -> { DONE_NODE(TOKEN_CAT(id, __generated_done)); } __VA_ARGS__; } -#define LINK_TO_ILL_FORMED(id, ...) { id -> { ILL_FORMED_NODE(TOKEN_CAT(id, __generated_ill_formed)); } __VA_ARGS__; } - -// Arguments: name, description (string literal), optional citation. -#define QUESTION_NODE(id, text, ...) { id [shape=diamond, label=text __VA_OPT__(+ "\n" +) __VA_ARGS__]; } -#define INSTRUCTION_NODE(id, text, ...) { id [shape=box, label=text __VA_OPT__(+ "\n" +) __VA_ARGS__]; } - -// Arguments: name, description (string literal), citation (string literal), yes node ID, no node ID. -#define YN_QUESTION_NODE(id, text, cite, yes_id, no_id) { \ - QUESTION_NODE(id, text, cite); \ - id -> yes_id [label="Yes"]; \ - id -> no_id [label="No"]; \ -} - -// Arguments: name, description (string literal), citation (string literal), yes node ID, no node ID. -#define YN_QUESTION_NODE_NO_CITE(id, text, yes_id, no_id) { \ - QUESTION_NODE(id, text); \ - id -> yes_id [label="Yes"]; \ - id -> no_id [label="No"]; \ -} - -#define INIT_AS_FOLLOWS(id, ...) { INSTRUCTION_NODE(id, "Initialize the object as follows:", __VA_ARGS__); } - -#define LOOP_BACKEDGE(source, loop_header) { source -> loop_header [style="dashed"]; } diff --git a/cpp23/default_init.dot.cpp b/cpp23/default_init.dot.cpp deleted file mode 100644 index bf8d98c..0000000 --- a/cpp23/default_init.dot.cpp +++ /dev/null @@ -1,133 +0,0 @@ -#ifndef DEFAULT_INIT_INCLUDED -#define DEFAULT_INIT_INCLUDED - -#include "common.h" - -#define NODE_DEFAULT_INIT_HEAD default_initialization_head - -#define DEFAULT_INIT_BACKREF(source) { { source; } -> NODE_DEFAULT_INIT_HEAD [style="dotted"] } -#define INTERNALLY_DEFAULT_INITS(id) { id -> NODE_DEFAULT_INIT_HEAD [style="dotted"]; } - -#define NEW_IS_CDC() NEW_YES("T is const-default-constructible.") -#define NEW_NOT_CDC() NEW_NO("T is not const-default-constructible.") - -#define REFERENCES_CDC(node) { node -> cdc_head [style="dotted"]; } - -// Forward declare to avoid cdc_head being in cluster_default_initialization. -subgraph cluster_is_const_default_constructible { - cdc_head -} - -// [dcl.init.general]/7 -subgraph cluster_default_initialization { - INSTRUCTION_NODE(NODE_DEFAULT_INIT_HEAD, "Default-initialization", "[dcl.init.general]/7") - -> default_is_reference - - // 10 - { - YN_QUESTION_NODE(default_is_reference, "Is the destination a reference?", "[dcl.init.general]/10", NEW_ILL_FORMED(), default_defn_t) - } - - INSTRUCTION_NODE(default_defn_t, "Let the type of the object be T.", "[dcl.init.general]/7") - -> default_is_const - - // 8 - { - YN_QUESTION_NODE(default_is_const, "Is T const-qualified?", "[dcl.init.general]/8", default_const_is_class, default_is_class) - - YN_QUESTION_NODE(default_const_is_class, "Is T a class type?", "[dcl.init.general]/8", default_const_class_is_cdc, default_const_is_array) - YN_QUESTION_NODE(default_const_class_is_cdc, "Is T const-default-constructible", "[dcl.init.general]/8", default_is_class, NEW_ILL_FORMED()) - REFERENCES_CDC(default_const_class_is_cdc) - - YN_QUESTION_NODE(default_const_is_array, "Is T an array type?", "[dcl.init.general]/8", default_const_array_element_is_class, NEW_ILL_FORMED()) - YN_QUESTION_NODE(default_const_array_element_is_class, "Is T's element type a class type?", "[dcl.init.general]/8", default_const_array_element_class_is_cdc, NEW_ILL_FORMED()) - YN_QUESTION_NODE(default_const_array_element_class_is_cdc, "Is that class type const-default-constructible?", "[dcl.init.general]/8", default_is_class, NEW_ILL_FORMED()) - REFERENCES_CDC(default_const_array_element_class_is_cdc) - } - - // 7.1 - { - YN_QUESTION_NODE(default_is_class, "Is T a (possibly cv-qualified) class type?", "[dcl.init.general]/7.1", default_class_enumerate, default_is_array) - - INSTRUCTION_NODE(default_class_enumerate, "Enumerate the applicable constructors.", "[dcl.init.general]/7.1") - -> INSTRUCTION_NODE(default_class_select, "Select the best constructor for the initializer \"()\".", "[dcl.init.general]/7.1") - -> INSTRUCTION_NODE(default_class_init, "Call the selected constructor with an empty argument list to initialize the object", "[dcl.init.general]/7.1") - -> NEW_DONE() - } - - // 7.2 - { - YN_QUESTION_NODE(default_is_array, "Is T an array type?", "[dcl.init.general]/7.2", default_array_init, default_no_init) - - INSTRUCTION_NODE(default_array_init, "Default-initialize each element of the array.", "[dcl.init.general]/7.2") - -> NEW_DONE() - - DEFAULT_INIT_BACKREF(default_array_init) - } - - // 7.3 - { - INSTRUCTION_NODE(default_no_init, "No initialization is performed.", "[dcl.init.general]/7.3") - -> NEW_DONE() - } -} - -// [dcl.init.general]/8 -subgraph cluster_is_const_default_constructible { - INSTRUCTION_NODE(cdc_head, "To determine if class type T is const-default-constructible:", "[dcl.init.general/8]") - -> cdc_would_invoke_user_provided - - YN_QUESTION_NODE(cdc_would_invoke_user_provided, "Would default-initialization of T invoke a user-provided constructor of T (not inherited from a base class)?", "[dcl.init.general/8]", NEW_IS_CDC(), cdc_base_is_cdc) - - // 8.4 - YN_QUESTION_NODE(cdc_base_is_cdc, "Is each potentially constructed base class of T const-default-constructible?", "[dcl.init.general]/8.4", cdc_member_each, NEW_NOT_CDC()) - - // 8.1 - { - INSTRUCTION_NODE(cdc_member_each, "For each direct non-variant non-static data member M of T:", "[dcl.init.general]/8.1") - -> cdc_member_has_default - - YN_QUESTION_NODE_NO_CITE(cdc_member_has_default, "Does M have a default member initializer?", cdc_member_repeat, cdc_member_is_class) - - YN_QUESTION_NODE_NO_CITE(cdc_member_is_class, "Does M have class type?", cdc_member_class_defn_x, cdc_member_is_array_of_class) - YN_QUESTION_NODE_NO_CITE(cdc_member_is_array_of_class, "Does M have array of class type?", cdc_member_array_defn_x, NEW_NOT_CDC()) - - INSTRUCTION_NODE(cdc_member_class_defn_x, "Let X be that class type.") - -> cdc_member_x_is_cdc - - INSTRUCTION_NODE(cdc_member_array_defn_x, "Let X be the element (class) type.") - -> cdc_member_x_is_cdc - - YN_QUESTION_NODE_NO_CITE(cdc_member_x_is_cdc, "Is X const-default-constructible?", cdc_member_repeat, NEW_NOT_CDC()) - REFERENCES_CDC(cdc_member_x_is_cdc) - - INSTRUCTION_NODE(cdc_member_repeat, "Repeat with the next non-static data member.") - -> cdc_is_union [label="Once done with all non-static data members"] - - LOOP_BACKEDGE(cdc_member_repeat, cdc_member_each) - } - - YN_QUESTION_NODE(cdc_is_union, "Is T a union?", "[dcl.init.general]/8.2-3", cdc_union_has_nsdm, cdc_nonunion_anon_union_each) - - // 8.2 - { - YN_QUESTION_NODE(cdc_union_has_nsdm, "Does T have at least one non-static data member?", "[dcl.init.general]/8.2", cdc_union_has_one_init_nsdm, NEW_IS_CDC()) - YN_QUESTION_NODE(cdc_union_has_one_init_nsdm, "Does exactly one variant member of T have a default member initializer?", "[dcl.init.general]/8.2", NEW_IS_CDC(), NEW_NOT_CDC()) - } - - // 8.3 - { - INSTRUCTION_NODE(cdc_nonunion_anon_union_each, "For each anonymous union member of T:", "[dcl.init.general]/8.3") - -> cdc_nonunion_anon_union_has_nsdm - - YN_QUESTION_NODE_NO_CITE(cdc_nonunion_anon_union_has_nsdm, "Does that anonymous union member have at least one non-static data member?", cdc_nonunion_anon_union_one_init_nsdm, cdc_nonunion_anon_union_repeat) - YN_QUESTION_NODE_NO_CITE(cdc_nonunion_anon_union_one_init_nsdm, "Does exactly one non-static data member of that anonymous union member have a default member initializer?", cdc_nonunion_anon_union_repeat, NEW_NOT_CDC()) - - INSTRUCTION_NODE(cdc_nonunion_anon_union_repeat, "Repeat with the next anonymous data member.") - -> NEW_IS_CDC() [label="Once done with all anonymous union members"] - - LOOP_BACKEDGE(cdc_nonunion_anon_union_repeat, cdc_nonunion_anon_union_each) - } -} - -#endif diff --git a/cpp23/flowchart.dot.cpp b/cpp23/flowchart.dot.cpp deleted file mode 100644 index 1be9736..0000000 --- a/cpp23/flowchart.dot.cpp +++ /dev/null @@ -1,169 +0,0 @@ -#include "common.h" - -digraph initialization { - compound="true"; - - #include "default_init.dot.cpp" - #include "zero_init.dot.cpp" - #include "value_init.dot.cpp" - #include "string_init.dot.cpp" - #include "reference_init.dot.cpp" - #include "list_init.dot.cpp" - - start [label="So you want to initialize something?\nN4950 [dcl.init.general]/16\nCopyright Janet Cobb 2025, Licensed CC BY 4.0", style=filled, fillcolor=COLOR_GREEN, shape=box, color=COLOR_GREEN, fontcolor=white] - start -> is_direct_braced_init_list - - YN_QUESTION_NODE(is_direct_braced_init_list, "Is the initializer a non-parenthesized braced-init-list?", "[dcl.init.general]/16.1", list_initialization_head, is_copy_braced_init_list) - YN_QUESTION_NODE(is_copy_braced_init_list, "Is the initializer of the form \"= braced-init-list\"?", "[dcl.init.general]/16.1", list_initialization_head, is_dest_reference) - - YN_QUESTION_NODE(is_dest_reference, "Is the destination type a reference type?", "[dcl.init.general]/16.2", reference_initialization_head, is_char_arr_init_char:n) - - YN_QUESTION_NODE(is_char_arr_init_char, "Is the destination type an array of char?", "[dcl.init.general]/16.3", is_char_arr_literal_init, is_char_arr_init_uchar) - YN_QUESTION_NODE(is_char_arr_init_uchar, "Is the destination type an array of unsigned char?", "[dcl.init.general]/16.3", is_char_arr_literal_init, is_char_arr_init_schar) - YN_QUESTION_NODE(is_char_arr_init_schar, "Is the destination type an array of signed char?", "[dcl.init.general]/16.3", is_char_arr_literal_init, is_char_arr_init_char8) - YN_QUESTION_NODE(is_char_arr_init_char8, "Is the destination type an array of char8_t?", "[dcl.init.general]/16.3", is_char_arr_literal_init, is_char_arr_init_char16) - YN_QUESTION_NODE(is_char_arr_init_char16, "Is the destination type an array of char16_t?", "[dcl.init.general]/16.3", is_char_arr_literal_init, is_char_arr_init_char32) - YN_QUESTION_NODE(is_char_arr_init_char32, "Is the destination type an array of char32_t?", "[dcl.init.general]/16.3", is_char_arr_literal_init, is_char_arr_init_wchar) - YN_QUESTION_NODE(is_char_arr_init_wchar, "Is the destination type an array of wchar_t?", "[dcl.init.general]/16.3", is_char_arr_literal_init, is_initializer_empty_parens) - - YN_QUESTION_NODE(is_char_arr_literal_init, "Is the initializer a string literal?", "[dcl.init.general]/16.3", STRING_LITERAL_INIT_HEAD, is_initializer_empty_parens) - - YN_QUESTION_NODE(is_initializer_empty_parens, "Is the initializer \"()\"?", "[dcl.init.general]/16.4", empty_parens_value_init, is_dest_array) - INST_VALUE_INIT(empty_parens_value_init, "[dcl.init/16.3]") - - YN_QUESTION_NODE(is_dest_array, "Is the destination type an array?", "[dcl.init.general]/16.5", array_initialization_head, is_dest_class_type) - - subgraph array_initialization { - INIT_AS_FOLLOWS(array_initialization_head, "[dcl.init.general]/16.5") - array_initialization_head -> array_is_paren_expr_list - - YN_QUESTION_NODE(array_is_paren_expr_list, "Is the initializer of the form \"( expression-list )\"?", "CWG2824 resolution", array_x_definition, NEW_ILL_FORMED()) - - INSTRUCTION_NODE(array_x_definition, "Let x_1, ..., x_k be the elements of the expression-list.") - array_x_definition -> array_is_dest_unknown - - YN_QUESTION_NODE_NO_CITE(array_is_dest_unknown, "Is the destination type an array of unknown bound?", array_unknown_dest, array_n_definition) - - INSTRUCTION_NODE(array_unknown_dest, "The destination type is defined as having k elements.") - -> array_n_definition - - INSTRUCTION_NODE(array_n_definition, "Let n be the size of the array (after adjustment).") - array_n_definition -> array_is_k_gt_n - - YN_QUESTION_NODE_NO_CITE(array_is_k_gt_n, "Is k > n?", NEW_ILL_FORMED(), array_copy_init_k) - - INSTRUCTION_NODE(array_copy_init_k, "For each 1 <= i <= k, copy-initialize the i-th array element with x_i.") - -> INSTRUCTION_NODE(array_value_init_n, "For each k < i <= n, value-initialize the i-th array element.") - -> NEW_DONE() - - INTERNALLY_RECURSES_SUBOBJECT(array_copy_init_k) - INTERNALLY_VALUE_INITS(array_value_init_n) - } - - YN_QUESTION_NODE(is_dest_class_type, "Is the destination type a (possibly cv-qualified) class type?", "[dcl.init.general]/16.6", class_dest_initialization_head, is_source_class_type) - - YN_QUESTION_NODE(is_source_class_type, "Is the source type a (possibly cv-qualified) class type?", "[dcl.init.general]/16.7", class_source_initialization_head, is_direct_init_for_nullptr) - - YN_QUESTION_NODE(is_direct_init_for_nullptr, "Is the initialization direct-initialization?", "[dcl.init.general]/16.8", is_source_type_nullptr, standard_conv_seq_initialization_head) - - YN_QUESTION_NODE(is_source_type_nullptr, "Is the source type std::nullptr_t?", "[dcl.init.general]/16.8", is_dest_type_bool_for_nullptr, standard_conv_seq_initialization_head) - - YN_QUESTION_NODE(is_dest_type_bool_for_nullptr, "Is the destination type bool?", "[dcl.init.general]/16.8", nullptr_to_bool_init, standard_conv_seq_initialization_head) - - INSTRUCTION_NODE(nullptr_to_bool_init, "Initialize the bool to false.", "[dcl.init.general]/16.8") - -> NEW_DONE() - - subgraph class_dest_initialization { - INIT_AS_FOLLOWS(class_dest_initialization_head, "[dcl.init.general]/16.6") - -> class_is_initializer_prvalue - - YN_QUESTION_NODE(class_is_initializer_prvalue, "Is the initializer a prvalue?", "[dcl.init.general]/16.6.1", class_is_initializer_prvalue_same_class, class_is_copy_init) - - YN_QUESTION_NODE(class_is_initializer_prvalue_same_class, "Is the cv-unqualified version of the source type the same class as the class of the destination?", "[dcl.init.general]/16.6.1", class_initialize_by_prvalue, class_is_copy_init) - - INSTRUCTION_NODE(class_initialize_by_prvalue, "Use the prvalue to initialize the destination object.", "[dcl.init.general]/16.6.1") - -> NEW_DONE() - - YN_QUESTION_NODE(class_is_copy_init, "Is the initialization copy-initialization?", "[dcl.init.general]/16.6.2", class_is_copy_init_same_class, class_is_direct_init) - - YN_QUESTION_NODE(class_is_copy_init_same_class, "Is the cv-unqualified version of the source type the same class as the class of the destination?", "[dcl.init.general]/16.6.2", class_consider_constructors, class_is_copy_init_derived_class) - YN_QUESTION_NODE(class_is_copy_init_derived_class, "Is the cv-unqualified version of the source type a derived class of the class of the destination?", "[dcl.init.general]/16.6.2", class_consider_constructors, class_user_defined_conv_head) - - INSTRUCTION_NODE(class_is_direct_init, "The initialization is direct-initialization.", "[dcl.init.general]/16.6.2") - class_is_direct_init -> class_consider_constructors - - INSTRUCTION_NODE(class_consider_constructors, "Enumerate applicable constructors and select the best through overload resolution.", "[dcl.init.general]/16.6.2") - class_consider_constructors -> class_constructors_is_resolution_successful - - YN_QUESTION_NODE(class_constructors_is_resolution_successful, "Is overload resolution succesful?", "[dcl.init.general]/16.6.2.1", class_constructors_use_selected, class_is_constructor_viable) - - INSTRUCTION_NODE(class_constructors_use_selected, "Call the selected constructor to initialize the object with the initializer expression or expression-list as its argument(s).", "[dcl.init.general]/16.6.2.1") - -> NEW_DONE() - - YN_QUESTION_NODE(class_is_constructor_viable, "Is a constructor viable?", "[dcl.init.general]/16.6.2.2", NEW_ILL_FORMED(), class_is_aggregate) - YN_QUESTION_NODE(class_is_aggregate, "Is the destination type an aggregate class?", "[dcl.init.general]/16.6.2.2", class_aggregate_is_initializer_expr_list, NEW_ILL_FORMED()) - YN_QUESTION_NODE(class_aggregate_is_initializer_expr_list, "Is the initializer a parenthesized expression-list?", "[dcl.init.general]/16.6.2.2", class_aggregate_paren_init_head, NEW_ILL_FORMED()) - - subgraph class_aggregate_paren_init { - INIT_AS_FOLLOWS(class_aggregate_paren_init_head, "[dcl.init.general]/16.6.2.2") - -> INSTRUCTION_NODE(class_aggregate_paren_e_defn, "Let e_1, ..., e_k be the elements of the aggregate.") - -> INSTRUCTION_NODE(class_aggregate_paren_x_defn, "Let x_1, ..., x_n be the elements of the expression-list.") - - class_aggregate_paren_x_defn -> class_aggregate_paren_is_k_gt_n - - YN_QUESTION_NODE_NO_CITE(class_aggregate_paren_is_k_gt_n, "Is k > n?", NEW_ILL_FORMED(), class_aggregate_paren_initialize_first_k) - - INSTRUCTION_NODE(class_aggregate_paren_initialize_first_k, "For each 1 <= i <= k, copy-initialize e_i with x_i.") - -> INSTRUCTION_NODE(class_aggregate_paren_initialize_rest, "The remaining elements are initialized with their default member initializers, if any, and are otherwise value-initialized.") - -> NEW_DONE() - - INTERNALLY_RECURSES_SUBOBJECT(class_aggregate_paren_initialize_first_k) - INTERNALLY_VALUE_INITS(class_aggregate_paren_initialize_rest) - } - - subgraph class_user_defined_conv { - INIT_AS_FOLLOWS(class_user_defined_conv_head, "[dcl.init.general]/16.6.3") - -> INSTRUCTION_NODE(class_user_defined_conv_enumerate, "Enumerate the user-defined conversions that can convert from the source type to the destination type or (when a conversion function is used) to a derived class thereof (as described in [over.match.copy]).") - -> INSTRUCTION_NODE(class_user_defined_conv_overload_resolution, "Use overload resolution to select the best conversion.") - -> class_user_defined_conv_is_possible - - YN_QUESTION_NODE_NO_CITE(class_user_defined_conv_is_possible, "Is the conversion ambiguous or impossible?", NEW_ILL_FORMED(), class_user_defined_conv_do_conversion) - - INSTRUCTION_NODE(class_user_defined_conv_do_conversion, "Call the selected function with the initializer expression as its argument.") - -> call_user_defined_conv_is_constructor - - YN_QUESTION_NODE_NO_CITE(call_user_defined_conv_is_constructor, "Is the selected function a constructor?", call_user_defined_conv_constructor, class_user_defined_conv_initialize) - - INSTRUCTION_NODE(call_user_defined_conv_constructor, "The call is a prvalue of the cv-unqualified version of the destination type whose result object is initialized by the constructor.") - call_user_defined_conv_constructor -> class_user_defined_conv_initialize - - INSTRUCTION_NODE(class_user_defined_conv_initialize, "Direct-initialize the destination object using the call.") - -> NEW_RECURSE() - } - } - - subgraph class_source_initialization { - INIT_AS_FOLLOWS(class_source_initialization_head, "[dcl.init.general]/16.7") - -> INSTRUCTION_NODE(class_source_enumerate_conversion_functions, "Enumerate the applicable conversion functions (as in [over.match.conv]).") - -> INSTRUCTION_NODE(class_source_overload_resolution, "Use overload resolution to select the best applicable conversion function.") - -> class_source_conversion_is_impossible - - YN_QUESTION_NODE_NO_CITE(class_source_conversion_is_impossible, "Is the conversion ambiguous or impossible?", NEW_ILL_FORMED(), class_source_initialize) - - INSTRUCTION_NODE(class_source_initialize, "Call the selected user-defined conversion to convert the initializer expression into the object being initialized.") - -> NEW_DONE() - } - - subgraph standard_conv_seq_initialization { - INIT_AS_FOLLOWS(standard_conv_seq_initialization_head, "[dcl.init.general]/16.9") - -> INSTRUCTION_NODE(standard_conv_seq_do_init, "Initialize the object using the value of the initializer expression, using a standard conversion sequence if necessary, not considering any user-defined conversions.") - -> standard_conv_seq_is_possible - - YN_QUESTION_NODE_NO_CITE(standard_conv_seq_is_possible, "Is the conversion possible?", standard_conv_seq_is_bitfield, NEW_ILL_FORMED()) - YN_QUESTION_NODE_NO_CITE(standard_conv_seq_is_bitfield, "Is the object to be initialized a bit-field?", standard_conv_seq_is_bitfield_in_range, NEW_DONE()) - YN_QUESTION_NODE_NO_CITE(standard_conv_seq_is_bitfield_in_range, "Is the value representable by the bit-field?", NEW_DONE(), standard_conv_seq_bitfield_imp_def) - - INSTRUCTION_NODE(standard_conv_seq_bitfield_imp_def, "The value of the bit-field is implementation-defined.") - -> NEW_DONE() - } -} diff --git a/cpp23/list_init.dot.cpp b/cpp23/list_init.dot.cpp deleted file mode 100644 index 7c70a59..0000000 --- a/cpp23/list_init.dot.cpp +++ /dev/null @@ -1,187 +0,0 @@ -#ifndef LIST_INIT_INCLUDED -#define LIST_INIT_INCLUDED - -#include "common.h" -#include "value_init.dot.cpp" -#include "string_init.dot.cpp" - -// [dcl.init.list]/3 -subgraph list_initialization { - #include "aggregate_init.dot.cpp" - - INSTRUCTION_NODE(list_initialization_head, "List-initialization", "[dcl.init.list]/3") - -> INSTRUCTION_NODE(list_initialization_defn_t, "Let the initialized object or reference be of type T.", "[dcl.init.list]/3") - -> list_has_designated_initializer - - // 3.1 - { - YN_QUESTION_NODE(list_has_designated_initializer, "Does the braced-init-list contain a designated-initializer-list?", "[dcl.init.list]/3.1", list_designated_initalizer_is_aggregate, list_is_aggregate_class) - YN_QUESTION_NODE(list_designated_initalizer_is_aggregate, "Is the type an aggregate class?", "[dcl.init.list]/3.1", list_designated_initializer_are_identifiers_valid, NEW_ILL_FORMED()) - YN_QUESTION_NODE(list_designated_initializer_are_identifiers_valid, "Do the ordered identifiers in the designators of the designated-initializer-list form a subsequence of the ordered idenitifiers in the direct non-static data members of the type?", "[dcl.init.list]/3.1", list_designated_initializer_aggregate_init, NEW_ILL_FORMED()) - - INSTRUCTION_NODE(list_designated_initializer_aggregate_init, "Aggregate initialization is performed.", "[dcl.init.list]/3.1") - -> AGGREGATE_INIT_HEAD - } - - // 3.2 - { - YN_QUESTION_NODE(list_is_aggregate_class, "Is the type an aggregate class?", "[dcl.init.list]/3.2", list_aggregate_is_list_singleton, list_is_type_char_array) - - YN_QUESTION_NODE(list_aggregate_is_list_singleton, "Does the initializer list have a single element?", "[dcl.init.list]/3.2", list_aggregate_defn_u, list_is_type_char_array) - - INSTRUCTION_NODE(list_aggregate_defn_u, "Let the sole element have type \"cv U\".") - -> list_aggregate_is_u_eq_t - - YN_QUESTION_NODE(list_aggregate_is_u_eq_t, "Is U the same as T?", "[dcl.init.list]/3.2", list_aggregate_singleton_type_init_type, list_aggreagte_is_u_derived_t) - YN_QUESTION_NODE(list_aggreagte_is_u_derived_t, "Is U a class derived from T?", "[dcl.init.list]/3.2", list_aggregate_singleton_type_init_type, list_is_type_char_array) - - QUESTION_NODE(list_aggregate_singleton_type_init_type, "What is the type of initialization?", "[dcl.init.list]/3.2") - list_aggregate_singleton_type_init_type -> list_aggregate_singleton_type_copy [label="copy-list-initialization"] - list_aggregate_singleton_type_init_type -> list_aggregate_singleton_type_direct [label="direct-list-initialization"] - - INSTRUCTION_NODE(list_aggregate_singleton_type_copy, "Copy-initialize the object from the sole element.", "[dcl.init.list]/3.2") - -> NEW_RECURSE() - - INSTRUCTION_NODE(list_aggregate_singleton_type_direct, "Direct-initialize the object from the sole element.", "[dcl.init.list]/3.2") - -> NEW_RECURSE() - } - - // 3.3 - { - YN_QUESTION_NODE(list_is_type_char_array, "Is T a character array?", "[dcl.init.list]/3.3", list_char_array_is_singleton, list_is_aggregate) - YN_QUESTION_NODE(list_char_array_is_singleton, "Does the initializer list have a single element?", "[dcl.init.list/]3.3", list_char_array_singleton_is_typed, list_is_aggregate) - YN_QUESTION_NODE(list_char_array_singleton_is_typed, "Is that element an appropriately-typed string-literal?", "[dcl.init.list]/3.3", list_char_array_string_literal_init, list_is_aggregate) - - INSTRUCTION_NODE(list_char_array_string_literal_init, "Initialization as in [dcl.init.string]", "[dcl.init.list]/3.3") - -> STRING_LITERAL_INIT_HEAD - } - - // 3.4 - { - YN_QUESTION_NODE(list_is_aggregate, "Is T an aggregate?", "[dcl.init.list]/3.4", list_aggregate_aggregate_initialization, list_is_list_empty) - - INSTRUCTION_NODE(list_aggregate_aggregate_initialization, "Aggregate initialization is performed.", "[dcl.init.list]/3.4") - -> AGGREGATE_INIT_HEAD - } - - // 3.5 - { - YN_QUESTION_NODE(list_is_list_empty, "Is the initializer list empty?", "[dcl.init.list]/3.5", list_empty_is_class, list_dest_is_initializer_list) - YN_QUESTION_NODE(list_empty_is_class, "Is T a class type?", "[dcl.init.list]/3.5", list_empty_has_default_constructor, list_dest_is_initializer_list) - YN_QUESTION_NODE(list_empty_has_default_constructor, "Does T have a default constructor?", "[dcl.init.list]/3.5", list_empty_value_initialize, list_dest_is_initializer_list) - - INST_VALUE_INIT(list_empty_value_initialize, "[dcl.init.list]/3.5") - } - - // 3.6 - { - YN_QUESTION_NODE(list_dest_is_initializer_list, "Is T a specialization of std::initializer_list?", "[dcl.init.list]/3.6", list_initializer_list_init, list_is_class) - - INIT_AS_FOLLOWS(list_initializer_list_init, "[dcl.init.list]/5") - -> INSTRUCTION_NODE(list_initializer_list_defn_e, "Let the object be of type std::initializer_list.") - -> INSTRUCTION_NODE(list_initializer_list_defn_n, "Let N be the number of elements in the initalizer list.") - -> INSTRUCTION_NODE(list_initializer_list_materialize_array, "Materialize a prvalue of type \"array of N const E\".") - -> INSTRUCTION_NODE(list_initializer_list_init_array, "Copy-initialize each element of the array with the corresponding element of the initializer list.") - -> list_initializer_list_is_narrowing - - INTERNALLY_RECURSES_SUBOBJECT(list_initializer_list_init_array) - - YN_QUESTION_NODE_NO_CITE(list_initializer_list_is_narrowing, "Is a narrowing conversion required to initialize any of the elements?", NEW_ILL_FORMED(), list_initializer_list_init_object) - - INSTRUCTION_NODE(list_initializer_list_init_object, "Construct the initializer_list to refer to the materialized array.") - -> NEW_DONE() - } - - // 3.7 - { - YN_QUESTION_NODE(list_is_class, "Is T a class type?", "[dcl.init.list]/3.7", list_class_enumerate_ctors, list_is_enum) - - INSTRUCTION_NODE(list_class_enumerate_ctors, "Enumerate the applicable constructors.", "[dcl.init.list]/3.7") - -> INSTRUCTION_NODE(list_class_select_ctor, "Select the best match selected through overload resolution (applying the special rules in [over.match.list]).", "[dcl.init.list]/3.7") - -> list_class_is_narrowing - - YN_QUESTION_NODE(list_class_is_narrowing, "Is a narrowing conversion required to convert any of the arguments?", "[dcl.init.list]/3.7", NEW_ILL_FORMED(), NEW_DONE()) - } - - // 3.8 - { - YN_QUESTION_NODE(list_is_enum, "Is T an enumeration?", "[dcl.init.list]/3.8", list_enum_is_fixed, list_final_is_singleton) - YN_QUESTION_NODE(list_enum_is_fixed, "Does T have fixed underlying type?", "[dcl.init.list]/3.8", list_enum_underlying_defn, list_final_is_singleton) - - INSTRUCTION_NODE(list_enum_underlying_defn, "Let U be the underlying type.", "[dcl.init.list]/3.8") - -> list_enum_is_singleton - - YN_QUESTION_NODE(list_enum_is_singleton, "Does the initializer-list have a single element?", "[dcl.init.list]/3.8", list_enum_elem_defn, list_final_is_singleton) - - INSTRUCTION_NODE(list_enum_elem_defn, "Let v be that element.", "[dcl.init.list]/3.8") - -> list_enum_is_convertible - - YN_QUESTION_NODE(list_enum_is_convertible, "Can v be implicitly converted to U?", "[dcl.init.list]/3.8", list_enum_is_direct, list_final_is_singleton) - YN_QUESTION_NODE(list_enum_is_direct, "Is the initialization direct-list-initialization?", "[dcl.init.list]/3.8", list_enum_initialization, list_final_is_singleton) - - INSTRUCTION_NODE(list_enum_initialization, "Initialized the object with the value \"T(v)\" (an explicit type conversion).") - -> list_enum_is_narrowing - - YN_QUESTION_NODE(list_enum_is_narrowing, "Is a narrowing conversion required to convert v to U?", "[dcl.init.list]/3.8", NEW_ILL_FORMED(), NEW_DONE()) - } - - // 3.9 - { - // Final just because I couldn't come up with a better name for it. "Final" as in "last". - - YN_QUESTION_NODE(list_final_is_singleton, "Does the initializer list have a single element?", "[dcl.init.list]/3.9", list_final_singleton_type_defn, list_ref_prvalue_is_ref) - - INSTRUCTION_NODE(list_final_singleton_type_defn, "Let E be the type of that element.", "[dcl.init.list]/3.9") - -> list_final_singleton_is_dest_ref - - YN_QUESTION_NODE(list_final_singleton_is_dest_ref, "Is T a reference type?", "[dcl.init.list]/3.9", list_final_singleton_is_dest_ref_related, list_final_singleton_type) - YN_QUESTION_NODE(list_final_singleton_is_dest_ref_related, "Is T's referenced type reference-related to E?", "[dcl.init.list]/3.9", list_final_singleton_type, list_ref_prvalue_is_ref) - - QUESTION_NODE(list_final_singleton_type, "What is the type of initialization?", "[dcl.init.list]/3.9") - list_final_singleton_type -> list_final_singleton_direct [label="direct-list-initialization"] - list_final_singleton_type -> list_final_singleton_copy [label="copy-list-initialization"] - - INSTRUCTION_NODE(list_final_singleton_direct, "Direct-initialize the destination from the element.", "[dcl.init.list]/3.9") - -> NEW_RECURSE() - -> list_final_singleton_is_narrowing - - INSTRUCTION_NODE(list_final_singleton_copy, "Copy-initialize the destination from the element.", "[dcl.init.list]/3.9") - -> NEW_RECURSE() - -> list_final_singleton_is_narrowing - - YN_QUESTION_NODE(list_final_singleton_is_narrowing, "Is a narrowing conversion required to convert the element to the destination type?", "[dcl.init.list]/3.9", NEW_ILL_FORMED(), NEW_DONE()) - } - - // 3.10 - { - YN_QUESTION_NODE(list_ref_prvalue_is_ref, "Is T a reference type?", "[dcl.init.list]/3.10", list_ref_prvalue_prvalue_generated, list_final_is_empty) - - INSTRUCTION_NODE(list_ref_prvalue_prvalue_generated, "Generate a prvalue.", "[dcl.init.list]/3.10") - -> list_ref_prvalue_type_is_unknown_bound - - YN_QUESTION_NODE(list_ref_prvalue_type_is_unknown_bound, "Is T \"reference to array of unknown bound of U\"?", "[dcl.init.list]/3.10", list_ref_prvalue_type_unknown_bound, list_ref_prvalue_type_normal) - - INSTRUCTION_NODE(list_ref_prvalue_type_normal, "The type of the prvalue is the type referenced by T.", "[dcl.init.list]/3.10") - -> list_ref_prvalue_init_prvalue - - INSTRUCTION_NODE(list_ref_prvalue_type_unknown_bound, "The type of the prvalue is the type of x in U x[] H, where H is the initializer list.", "[dcl.init.list]/3.10") - -> list_ref_prvalue_init_prvalue - - INSTRUCTION_NODE(list_ref_prvalue_init_prvalue, "The prvalue initializes its result object by copy-list-initialization.", "[dcl.init.list]/3.10") - -> NEW_RECURSE_SUBOBJECT() - -> INSTRUCTION_NODE(list_ref_prvalue_init_ref, "The reference is direct-initialized by the prvalue.", "[dcl.init.list]/3.10") - -> NEW_RECURSE() - } - - // 3.11 - { - // Final, again, as in "last". - YN_QUESTION_NODE(list_final_is_empty, "Is the initializer list empty?", "[dcl.init.list]/3.11", list_final_empty_value_init, list_nothing_else_ill_formed) - - INST_VALUE_INIT(list_final_empty_value_init, "[dcl.init.list]/3.12") - } - - ILL_FORMED_NODE(list_nothing_else_ill_formed) -} - -#endif diff --git a/cpp23/reference_init.dot.cpp b/cpp23/reference_init.dot.cpp deleted file mode 100644 index da455e2..0000000 --- a/cpp23/reference_init.dot.cpp +++ /dev/null @@ -1,118 +0,0 @@ -#ifndef REFERENCE_INIT_INCLUDED -#define REFERENCE_INIT_INCLUDED - -#include "common.h" - -subgraph cluster_reference_initialization { - // Header in paragraph 5. - INSTRUCTION_NODE(reference_initialization_head, "Reference initialization", "[dcl.init.ref]") - -> INSTRUCTION_NODE(reference_dest_type_defn, "Let the destination be a reference to type \"cv1 T1\".", "[dcl.init.ref]/5") - -> INSTRUCTION_NODE(reference_source_type_defn, "Let the initializer expression have type \"cv2 T2\".", "[dcl.init.ref]/5") - -> reference_is_dest_lval_for_step_1 - - // 5.1 - { - YN_QUESTION_NODE(reference_is_dest_lval_for_step_1, "Is the destination an lvalue reference?", "[dcl.init.ref]/5.1", reference_dest_lval_is_source_lval, reference_is_dest_lval_for_step_2) - - // 5.1.1 - { - YN_QUESTION_NODE(reference_dest_lval_is_source_lval, "Is the initializer expression an lvalue?", "[dcl.init.ref]/5.1.1", reference_dest_lval_is_source_lval_bitfield, reference_dest_lval_is_source_class) - YN_QUESTION_NODE(reference_dest_lval_is_source_lval_bitfield, "Is the initializer expression a bit-field?", "[dcl.init.ref]/5.1.1", reference_dest_lval_is_source_class, reference_lvals_is_compatible) - YN_QUESTION_NODE(reference_lvals_is_compatible, "Is cv1 T1 reference-compatible with cv2 T2?", "[dcl.init.ref]/5.1.1", reference_lvals_compatible_bind, reference_dest_lval_is_source_class) - - INSTRUCTION_NODE(reference_lvals_compatible_bind, "Bind the destination reference to the initializer expression lvalue (or appropriate base class subobject).", "[dcl.init.ref]/5.1") - -> NEW_DONE() - } - - // 5.1.2 - { - YN_QUESTION_NODE(reference_dest_lval_is_source_class, "Is T2 a class type?", "[dcl.init.ref]/5.1.2", reference_dest_lval_source_class_is_reference_related, reference_is_dest_lval_for_step_2) - YN_QUESTION_NODE(reference_dest_lval_source_class_is_reference_related, "Is T1 reference-related to T2?", "[dcl.init.ref]/5.1.2", reference_is_dest_lval_for_step_2, reference_dest_lval_source_class_is_convertible) - YN_QUESTION_NODE(reference_dest_lval_source_class_is_convertible, "Is the initializer expression convertible to an lvalue of type \"cv3 T3\" such that cv1 T1 is reference-compatible with cv3 T3?", "[dcl.init.ref]/5.1.2", reference_class_enumerate_conversions, reference_is_dest_lval_for_step_2) - - INSTRUCTION_NODE(reference_class_enumerate_conversions, "Enumerate applicable conversion functions.", "[dcl.init.ref]/5.1.2") - -> INSTRUCTION_NODE(reference_class_select_conversion, "Select the best applicable conversion function.", "[dcl.init.ref]/5.1.2") - -> INSTRUCTION_NODE(reference_class_do_initialization, "Bind the destination reference to the lvalue result of the conversion (or appropriate base class subobject).", "[dcl.init.ref]/5.1") - -> NEW_DONE() - } - } - - // 5.2 - { - YN_QUESTION_NODE(reference_is_dest_lval_for_step_2, "Is the destination an lvalue reference?", "[dcl.init.ref]/5.2", reference_lval_dest_is_const, reference_rval_conv_source_is_rvalue) - YN_QUESTION_NODE(reference_lval_dest_is_const, "Is the destination a reference to a const-qualified type?", "[dcl.init.ref]/5.2", reference_dest_is_volatile, NEW_ILL_FORMED()) - YN_QUESTION_NODE(reference_dest_is_volatile, "Is the destination a reference to a volatile-qualified type?", "[dcl.init.ref]/5.2", NEW_ILL_FORMED(), reference_rval_conv_source_is_rvalue) - } - - // 5.3 - { - // 5.3.1 - { - YN_QUESTION_NODE(reference_rval_conv_source_is_rvalue, "Is the initializer an rvalue?", "[dcl.init.ref]/5.3.1", reference_rval_conv_source_is_rvalue_bitfield, reference_rval_conv_source_is_lval) - YN_QUESTION_NODE(reference_rval_conv_source_is_rvalue_bitfield, "Is the initializer a bit-field?", "[dcl.init.ref]/5.3.1", reference_rval_conv_source_is_lval, reference_rval_conv_source_rval_or_function_is_ref_compat) - - YN_QUESTION_NODE(reference_rval_conv_source_is_lval, "Is the initializer an lvalue?", "[dcl.init.ref]/5.3.1", reference_rval_conv_source_lval_is_function, reference_rval_conv_source_is_class) - YN_QUESTION_NODE(reference_rval_conv_source_lval_is_function, "Is the initializer of function type?", "[dcl.init.ref]/5.3.1", reference_rval_conv_source_rval_or_function_is_ref_compat, reference_rval_conv_source_is_class) - - YN_QUESTION_NODE(reference_rval_conv_source_rval_or_function_is_ref_compat, "Is cv1 T1 reference-compatible with cv2 T2?", "[dcl.init.ref]/5.3.1", reference_rval_conv_bind_direct, reference_rval_conv_source_is_class) - - INSTRUCTION_NODE(reference_rval_conv_bind_direct, "The converted initializer is the value of the initializer.", "[dcl.init.ref]/5.3") - -> reference_rval_conv_is_converted_prval - } - - // 5.3.2 - { - YN_QUESTION_NODE(reference_rval_conv_source_is_class, "Is T2 a class type?", "[dcl.init.ref]/5.3.2", reference_rval_conv_source_class_is_ref_related, reference_temp_is_dest_class) - YN_QUESTION_NODE(reference_rval_conv_source_class_is_ref_related, "Is T1 reference-related to T2?", "[dcl.init.ref]/5.3.2", reference_temp_is_dest_class, reference_rval_conv_source_class_convertible_target) - YN_QUESTION_NODE(reference_rval_conv_source_class_convertible_target, "Is the initializer convertible to an rvalue or function lvalue of type \"cv3 T3\", where \"cv1 T1\" is reference-compatible with \"cv3 T3\"?", "[dcl.init.ref]/5.3.2", reference_rval_conv_bind_converted, reference_temp_is_dest_class) - - INSTRUCTION_NODE(reference_rval_conv_bind_converted, "The converted initializer is the converted expression.", "[dcl.init.ref]/5.3") - -> reference_rval_conv_is_converted_prval - } - - YN_QUESTION_NODE(reference_rval_conv_is_converted_prval, "Is the converted initializer a prvalue?", "[dcl.init.ref]/5.3", reference_rval_conv_prval_t4_defn, reference_rval_conv_bind_glval) - - INSTRUCTION_NODE(reference_rval_conv_prval_t4_defn, "Let the prvalue have type \"T4\".", "[dcl.init.ref]/5.3") - -> INSTRUCTION_NODE(reference_rval_conv_prval_adjust_type, "Adjust the prvalue's type to \"cv1 T4\".") - -> INSTRUCTION_NODE(reference_rval_conv_prval_materialize, "Apply the temporary materialization conversion to the prvalue.", "[dcl.init.ref]/5.3") - -> reference_rval_conv_bind_glval - - INSTRUCTION_NODE(reference_rval_conv_bind_glval, "Bind the destination reference to the resulting glvalue (or to an appropriate base class subobject).", "[dcl.init.ref]/5.3") - -> NEW_DONE() - } - - // 5.4 - { - // 5.4.1 - { - YN_QUESTION_NODE(reference_temp_is_dest_class, "Is T1 a class type?", "[dcl.init.ref]/5.4.1", reference_temp_is_related, reference_temp_is_source_class) - YN_QUESTION_NODE(reference_temp_is_source_class, "Is T2 a class type?", "[dcl.init.ref]/5.4.1", reference_temp_is_related, reference_temp_implicit_conv) - YN_QUESTION_NODE(reference_temp_is_related, "Is T1 reference-related to T2?", "[dcl.init.ref]/5.4.1", reference_temp_implicit_conv, reference_temp_user_defined_conv) - - INSTRUCTION_NODE(reference_temp_user_defined_conv, "Consider user-defined conversions for the copy-initialization of an object of type \"cv1 T1\" by user-defined conversion.", "[dcl.init.ref]/5.4.1") - -> reference_temp_user_defined_conv_is_ill_formed - - YN_QUESTION_NODE(reference_temp_user_defined_conv_is_ill_formed, "Would the non-reference copy-initialization be ill-formed?", "[dcl.init.ref]/5.4.1", NEW_ILL_FORMED(), reference_temp_user_defined_conv_direct_initialize) - - INSTRUCTION_NODE(reference_temp_user_defined_conv_direct_initialize, "The result of the call to the conversion function, as described by non-reference copy-initialization, is used to direct-initialize the reference. For the direct-initialization, user-defined conversions are not considered.", "[dcl.init.ref]/5.4.1") - -> NEW_RECURSE() - -> reference_temp_implicit_conv_is_reference_related - } - - // 5.4.2 - { - INSTRUCTION_NODE(reference_temp_implicit_conv, "The initializer expression is implicitly converted to a prvalue of type \"T1\".", "[dcl.init.ref]/5.4.2") - -> INSTRUCTION_NODE(reference_temp_implicit_conv_materialize, "Apply the temporary materialization conversion to the prvalue, considering the type of the prvalue to be \"cv1 T1\".", "[dcl.init.ref]/5.4.2") - -> INSTRUCTION_NODE(reference_temp_implicit_conv_materialize_bind, "Bind the reference to the result.", "[dcl.init.ref]/5.4.2") - -> reference_temp_implicit_conv_is_reference_related - } - - YN_QUESTION_NODE(reference_temp_implicit_conv_is_reference_related, "Is T1 reference-related to T2?", "[dcl.init.ref]/5.4", reference_temp_implicit_conv_is_cv_okay, NEW_DONE()) - YN_QUESTION_NODE(reference_temp_implicit_conv_is_cv_okay, "Is cv1 at least as qualified as cv2?", "[dcl.init.ref]/5.4.3", reference_temp_implicit_conv_is_dest_rval, NEW_ILL_FORMED()) - - YN_QUESTION_NODE(reference_temp_implicit_conv_is_dest_rval, "Is the destination an rvalue reference?", "[dcl.init.ref]/5.4.4", reference_temp_implicit_conv_is_source_lval, NEW_DONE()) - YN_QUESTION_NODE(reference_temp_implicit_conv_is_source_lval, "Is the initializer an lvalue?", "[dcl.init.ref]/5.4.4", NEW_ILL_FORMED(), NEW_DONE()) - } -} - -#endif diff --git a/cpp23/string_init.dot.cpp b/cpp23/string_init.dot.cpp deleted file mode 100644 index 2fd817a..0000000 --- a/cpp23/string_init.dot.cpp +++ /dev/null @@ -1,46 +0,0 @@ -#ifndef STRING_INIT_INCLUDED -#define STRING_INIT_INCLUDED - -#include "common.h" - -#define STRING_LITERAL_INIT_HEAD string_literal_initialization_head - -#include "zero_init.dot.cpp" - -subgraph cluster_string_literal_initialization { - INSTRUCTION_NODE(STRING_LITERAL_INIT_HEAD, "Initialization as follows:", "[dcl.init.string]") - -> INSTRUCTION_NODE(string_literal_verify_kind, "Verify array element type and literal type match.") - -> { - rank=same; - - string_literal_kind_char [label="char / ordinary literal"] - string_literal_kind_uchar [label="unsigned char / ordinary literal"] - string_literal_kind_schar [label="signed char / ordinary literal"] - string_literal_kind_char8 [label="char8_t / UTF-8 literal"] - string_literal_kind_utf8_char [label="char / UTF-8 literal"] - string_literal_kind_utf8_uchar [label="unsigned char / UTF-8 literal"] - string_literal_kind_char16 [label="char16_t / UTF-16 literal"] - string_literal_kind_char32 [label="char32_t / UTF-32 literal"] - string_literal_kind_wchar [label="wchar_t / wide literal"] - string_literal_kind_other [label="Anything else"] - - // Force these nodes to layout in the following order - string_literal_kind_char -> string_literal_kind_uchar -> string_literal_kind_schar -> string_literal_kind_char8 -> string_literal_kind_utf8_char -> string_literal_kind_utf8_uchar -> string_literal_kind_char16 -> string_literal_kind_char32 -> string_literal_kind_wchar -> string_literal_kind_other [style=invis] - } - - string_literal_kind_other -> NEW_ILL_FORMED() - - { string_literal_kind_char, string_literal_kind_uchar, string_literal_kind_schar, string_literal_kind_char8, string_literal_kind_utf8_char, string_literal_kind_utf8_uchar, string_literal_kind_char16, string_literal_kind_char32, string_literal_kind_wchar } -> string_literal_initialize_first - - INSTRUCTION_NODE(string_literal_initialize_first, "Initialize the first elements of the array with successive values from the string literal.") - -> string_literal_has_too_many - - YN_QUESTION_NODE_NO_CITE(string_literal_has_too_many, "Are there more initializers than array elements?", NEW_ILL_FORMED(), string_literal_initialize_rest) - - INSTRUCTION_NODE(string_literal_initialize_rest, "Zero-initialize the remaining elements of the array (if any).") - -> NEW_DONE() - - INTERNALLY_ZERO_INITS(string_literal_initialize_rest) -} - -#endif diff --git a/cpp23/value_init.dot.cpp b/cpp23/value_init.dot.cpp deleted file mode 100644 index 8311a41..0000000 --- a/cpp23/value_init.dot.cpp +++ /dev/null @@ -1,62 +0,0 @@ -#ifndef VALUE_INIT_INCLUDED -#define VALUE_INIT_INCLUDED - -#include "common.h" - -#define NODE_VALUE_INIT_HEAD value_initialization_head -#define INST_VALUE_INIT(id, ...) { INSTRUCTION_NODE(id, "Value-initialize the object.", __VA_ARGS__); } -> NODE_VALUE_INIT_HEAD -#define INTERNALLY_VALUE_INITS(id) { id -> NODE_VALUE_INIT_HEAD [style="dotted"]; } - -#include "default_init.dot.cpp" -#include "zero_init.dot.cpp" - -// [dcl.init.general]/9 -subgraph cluster_value_initialization { - INSTRUCTION_NODE(NODE_VALUE_INIT_HEAD, "Value-initialization", "[dcl.init.general]/9") - -> value_is_reference - - // 10 - { - YN_QUESTION_NODE(value_is_reference, "Is the destination a reference?", "[dcl.init.general]/10", NEW_ILL_FORMED(), value_defn_t) - } - - INSTRUCTION_NODE(value_defn_t, "Let T be the type of the object.", "[dcl.init.general]/9") - -> value_is_class - - // 9.1 - { - YN_QUESTION_NODE(value_is_class, "Is the type a (possibly cv-qualified) class type?", "[dcl.init.general]/9.1", value_class_has_default, value_is_array) - - YN_QUESTION_NODE(value_class_has_default, "Does T have a default constructor?", "[dcl.init.general]/9.1", value_class_default_is_deleted, value_class_direct_default_init) - YN_QUESTION_NODE(value_class_default_is_deleted, "Does T have a default constructor that is deleted?", "[dcl.init.general]/9.1", value_class_direct_default_init, value_class_default_is_user_provided) - YN_QUESTION_NODE(value_class_default_is_user_provided, "Does T have a default constructor that is user-provided?", "[dcl.init.general]/9.1", value_class_direct_default_init, value_class_dflt_ctor_check_zero) - - INSTRUCTION_NODE(value_class_direct_default_init, "Default-initialize the object.", "[dcl.init.general]/9.1") - -> NODE_DEFAULT_INIT_HEAD - - INSTRUCTION_NODE(value_class_dflt_ctor_check_zero, "Check the semantic constraints for default-initialization.", "[dcl.init.general]/9.1") - -> INSTRUCTION_NODE(value_class_dflt_ctor_zero_init, "Zero-initialize the object.", "[dcl.init.general]/9.1") - -> INSTRUCTION_NODE(value_class_dflt_ctor_default_init, "Default-initialize the object.", "[dcl.init.general]/9.1") - -> NODE_DEFAULT_INIT_HEAD - - INTERNALLY_ZERO_INITS(value_class_dflt_ctor_zero_init) - } - - // 9.3 - { - YN_QUESTION_NODE(value_is_array, "Is the type an array type?", "[dcl.init.general]/9.2", value_array_initialize_elements, value_zero_initialize_fallback) - - INSTRUCTION_NODE(value_array_initialize_elements, "Value-initialize each element of the array.", "[dcl.init.general]/9.2") - -> NEW_DONE() - - INTERNALLY_VALUE_INITS(value_array_initialize_elements) - } - - // 9.3 - { - INSTRUCTION_NODE(value_zero_initialize_fallback, "Zero-initialize the object.", "[dcl.init.general]/9.3") - -> NODE_ZERO_INIT_HEAD - } -} - -#endif diff --git a/cpp23/wrap.perl b/cpp23/wrap.perl deleted file mode 100755 index b9fb6f2..0000000 --- a/cpp23/wrap.perl +++ /dev/null @@ -1,34 +0,0 @@ -#!/usr/bin/env perl - -# Based on https://biowize.wordpress.com/2011/03/11/text-wrapping-with-dot-graphviz/ - -use strict; - -my $usage = "setdotlabelwidth [char-width] < [dotfile]"; -my $width = shift() or die("Usage: $usage $!"); - -while() -{ - if(m/label="((?:\\.|[^\\"])*)"/) - { - my $labeltext = $1; - my @words = split(/ /, $labeltext); - my @newtext = (); - my $newline = ""; - foreach my $word(@words) - { - if( length($newline) > 0 and - length($newline) + length($word) > $width ) - { - push(@newtext, $newline); - $newline = ""; - } - $newline .= " " if( length($newline) > 0 ); - $newline .= $word; - } - push(@newtext, $newline) if( length($newline) > 0 ); - my $newlabel = join("\\n", @newtext); - s/label="((?:\\.|[^\\"])*)"/label="$newlabel"/; - } - print; -} diff --git a/cpp23/zero_init.dot.cpp b/cpp23/zero_init.dot.cpp deleted file mode 100644 index 997a9a8..0000000 --- a/cpp23/zero_init.dot.cpp +++ /dev/null @@ -1,67 +0,0 @@ -#ifndef ZERO_INIT_INCLUDED -#define ZERO_INIT_INCLUDED - -#include "common.h" - -#define NODE_ZERO_INIT_HEAD zero_initialization_head - -#define ZERO_INIT_BACKREF(source) { { source; } -> NODE_ZERO_INIT_HEAD [style="dotted"] } -#define INTERNALLY_ZERO_INITS(id) { id -> NODE_ZERO_INIT_HEAD [style="dotted"]; } - -// [dcl.init.general]/9 -subgraph cluster_zero_initialization { - INSTRUCTION_NODE(NODE_ZERO_INIT_HEAD, "Zero-initialization", "[dcl.init.general]/6") - -> INSTRUCTION_NODE(zero_defn_t, "Let the type of the object or reference be T.", "[dcl.init.general]/6") - -> zero_is_scalar - - // 6.1 - { - YN_QUESTION_NODE(zero_is_scalar, "Is T a scalar type?", "[dcl.init.general]/6.1", zero_scalar_init, zero_is_class) - INSTRUCTION_NODE(zero_scalar_init, "Initialize the object to the value obtained by converting the literal 0 to T.", "[dcl.init.general]/6.1") - -> NEW_DONE() - } - - // 6.2-6.3 - { - YN_QUESTION_NODE(zero_is_class, "Is T a class type?", "[dcl.init.general]/6.2", zero_is_union, zero_is_array) - YN_QUESTION_NODE(zero_is_union, "Is T a union type?", "[dcl.init.general]/6.2-3", zero_union_padding, zero_class_padding) - - INSTRUCTION_NODE(zero_class_padding, "Initialize the object's padding bits to zero bits.", "[dcl.init.general]/6.2") - -> INSTRUCTION_NODE(zero_class_members, "Zero-initialize each of the object's non-static data members.", "[dcl.init.general]/6.2") - -> INSTRUCTION_NODE(zero_class_bases, "Zero-initialize each of the object's non-virtual base class subobjects.", "[dcl.init.general]/6.2") - -> zero_class_is_base_subobject - - YN_QUESTION_NODE(zero_class_is_base_subobject, "Is the object a base class subobject?", "[dcl.init.general]/6.2", zero_class_virtual_bases, NEW_DONE()) - - INSTRUCTION_NODE(zero_class_virtual_bases, "Zero-initialize each of the object's virtual base class subobjects.", "[dcl.init.general]/6.2") - -> NEW_DONE() - - ZERO_INIT_BACKREF({ - zero_class_members zero_class_bases zero_class_virtual_bases - }) - - INSTRUCTION_NODE(zero_union_padding, "Initialize the object's padding bits to zero bits.", "[dcl.init.general]/6.3") - -> INSTRUCTION_NODE(zero_union_first_nsdm, "Zero-nitialize the object's first non-static named data member.") - -> NEW_DONE() - - ZERO_INIT_BACKREF(zero_union_first_nsdm) - } - - // 6.4 - { - YN_QUESTION_NODE(zero_is_array, "Is T an array type?", "[dcl.init.general]/6.4", zero_array_elements, zero_is_reference) - - INSTRUCTION_NODE(zero_array_elements, "Zero-initialize each element.", "[dcl.init.general]/6.4") - -> NEW_DONE() - - ZERO_INIT_BACKREF(zero_array_elements) - } - - // 6.5 - { - YN_QUESTION_NODE(zero_is_reference, "Is T a reference type?", "[dcl.init.general]/6.5", zero_reference_no_init, NEW_DONE()) - INSTRUCTION_NODE(zero_reference_no_init, "No initialization is performed.", "[dcl.init.general]/6.5") - } -} - -#endif diff --git a/std-2020/initialization.png b/std-2020/initialization.png new file mode 100644 index 0000000..f40320e Binary files /dev/null and b/std-2020/initialization.png differ diff --git a/std-2020/initialization.svg b/std-2020/initialization.svg new file mode 100644 index 0000000..928a801 --- /dev/null +++ b/std-2020/initialization.svg @@ -0,0 +1,4036 @@ + + + + + + +initialization + + +cluster_array_initialization + + + +cluster_class_dest_initialization + + + +cluster_string_literal_initialization + + + +cluster_class_source_initialization + + + +cluster_standard_conv_seq_initialization + + + +cluster_reference_initialization + + + +cluster_value_initialization + + + +cluster_aggregate_initialization + + + + +start + +So you want to initialize something? +[dcl.init]/16 +Copyright Janet Cobb 2020, Licensed CC BY 4.0 + + + +is_braced + +Is the initializer in braces? +[dcl.init]/16.1 + + + +start->is_braced + + + + + +list_initialization_head + +List-initialization +[dcl.init.list]/3 + + + +is_braced->list_initialization_head + + +Yes + + + +is_dest_reference + +Is the destination type a reference type? +[dcl.init]/16.2 + + + +is_braced->is_dest_reference + + +No + + + +list_has_designated_initializer + +Does the braced-init-list contain a designated-initializer-list? +[dcl.init.list]/3.1 + + + +list_initialization_head->list_has_designated_initializer + + + + + +reference_initialization_head + +Reference initialization +[dcl.init.ref] + + + +is_dest_reference->reference_initialization_head + + +Yes + + + +is_char_arr_init + +Is the destination type a char[] or a char*_t[]? +[dcl.init]/16.3 + + + +is_dest_reference->is_char_arr_init + + +No + + + +reference_dest_type_defn + +Let the destination type be "reference to cv1 T1". +[dcl.init.ref]/5 + + + +reference_initialization_head->reference_dest_type_defn + + + + + +is_char_arr_literal_init + +Is the initializer a string literal? +[dcl.init]/16.3 + + + +is_char_arr_init->is_char_arr_literal_init + + +Yes + + + +is_initializer_empty_parens + +Is the initializer "()"? +[dcl.init]/16.4 + + + +is_char_arr_init->is_initializer_empty_parens + + +No + + + +is_char_arr_literal_init->is_initializer_empty_parens + + +No + + + +string_literal_initialization_head + +Initialization as follows: +[dcl.init.string] + + + +is_char_arr_literal_init->string_literal_initialization_head + + +Yes + + + +value_initialization_head + +Value-initialization +[dcl.init]/8 + + + +is_initializer_empty_parens->value_initialization_head + + +Yes + + + +is_dest_array + +Is the destination type an array? +[dcl.init]/16.5 + + + +is_initializer_empty_parens->is_dest_array + + +No + + + +string_literal_verify_kind + +Verify array type and literal type match. + + + +string_literal_initialization_head->string_literal_verify_kind + + + + + +value_is_class + +Is the type a class type? +[dcl.init]/8.1 + + + +value_initialization_head->value_is_class + + + + + +array_initialization_head + +Initialization as follows: +[dcl.init]/16.5 + + + +is_dest_array->array_initialization_head + + +Yes + + + +is_dest_class_type + +Is the destination type a class type? +[dcl.init]/16.6 + + + +is_dest_array->is_dest_class_type + + +No + + + +array_k_definition + +Let k be the number of elements in the initializers expression list.' + + + +array_initialization_head->array_k_definition + + + + + +class_dest_initialization_head + +Initialization as follows: +[dcl.init]/16.6 + + + +is_dest_class_type->class_dest_initialization_head + + +Yes + + + +is_source_class_type + +Is the source type a class type? +[dcl.init]/16.7 + + + +is_dest_class_type->is_source_class_type + + +No + + + +array_is_unsized + +Is destination type an array of unknown bound? + + + +array_k_definition->array_is_unsized + + + + + +array_unsized_n_defn + +Let n be k. + + + +array_is_unsized->array_unsized_n_defn + + +Yes + + + +array_sized_n_defn + +Let n be the array size of the destination type. + + + +array_is_unsized->array_sized_n_defn + + +No + + + +array_initialize_first_k + +Copy-initialize the first k array elements from the expressions in the initailizer. + + + +array_unsized_n_defn->array_initialize_first_k + + + + + +array_k_gt_n + +Is k > n? + + + +array_sized_n_defn->array_k_gt_n + + + + + +array_initialize_rest + +Value-initialize the remaining elements. + + + +array_initialize_first_k->array_initialize_rest + + + + + +array_k_gt_n->array_initialize_first_k + + +No + + + +array_k_gt_n_ill_formed + +The program is ill-formed. + + + +array_k_gt_n->array_k_gt_n_ill_formed + + +Yes + + + +array_initialize_rest__generated_done + +Done + + + +array_initialize_rest->array_initialize_rest__generated_done + + + + + +class_is_initializer_prvalue + +Is the initializer a prvalue? +[dcl.init]/16.6.1 + + + +class_dest_initialization_head->class_is_initializer_prvalue + + + + + +class_source_initialization_head + +Initialized as follows: +[dcl.init]/16.7 + + + +is_source_class_type->class_source_initialization_head + + +Yes + + + +is_direct_init_for_nullptr + +Is the initialization direct-initialization? +[dcl.init]/16.8 + + + +is_source_class_type->is_direct_init_for_nullptr + + +No + + + +class_source_consider_conversion_functions + +Use overload resolution to select the best applicable conversion function. + + + +class_source_initialization_head->class_source_consider_conversion_functions + + + + + +is_source_type_nullptr + +Is the source type std::nullptr_t? +[dcl.init]/16.8 + + + +is_direct_init_for_nullptr->is_source_type_nullptr + + +Yes + + + +standard_conv_seq_initialization_head + +The object is initialized as follows: +[dcl.init]/6.9 + + + +is_direct_init_for_nullptr->standard_conv_seq_initialization_head + + +No + + + +is_source_type_nullptr->standard_conv_seq_initialization_head + + +No + + + +is_dest_type_bool_for_nullptr + +Is the destination type bool? +[dcl.init]/16.8 + + + +is_source_type_nullptr->is_dest_type_bool_for_nullptr + + +Yes + + + +standard_conv_seq_do_init + +Initialize the object using the value of the initializer expression, using a standard conversion sequence if necessary, not considering any user-defined conversions. + + + +standard_conv_seq_initialization_head->standard_conv_seq_do_init + + + + + +is_dest_type_bool_for_nullptr->standard_conv_seq_initialization_head + + +No + + + +nullptr_to_bool_init + +The bool is initialized to false. +[dcl.init]/16.8 + + + +is_dest_type_bool_for_nullptr->nullptr_to_bool_init + + +Yes + + + +nullptr_to_bool_init__generated_done + +Done + + + +nullptr_to_bool_init->nullptr_to_bool_init__generated_done + + + + + +class_is_initializer_prvalue_same_class + +Is the source type the same as the destination type (up to cv-qualification)? +[dcl.init]/16.6.1 + + + +class_is_initializer_prvalue->class_is_initializer_prvalue_same_class + + +Yes + + + +class_is_copy_init + +Is the initialization copy-initialization? +[dcl.init]/16.6.2 + + + +class_is_initializer_prvalue->class_is_copy_init + + +No + + + +class_is_initializer_prvalue_same_class->class_is_copy_init + + +No + + + +class_initialize_by_prvalue + +Use the prvalue to initialize the destination object. +[dcl.init]/16.6.1 + + + +class_is_initializer_prvalue_same_class->class_initialize_by_prvalue + + +Yes + + + +class_is_copy_init_same_class + +Is the source type the same class as the destination type (up to cv qualification)? +[dcl.init]/16.6.2 + + + +class_is_copy_init->class_is_copy_init_same_class + + +Yes + + + +class_is_direct_init + +The initialization is direct-initialization. +[dcl.init]/16.6.2 + + + +class_is_copy_init->class_is_direct_init + + +No + + + +class_initialize_by_prvalue__generated_done + +Done + + + +class_initialize_by_prvalue->class_initialize_by_prvalue__generated_done + + + + + +class_consider_constructors + +Enumerate constructors and select best through overload resolution. +[dcl.init]/16.6.2 + + + +class_is_copy_init_same_class->class_consider_constructors + + +Yes + + + +class_is_copy_init_derived_class + +Is the source type a derived class of the destination type? +[dcl.init]/16.6.2 + + + +class_is_copy_init_same_class->class_is_copy_init_derived_class + + +No + + + +class_is_direct_init->class_consider_constructors + + + + + +class_constructors_is_resolution_successful + +Is overload resolution succesful? +[dcl.init]/16.6.2 + + + +class_consider_constructors->class_constructors_is_resolution_successful + + + + + +class_is_copy_init_derived_class->class_consider_constructors + + +Yes + + + +class_user_defined_conv_head + +Initialization as follows: +[dcl.init]/16.6.3 + + + +class_is_copy_init_derived_class->class_user_defined_conv_head + + +No + + + +class_user_defined_conv_overload_resolution + +Use overload resolution to select the best user-defined conversion that can convert from the source type to the destination type or (when a conversion function is used) to a derived class thereof. + + + +class_user_defined_conv_head->class_user_defined_conv_overload_resolution + + + + + +class_constructors_use_selected + +Use the selected constructor to initialize the object, using the expression or expression-list as argument(s). +[dcl.init]/16.6.2.1 + + + +class_constructors_is_resolution_successful->class_constructors_use_selected + + +Yes + + + +class_is_aggregate + +Is the destination type an aggregate class? +[dcl.init]/16.6.2.2 + + + +class_constructors_is_resolution_successful->class_is_aggregate + + +No + + + +class_constructors_use_selected__generated_done + +Done + + + +class_constructors_use_selected->class_constructors_use_selected__generated_done + + + + + +class_aggregate_is_initializer_expr_list + +Is the initializer a parenthesized expression-list? +[dcl.init]/16.6.2.2 + + + +class_is_aggregate->class_aggregate_is_initializer_expr_list + + +Yes + + + +class_ill_formed + +The program is ill-formed. + + + +class_is_aggregate->class_ill_formed + + +No + + + +class_aggregate_is_initializer_expr_list->class_ill_formed + + +No + + + +class_aggregate_paren_init_head + +Initialized as follows: +[dcl.init]/16.6.2.2 + + + +class_aggregate_is_initializer_expr_list->class_aggregate_paren_init_head + + +Yes + + + +class_aggregate_paren_n_defn + +Let n be the number of elements in the aggregate. + + + +class_aggregate_paren_init_head->class_aggregate_paren_n_defn + + + + + +class_aggregate_paren_k_defn + +Let k be the number of elements in the initializer's expression list.' + + + +class_aggregate_paren_n_defn->class_aggregate_paren_k_defn + + + + + +class_aggregate_paren_is_k_gt_n + +Is k > n? + + + +class_aggregate_paren_k_defn->class_aggregate_paren_is_k_gt_n + + + + + +class_aggregate_paren_ill_formed + +The program is ill-formed. + + + +class_aggregate_paren_is_k_gt_n->class_aggregate_paren_ill_formed + + +Yes + + + +class_aggregate_paren_initialize_first_k + +Copy-initialize the first k elements from the expression list. + + + +class_aggregate_paren_is_k_gt_n->class_aggregate_paren_initialize_first_k + + +No + + + +class_aggregate_paren_initialize_rest + +Use default member initializer or value-initialize the remaining elements. + + + +class_aggregate_paren_initialize_first_k->class_aggregate_paren_initialize_rest + + + + + +class_aggregate_paren_initialize_rest__generated_done + +Done + + + +class_aggregate_paren_initialize_rest->class_aggregate_paren_initialize_rest__generated_done + + + + + +class_user_defined_conv_is_possible + +Is the conversion ambiguous or impossible? + + + +class_user_defined_conv_overload_resolution->class_user_defined_conv_is_possible + + + + + +class_user_defined_conv_ill_formed + +The program is ill-formed. + + + +class_user_defined_conv_is_possible->class_user_defined_conv_ill_formed + + +Yes + + + +class_user_defined_conv_do_conversion + +Call the selected function with the initializer-expression as its argument. + + + +class_user_defined_conv_is_possible->class_user_defined_conv_do_conversion + + +No + + + +class_user_defined_conv_initialize + +Direct-initialize the destination object with the result of the conversion. + + + +class_user_defined_conv_do_conversion->class_user_defined_conv_initialize + + + + + +class_user_defined_conv_initialize__generated_done + +Done + + + +class_user_defined_conv_initialize->class_user_defined_conv_initialize__generated_done + + + + + +string_literal_kind_char + +char[] / ordinary literal + + + +string_literal_verify_kind->string_literal_kind_char + + + + + +string_literal_kind_char8 + +char8_t[] / UTF-8 literal + + + +string_literal_verify_kind->string_literal_kind_char8 + + + + + +string_literal_kind_char16 + +char16_t[] / UTF-16 literal + + + +string_literal_verify_kind->string_literal_kind_char16 + + + + + +string_literal_kind_char32 + +char32_t[] / UTF-32 literal + + + +string_literal_verify_kind->string_literal_kind_char32 + + + + + +string_literal_kind_wchar + +wchar_t[] / wide literal + + + +string_literal_verify_kind->string_literal_kind_wchar + + + + + +string_literal_kind_other + +Anything else + + + +string_literal_verify_kind->string_literal_kind_other + + + + + + +string_literal_initialize_first + +Initialize the first elements of the array with successive values from the string literal. + + + +string_literal_kind_char->string_literal_initialize_first + + + + + + +string_literal_kind_char8->string_literal_initialize_first + + + + + + +string_literal_kind_char16->string_literal_initialize_first + + + + + + +string_literal_kind_char32->string_literal_initialize_first + + + + + + +string_literal_kind_wchar->string_literal_initialize_first + + + + + +string_literal_kind_other__generated_ill_formed + +The program is ill-formed. + + + +string_literal_kind_other->string_literal_kind_other__generated_ill_formed + + + + + +string_literal_has_too_many + +Are there more initializers than array elements? + + + +string_literal_initialize_first->string_literal_has_too_many + + + + + +string_literal_ill_formed_too_many + +The program is ill-formed. + + + +string_literal_has_too_many->string_literal_ill_formed_too_many + + +Yes + + + +string_literal_initialize_rest + +Zero-initialize the remaining elements of the array (if any). + + + +string_literal_has_too_many->string_literal_initialize_rest + + +No + + + +string_literal_initialize_rest__generated_done + +Done + + + +string_literal_initialize_rest->string_literal_initialize_rest__generated_done + + + + + +class_source_conversion_is_impossible + +Is the conversion impossible or ambiguous? + + + +class_source_consider_conversion_functions->class_source_conversion_is_impossible + + + + + +class_source_conversion_ill_formed + +The program is ill-formed. + + + +class_source_conversion_is_impossible->class_source_conversion_ill_formed + + +Yes + + + +class_source_initialize + +Use the result of the conversion to convert the initializer to the object being initialized. + + + +class_source_conversion_is_impossible->class_source_initialize + + +No + + + +class_source_initialize__generated_done + +Done + + + +class_source_initialize->class_source_initialize__generated_done + + + + + +standard_conv_seq_is_possible + +Is the conversion possible? + + + +standard_conv_seq_do_init->standard_conv_seq_is_possible + + + + + +standard_conv_seq_is_bitfield + +Is the object to be initialized a bit-field? + + + +standard_conv_seq_is_possible->standard_conv_seq_is_bitfield + + +Yes + + + +standard_conv_seq_ill_formed + +The program is ill-formed. + + + +standard_conv_seq_is_possible->standard_conv_seq_ill_formed + + +No + + + +standard_conv_seq_is_bitfield_in_range + +Is the value representable by the bit-field? + + + +standard_conv_seq_is_bitfield->standard_conv_seq_is_bitfield_in_range + + +Yes + + + +standard_conv_seq_is_bitfield__generated_done + +Done + + + +standard_conv_seq_is_bitfield->standard_conv_seq_is_bitfield__generated_done + + +No + + + +standard_conv_seq_bitfield_imp_def + +The value of the bit-field is implementation-defined. + + + +standard_conv_seq_is_bitfield_in_range->standard_conv_seq_bitfield_imp_def + + +No + + + +standard_conv_seq_is_bitfield_in_range__generated_done + +Done + + + +standard_conv_seq_is_bitfield_in_range->standard_conv_seq_is_bitfield_in_range__generated_done + + +Yes + + + +standard_conv_seq_bitfield_imp_def__generated_done + +Done + + + +standard_conv_seq_bitfield_imp_def->standard_conv_seq_bitfield_imp_def__generated_done + + + + + +reference_source_type_defn + +Let the source type be "cv2 T2". +[dcl.init.ref]/5 + + + +reference_dest_type_defn->reference_source_type_defn + + + + + +reference_is_dest_lval + +Is the destination type an lvalue reference? +[dcl.init.ref]/5.1 + + + +reference_source_type_defn->reference_is_dest_lval + + + + + +reference_dest_lval_is_source_lval + +Is the initializer an lvalue? +[dcl.init.ref]/5.1 + + + +reference_is_dest_lval->reference_dest_lval_is_source_lval + + +Yes + + + +reference_dest_is_lval_non_const + +Is the destination an lvalue reference to a non-const type? +[dcl.init.ref]/5.2 + + + +reference_is_dest_lval->reference_dest_is_lval_non_const + + +No + + + +reference_lvals_is_compatible + +Is cv1 T1 reference-compatibile with cv2 T2? +[dcl.init.ref]/5.1 + + + +reference_dest_lval_is_source_lval->reference_lvals_is_compatible + + +Yes + + + +reference_dest_lval_is_source_class + +Is T2 a class type? +[dcl.init.ref]/5.1.2 + + + +reference_dest_lval_is_source_lval->reference_dest_lval_is_source_class + + +No + + + +reference_dest_non_const_ill_formed + +The program is ill-formed. + + + +reference_dest_is_lval_non_const->reference_dest_non_const_ill_formed + + +Yes + + + +reference_dest_is_volatile + +Is the destinations referenced type volatile-qualified' +[dcl.init.ref]/5.2 + + + +reference_dest_is_lval_non_const->reference_dest_is_volatile + + +No + + + +reference_lvals_is_compatible->reference_dest_lval_is_source_class + + +No + + + +reference_lvals_compatible_bind + +The destination reference is bound to the initializer lvalue (or appropriate base). +[dcl.init.ref]/5.1 + + + +reference_lvals_is_compatible->reference_lvals_compatible_bind + + +Yes + + + +reference_dest_lval_is_source_class->reference_dest_is_lval_non_const + + +No + + + +reference_dest_lval_source_class_is_reference_related + +Is T1 reference-related to T2? +[dcl.init.ref]/5.1.2 + + + +reference_dest_lval_is_source_class->reference_dest_lval_source_class_is_reference_related + + +Yes + + + +reference_lvals_compatible_bind__generated_done + +Done + + + +reference_lvals_compatible_bind->reference_lvals_compatible_bind__generated_done + + + + + +reference_dest_lval_source_class_is_reference_related->reference_dest_is_lval_non_const + + +Yes + + + +reference_dest_lval_source_class_is_convertible + +Is T2 convertible to an lvalue of type cv3 T3 such that cv1 T1 is reference-compatible with cv3 T3? +[dcl.init.ref]/5.1.2 + + + +reference_dest_lval_source_class_is_reference_related->reference_dest_lval_source_class_is_convertible + + +No + + + +reference_dest_lval_source_class_is_convertible->reference_dest_is_lval_non_const + + +No + + + +reference_class_select_conversion + +Select the best applicable conversion function. +[dcl.init.ref]/5.1.2 + + + +reference_dest_lval_source_class_is_convertible->reference_class_select_conversion + + +Yes + + + +reference_class_do_initialization + +The destination reference is bound to the result of the conversion (or appropriate base). +[dcl.init.ref]/5.1 + + + +reference_class_select_conversion->reference_class_do_initialization + + + + + +reference_class_do_initialization__generated_done + +Done + + + +reference_class_do_initialization->reference_class_do_initialization__generated_done + + + + + +reference_dest_volatile_ill_formed + +The program is ill-formed. + + + +reference_dest_is_volatile->reference_dest_volatile_ill_formed + + +Yes + + + +reference_rval_conv_source_is_rvalue + +Is the initializer an rvalue? +[dcl.init.ref]/5.3.1 + + + +reference_dest_is_volatile->reference_rval_conv_source_is_rvalue + + +No + + + +reference_rval_conv_source_is_rvalue_bitfield + +Is the initializer a bit-field? +[dcl.init.ref]/5.3.1 + + + +reference_rval_conv_source_is_rvalue->reference_rval_conv_source_is_rvalue_bitfield + + +Yes + + + +reference_rval_conv_source_is_function_lval + +Is the initializer a function lvalue? +[dcl.init.ref]/5.3.1 + + + +reference_rval_conv_source_is_rvalue->reference_rval_conv_source_is_function_lval + + +No + + + +reference_rval_conv_source_is_rvalue_bitfield->reference_rval_conv_source_is_function_lval + + +Yes + + + +reference_rval_conv_source_rval_or_function_is_ref_compat + +Is cv1 T1 reference-compatible with cv2 T2? +[dcl.init.ref]/5.3.1 + + + +reference_rval_conv_source_is_rvalue_bitfield->reference_rval_conv_source_rval_or_function_is_ref_compat + + +No + + + +reference_rval_conv_source_is_function_lval->reference_rval_conv_source_rval_or_function_is_ref_compat + + +Yes + + + +reference_rval_conv_source_is_class + +Is T2 a class type? +[dcl.init.ref]/5.3.2 + + + +reference_rval_conv_source_is_function_lval->reference_rval_conv_source_is_class + + +No + + + +reference_rval_conv_source_rval_or_function_is_ref_compat->reference_rval_conv_source_is_class + + +No + + + +reference_rval_conv_bind_direct + +The converted initializer is the value of the initializer. +[dcl.init.ref]/5.3 + + + +reference_rval_conv_source_rval_or_function_is_ref_compat->reference_rval_conv_bind_direct + + +Yes + + + +reference_rval_conv_source_class_is_ref_related + +Is T1 reference-related to T2? +[dcl.init.ref]/5.3.2 + + + +reference_rval_conv_source_is_class->reference_rval_conv_source_class_is_ref_related + + +Yes + + + +reference_temp_is_dest_class + +Is T1 a class type? +[dcl.init.ref]/5.4.1 + + + +reference_rval_conv_source_is_class->reference_temp_is_dest_class + + +No + + + +reference_rval_conv_is_converted_prval + +Is the converted initializer a prvalue? +[dcl.init.ref]/5.3 + + + +reference_rval_conv_bind_direct->reference_rval_conv_is_converted_prval + + + + + +reference_rval_conv_source_class_is_ref_related->reference_temp_is_dest_class + + +Yes + + + +reference_rval_conv_source_class_convertible_target + +Is the initializer convertible to an rvalue or function lvalue of type "cv3 T3" +where "cv1 T1" is reference-compatible with "cv3 T3"? + + + +reference_rval_conv_source_class_is_ref_related->reference_rval_conv_source_class_convertible_target + + +No + + + +reference_temp_is_related + +Is T1 reference-related to T2? +[dcl.init.ref]/5.4.1 + + + +reference_temp_is_dest_class->reference_temp_is_related + + +Yes + + + +reference_temp_is_source_class + +Is T2 a class type? +[dcl.init.ref]/5.4.1 + + + +reference_temp_is_dest_class->reference_temp_is_source_class + + +No + + + +reference_rval_conv_source_class_convertible_target->reference_temp_is_dest_class + + +No + + + +reference_rval_conv_bind_converted + +The converted initializer is the result of the conversion. +[dcl.init.ref]/5.3 + + + +reference_rval_conv_source_class_convertible_target->reference_rval_conv_bind_converted + + +Yes + + + +reference_rval_conv_bind_converted->reference_rval_conv_is_converted_prval + + + + + +reference_rval_conv_prval_adjust_type + +Its type T4 is adjusted to "cv1 T4". +[dcl.init.ref]/5.3 + + + +reference_rval_conv_is_converted_prval->reference_rval_conv_prval_adjust_type + + +Yes + + + +reference_rval_conv_bind_glval + +The destination reference is bound to the resulting glvalue. +[dcl.init.ref]/5.3 + + + +reference_rval_conv_is_converted_prval->reference_rval_conv_bind_glval + + +No + + + +reference_rval_conv_prval_materialize + +The prvalue is materialized. +[dcl.init.ref]/5.3 + + + +reference_rval_conv_prval_adjust_type->reference_rval_conv_prval_materialize + + + + + +reference_rval_conv_bind_glval__generated_done + +Done + + + +reference_rval_conv_bind_glval->reference_rval_conv_bind_glval__generated_done + + + + + +reference_rval_conv_prval_materialize->reference_rval_conv_bind_glval + + + + + +reference_temp_implicit_conv + +The initializer expression is implicitly converted to a prvalue of type "cv1 T1". +[dcl.init.ref]/5.4.2 + + + +reference_temp_is_related->reference_temp_implicit_conv + + +Yes + + + +reference_temp_user_defined_conv + +Consider user-defined conversions for the copy-initialization of an object of type "cv1 T1" by user-defined-conversion. +[dcl.init.ref]/5.4.1 + + + +reference_temp_is_related->reference_temp_user_defined_conv + + +No + + + +reference_temp_is_source_class->reference_temp_is_related + + +Yes + + + +reference_temp_is_source_class->reference_temp_implicit_conv + + +No + + + +reference_temp_implicit_conv_materialize + +The temporary is materialized. +[dcl.init.ref]/5.4.2 + + + +reference_temp_implicit_conv->reference_temp_implicit_conv_materialize + + + + + +reference_temp_user_defined_conv_is_ill_formed + +Would the non-reference copy-initialization be ill-formed? +[dcl.init.ref]/5.4.1 + + + +reference_temp_user_defined_conv->reference_temp_user_defined_conv_is_ill_formed + + + + + +reference_temp_user_defined_conv_ill_formed + +The program is ill-formed. + + + +reference_temp_user_defined_conv_is_ill_formed->reference_temp_user_defined_conv_ill_formed + + +Yes + + + +reference_temp_user_defined_conv_direct_initialize + +The result of the call to the conversion function, as described by non-reference copy-initialization, is used to direct-initialize the reference. For the direct-initialization, user-defined conversions are not considered. +[dcl.init.ref]/5.4.1 + + + +reference_temp_user_defined_conv_is_ill_formed->reference_temp_user_defined_conv_direct_initialize + + +No + + + +reference_temp_user_defined_conv_direct_initialize__generated_done + +Done + + + +reference_temp_user_defined_conv_direct_initialize->reference_temp_user_defined_conv_direct_initialize__generated_done + + + + + +reference_temp_implicit_conv_materialize_bind + +The reference is bound to the result. +[dcl.init.ref]/5.4.2 + + + +reference_temp_implicit_conv_materialize->reference_temp_implicit_conv_materialize_bind + + + + + +reference_temp_implicit_conv_materialize_is_reference_related + +Is T1 reference-related to T2? +[dcl.init.ref]/5.4 + + + +reference_temp_implicit_conv_materialize_bind->reference_temp_implicit_conv_materialize_is_reference_related + + + + + +reference_temp_implicit_conv_materialize_is_cv_okay + +Is cv1 at least as qualified as cv2? +[dcl.init.ref]/5.4.3 + + + +reference_temp_implicit_conv_materialize_is_reference_related->reference_temp_implicit_conv_materialize_is_cv_okay + + +Yes + + + +reference_temp_implicit_conv_materialize_is_reference_related__generated_done + +Done + + + +reference_temp_implicit_conv_materialize_is_reference_related->reference_temp_implicit_conv_materialize_is_reference_related__generated_done + + +No + + + +reference_temp_implicit_conv_materialize_is_dest_rval + +Is the destination an rvalue reference? +[dcl.init.ref]/5.4.3 + + + +reference_temp_implicit_conv_materialize_is_cv_okay->reference_temp_implicit_conv_materialize_is_dest_rval + + +Yes + + + +reference_temp_implicit_conv_materialize_cv_ill_formed + +The program is ill-formed. + + + +reference_temp_implicit_conv_materialize_is_cv_okay->reference_temp_implicit_conv_materialize_cv_ill_formed + + +No + + + +reference_temp_implicit_conv_materialize_is_source_lval + +Is the initializer an lvalue? +[dcl.init.ref]/5.4.4 + + + +reference_temp_implicit_conv_materialize_is_dest_rval->reference_temp_implicit_conv_materialize_is_source_lval + + +Yes + + + +reference_temp_implicit_conv_materialize_is_dest_rval__generated_done + +Done + + + +reference_temp_implicit_conv_materialize_is_dest_rval->reference_temp_implicit_conv_materialize_is_dest_rval__generated_done + + +No + + + +reference_temp_implicit_conv_materialize_is_source_lval__generated_ill_formed + +The program is ill-formed. + + + +reference_temp_implicit_conv_materialize_is_source_lval->reference_temp_implicit_conv_materialize_is_source_lval__generated_ill_formed + + +Yes + + + +reference_temp_implicit_conv_materialize_is_source_lval__generated_done + +Done + + + +reference_temp_implicit_conv_materialize_is_source_lval->reference_temp_implicit_conv_materialize_is_source_lval__generated_done + + +No + + + +value_has_dflt_ctor + +Does the type have a default constructor? +[dcl.init]/8.1.1 + + + +value_is_class->value_has_dflt_ctor + + +Yes + + + +value_is_array + +Is the type an array type? +[dcl.init]/8.2 + + + +value_is_class->value_is_array + + +No + + + +value_has_deleted_dflt_ctor + +Does the type have a deleted default constructor? +[dcl.init]/8.1.1 + + + +value_has_dflt_ctor->value_has_deleted_dflt_ctor + + +Yes + + + +value_default_initialize + +The object is default-initialized. +[dcl.init]/8.1.* + + + +value_has_dflt_ctor->value_default_initialize + + +No + + + +value_value_initialize_elements + +Each element is value-initialized. + + + +value_is_array->value_value_initialize_elements + + +Yes + + + +value_zero_initialize_fallback + +The object is zero-initialized. + + + +value_is_array->value_zero_initialize_fallback + + +No + + + +value_has_deleted_dflt_ctor->value_default_initialize + + +Yes + + + +value_has_user_dflt_ctor + +Does the type have a user-provided default constructor? +[dcl.init]/8.1.1 + + + +value_has_deleted_dflt_ctor->value_has_user_dflt_ctor + + +No + + + +value_default_initialize__generated_done + +Done + + + +value_default_initialize->value_default_initialize__generated_done + + + + + +value_has_user_dflt_ctor->value_default_initialize + + +Yes + + + +value_zero_initialize_class + +The object is zero-initialized. + + + +value_has_user_dflt_ctor->value_zero_initialize_class + + +No + + + +value_check_default + +The semantic constraints for default-initialization are checked. +[dcl.init]/8.1.2 + + + +value_zero_initialize_class->value_check_default + + + + + +value_has_nontrivial_dflt_ctor + +Does the type have a non-trivial default constructor? +[dcl.init]/8.1.2 + + + +value_check_default->value_has_nontrivial_dflt_ctor + + + + + +value_value_initialize_elements__generated_done + +Done + + + +value_value_initialize_elements->value_value_initialize_elements__generated_done + + + + + +value_zero_initialize_fallback__generated_done + +Done + + + +value_zero_initialize_fallback->value_zero_initialize_fallback__generated_done + + + + + +value_has_nontrivial_dflt_ctor->value_default_initialize + + +Yes + + + +value_has_nontrivial_dflt_ctor__generated_done + +Done + + + +value_has_nontrivial_dflt_ctor->value_has_nontrivial_dflt_ctor__generated_done + + +No + + + +list_designated_initalizer_is_aggregate + +Is the type an aggregate class? +[dcl.init.list]/3.1 + + + +list_has_designated_initializer->list_designated_initalizer_is_aggregate + + +Yes + + + +list_is_aggregate_class + +Is the type an aggregate class? +[dcl.init.list]/3.2 + + + +list_has_designated_initializer->list_is_aggregate_class + + +No + + + +list_designated_initializer_are_identifiers_valid + +Do the designators form a subsequence of the ordered idenitifiers in the direct non-static data members of the type? +[dcl.init.list]/3.1 + + + +list_designated_initalizer_is_aggregate->list_designated_initializer_are_identifiers_valid + + +Yes + + + +list_designated_initalizer_nonaggregate_ill_formed + +The program is ill-formed. + + + +list_designated_initalizer_is_aggregate->list_designated_initalizer_nonaggregate_ill_formed + + +No + + + +list_aggregate_is_list_singleton + +Does the initializer list have a single element? +[dcl.init.list]/3.2 + + + +list_is_aggregate_class->list_aggregate_is_list_singleton + + +Yes + + + +list_is_type_char_array + +Is the type a character array? +[dcl.init.list]/3.3 + + + +list_is_aggregate_class->list_is_type_char_array + + +No + + + +list_designated_initializer_aggregate_init + +Aggregate initialization is performed. +[dcl.init.list]/3.1 + + + +list_designated_initializer_are_identifiers_valid->list_designated_initializer_aggregate_init + + +Yes + + + +list_designated_initalizer_initializers_ill_formed + +The program is ill-formed. + + + +list_designated_initializer_are_identifiers_valid->list_designated_initalizer_initializers_ill_formed + + +No + + + +aggregate_initialization_head + +Aggregate initialization +[dcl.init.aggr] + + + +list_designated_initializer_aggregate_init->aggregate_initialization_head + + + + + +aggregate_determine_elements + +Determine the elements of the aggregate. +[dcl.init.aggr]/2 + + + +aggregate_initialization_head->aggregate_determine_elements + + + + + +list_aggregate_is_list_singleton->list_is_type_char_array + + +No + + + +list_aggregate_singleton_is_type_valid + +Does the sole element have type "cv U" +where U is the initialized type or a type derived of it? + + + +list_aggregate_is_list_singleton->list_aggregate_singleton_is_type_valid + + +Yes + + + +list_char_array_is_singleton + +Does the initializer list have a single element? +[dcl.init.list/]3.3 + + + +list_is_type_char_array->list_char_array_is_singleton + + +Yes + + + +list_is_aggregate + +Is the type an aggregate? +[dcl.init.list]/3.4 + + + +list_is_type_char_array->list_is_aggregate + + +No + + + +list_aggregate_singleton_is_type_valid->list_is_type_char_array + + +No + + + +list_aggregate_singleton_type_init_type + +What is the type of initialization? +[dcl.init.list]/3.2 + + + +list_aggregate_singleton_is_type_valid->list_aggregate_singleton_type_init_type + + +Yes + + + +list_aggregate_singleton_type_copy + +The object is copy-initialized from the sole element. +[dcl.init.list]/3.2 + + + +list_aggregate_singleton_type_init_type->list_aggregate_singleton_type_copy + + +copy-list-initialization + + + +list_aggregate_singleton_type_direct + +The object is direct-initialized from the sole element. +[dcl.init.list]/3.2 + + + +list_aggregate_singleton_type_init_type->list_aggregate_singleton_type_direct + + +direct-list-initialization + + + +list_aggregate_singleton_type_copy__generated_done + +Done + + + +list_aggregate_singleton_type_copy->list_aggregate_singleton_type_copy__generated_done + + + + + +list_aggregate_singleton_type_direct__generated_done + +Done + + + +list_aggregate_singleton_type_direct->list_aggregate_singleton_type_direct__generated_done + + + + + +list_char_array_is_singleton->list_is_aggregate + + +No + + + +list_char_array_singleton_is_typed + +Is that element an appropriately-typed string-literal? +[dcl.init.list]/3.3 + + + +list_char_array_is_singleton->list_char_array_singleton_is_typed + + +Yes + + + +list_aggregate_aggregate_initialization + +Aggregate initialization is performed. +[dcl.init.list]/3.4 + + + +list_is_aggregate->list_aggregate_aggregate_initialization + + +Yes + + + +list_is_list_empty + +Is the initializer list empty? +[dcl.init.list]/3.5 + + + +list_is_aggregate->list_is_list_empty + + +No + + + +list_char_array_singleton_is_typed->list_is_aggregate + + +No + + + +list_char_array_string_literal_init + +Initialization as in [dcl.init.string] +[dcl.init.list]/3.3 + + + +list_char_array_singleton_is_typed->list_char_array_string_literal_init + + +Yes + + + +list_char_array_string_literal_init->string_literal_initialization_head + + + + + +list_aggregate_aggregate_initialization->aggregate_initialization_head + + + + + +list_empty_is_class + +Is the destination type a class type? +[dcl.init.list]/3.5 + + + +list_is_list_empty->list_empty_is_class + + +Yes + + + +list_dest_is_initializer_list + +Is the type a specialization of std::initializer_list? +[dcl.init.list]/3.6 + + + +list_is_list_empty->list_dest_is_initializer_list + + +No + + + +list_empty_is_class->list_dest_is_initializer_list + + +No + + + +list_empty_has_default_constructor + +Does the class have a default constructor? +[dcl.init.list]/3.5 + + + +list_empty_is_class->list_empty_has_default_constructor + + +Yes + + + +list_initializer_list_init + +Initialized as follows: +[dcl.init.list]/5 + + + +list_dest_is_initializer_list->list_initializer_list_init + + +Yes + + + +list_is_class + +Is the type a class type? +[dcl.init.list]/3.7 + + + +list_dest_is_initializer_list->list_is_class + + +No + + + +list_empty_has_default_constructor->list_dest_is_initializer_list + + +No + + + +list_empty_value_initialize + +The object is value-initialized. +[dcl.init.list]/3.5 + + + +list_empty_has_default_constructor->list_empty_value_initialize + + +Yes + + + +list_empty_value_initialize__generated_done + +Done + + + +list_empty_value_initialize->list_empty_value_initialize__generated_done + + + + + +list_initializer_list_n_defn + +Let N be the number of elements in the initalizer list. + + + +list_initializer_list_init->list_initializer_list_n_defn + + + + + +list_class_ctors + +Constructors are considered, and the best match is selected through overload resolution. +[dcl.init.list]/3.7 + + + +list_is_class->list_class_ctors + + +Yes + + + +list_is_enum + +Is the type an enumeration? +[dcl.init.list]/3.8 + + + +list_is_class->list_is_enum + + +No + + + +list_initializer_list_materialize_array + +Where type is std::initializer_list<E>, a prvalue of type "array of N const E" is materialized. + + + +list_initializer_list_n_defn->list_initializer_list_materialize_array + + + + + +list_initializer_list_init_array + +Each element of the array is copy-initialized with the corresponding element of the initializer list. + + + +list_initializer_list_materialize_array->list_initializer_list_init_array + + + + + +list_initializer_list_is_narrowing + +Is a narrowing conversion required to initialize any of the elements? + + + +list_initializer_list_init_array->list_initializer_list_is_narrowing + + + + + +list_initializer_list_narrowing_ill_formed + +The program is ill-formed. + + + +list_initializer_list_is_narrowing->list_initializer_list_narrowing_ill_formed + + +Yes + + + +list_initializer_list_init_object + +The initializer_list is constructed to refer to the materialized array. + + + +list_initializer_list_is_narrowing->list_initializer_list_init_object + + +No + + + +list_initializer_list_init_object__generated_done + +Done + + + +list_initializer_list_init_object->list_initializer_list_init_object__generated_done + + + + + +list_class_is_narrowing + +Is a narrowing conversion required to convert any of the arguments? +[dcl.init.list]/3.7 + + + +list_class_ctors->list_class_is_narrowing + + + + + +list_enum_is_fixed + +Does the enumeration have fixed underlying type? +[dcl.init.list]/3.8 + + + +list_is_enum->list_enum_is_fixed + + +Yes + + + +list_final_is_singleton + +Does the initializer list have a single element? +[dcl.init.list]/3.9 + + + +list_is_enum->list_final_is_singleton + + +No + + + +list_class_is_narrowing__generated_ill_formed + +The program is ill-formed. + + + +list_class_is_narrowing->list_class_is_narrowing__generated_ill_formed + + +Yes + + + +list_class_is_narrowing__generated_done + +Done + + + +list_class_is_narrowing->list_class_is_narrowing__generated_done + + +No + + + +list_enum_is_fixed->list_final_is_singleton + + +No + + + +list_enum_underlying_defn + +Let U be the underlying type. +[dcl.init.list]/3.8 + + + +list_enum_is_fixed->list_enum_underlying_defn + + +Yes + + + +list_final_singleton_type_defn + +Let E be the type of that element. +[dcl.init.list]/3.9 + + + +list_final_is_singleton->list_final_singleton_type_defn + + +Yes + + + +list_ref_prvalue_is_ref + +Is the destination type a reference type? +[dcl.init.list]/3.10 + + + +list_final_is_singleton->list_ref_prvalue_is_ref + + +No + + + +list_enum_is_singleton + +Does the initializer list have a single element? +[dcl.init.list]/3.8 + + + +list_enum_underlying_defn->list_enum_is_singleton + + + + + +list_enum_is_singleton->list_final_is_singleton + + +No + + + +list_enum_elem_defn + +Let v be that element. +[dcl.init.list]/3.8 + + + +list_enum_is_singleton->list_enum_elem_defn + + +Yes + + + +list_enum_is_convertible + +Can v be implicitly converted to U? +[dcl.init.list]/3.8 + + + +list_enum_elem_defn->list_enum_is_convertible + + + + + +list_enum_is_convertible->list_final_is_singleton + + +No + + + +list_enum_is_direct + +Is the initialization direct-list-initialization? +[dcl.init.list]/3.8 + + + +list_enum_is_convertible->list_enum_is_direct + + +Yes + + + +list_enum_is_direct->list_final_is_singleton + + +No + + + +list_enum_is_narrowing + +Is a narrowing conversion required to convert v to U? +[dcl.init.list]/3.8 + + + +list_enum_is_direct->list_enum_is_narrowing + + +Yes + + + +list_enum_narrowing_ill_formed + +The program is ill-formed. + + + +list_enum_is_narrowing->list_enum_narrowing_ill_formed + + +Yes + + + +list_enum_initialization + +The object is initialized with the value T(u). + + + +list_enum_is_narrowing->list_enum_initialization + + +No + + + +list_enum_initialization__generated_done + +Done + + + +list_enum_initialization->list_enum_initialization__generated_done + + + + + +list_final_singleton_is_dest_ref + +Is the destination type a reference? +[dcl.init.list]/3.9 + + + +list_final_singleton_type_defn->list_final_singleton_is_dest_ref + + + + + +list_ref_prvalue_prvalue_generated + +A prvalue is generated. +[dcl.init.list]/3.10 + + + +list_ref_prvalue_is_ref->list_ref_prvalue_prvalue_generated + + +Yes + + + +list_final_is_empty + +Is the initializer list empty? +[dcl.init.list]/3.11 + + + +list_ref_prvalue_is_ref->list_final_is_empty + + +No + + + +list_final_singleton_is_dest_ref_related + +Is the destination types referenced type reference-related to E?' +[dcl.init.list]/3.9 + + + +list_final_singleton_is_dest_ref->list_final_singleton_is_dest_ref_related + + +Yes + + + +list_final_singleton_type + +What is the type of initialization? +[dcl.init.list]/3.9 + + + +list_final_singleton_is_dest_ref->list_final_singleton_type + + +No + + + +list_final_singleton_is_dest_ref_related->list_ref_prvalue_is_ref + + +No + + + +list_final_singleton_is_dest_ref_related->list_final_singleton_type + + +Yes + + + +list_final_singleton_direct + +The destination is initialized by direct-initialization from the element. +[dcl.init.list]/3.9 + + + +list_final_singleton_type->list_final_singleton_direct + + +direct-list-initialization + + + +list_final_singleton_copy + +The destination is initialized by copy-initialization from the element. +[dcl.init.list]/3.9 + + + +list_final_singleton_type->list_final_singleton_copy + + +copy-list-initialization + + + +list_final_singleton_is_narrowing + +Is a narrowing conversion required to convert the element to the destination type? +[dcl.init.list]/3.9 + + + +list_final_singleton_direct->list_final_singleton_is_narrowing + + + + + +list_final_singleton_copy->list_final_singleton_is_narrowing + + + + + +list_final_singleton_is_narrowing__generated_ill_formed + +The program is ill-formed. + + + +list_final_singleton_is_narrowing->list_final_singleton_is_narrowing__generated_ill_formed + + +Yes + + + +list_final_singleton_is_narrowing__generated_done + +Done + + + +list_final_singleton_is_narrowing->list_final_singleton_is_narrowing__generated_done + + +No + + + +list_ref_prvalue_type_is_unknown_bound + +Is the destination type an array of unknown bound? +[dcl.init.list]/3.10 + + + +list_ref_prvalue_prvalue_generated->list_ref_prvalue_type_is_unknown_bound + + + + + +list_final_empty_value_init + +The object is value-initialized. +[dcl.init.list]/3.12 + + + +list_final_is_empty->list_final_empty_value_init + + +Yes + + + +list_nothing_else_ill_formed + +The program is ill-formed. + + + +list_final_is_empty->list_nothing_else_ill_formed + + +No + + + +list_ref_prvalue_type_unknown_bound + +The type of the prvalue is the type of x in U x[] H, where H is the initializer list. +[dcl.init.list]/3.10 + + + +list_ref_prvalue_type_is_unknown_bound->list_ref_prvalue_type_unknown_bound + + +Yes + + + +list_ref_prvalue_type_normal + +The type of the prvalue is the type referenced by the destination type. +[dcl.init.list]/3.10 + + + +list_ref_prvalue_type_is_unknown_bound->list_ref_prvalue_type_normal + + +No + + + +list_ref_prvalue_init_prvalue + +The prvalue initializes a result object by copy-list-initialization. +[dcl.init.list]/3.10 + + + +list_ref_prvalue_type_unknown_bound->list_ref_prvalue_init_prvalue + + + + + +list_ref_prvalue_type_normal->list_ref_prvalue_init_prvalue + + + + + +list_ref_prvalue_init_ref + +The reference is direct-initialized by the prvalue. +[dcl.init.list]/3.10 + + + +list_ref_prvalue_init_prvalue->list_ref_prvalue_init_ref + + + + + +list_ref_prvalue_init_ref__generated_done + +Done + + + +list_ref_prvalue_init_ref->list_ref_prvalue_init_ref__generated_done + + + + + +list_final_empty_value_init__generated_done + +Done + + + +list_final_empty_value_init->list_final_empty_value_init__generated_done + + + + + +aggregate_elements_type + +What is the type of the aggregate? +[dcl.init.aggr]/2 + + + +aggregate_determine_elements->aggregate_elements_type + + + + + +aggregate_elements_array + +The elements are the array elements in increasing subscript order. +[dcl.init.aggr]/2.1 + + + +aggregate_elements_type->aggregate_elements_array + + +an array type + + + +aggregate_elements_class + +The elements are the direct base classes in declaration order, followed by the direct non-static data members that are not members of an anonymous union, in declaration order. +[dcl.init.aggr]/2.2 + + + +aggregate_elements_type->aggregate_elements_class + + +a class type + + + +aggregate_determine_explicit_init_elems + +Determine the explicitly initialized elements +[dcl.init.aggr]/3 + + + +aggregate_elements_array->aggregate_determine_explicit_init_elems + + + + + +aggregate_elements_class->aggregate_determine_explicit_init_elems + + + + + +aggregate_explicit_is_designated + +Is the initializer list a designated-initializer-list? +[dcl.init.aggr]/3.1 + + + +aggregate_determine_explicit_init_elems->aggregate_explicit_is_designated + + + + + +aggregate_explicit_desginated_is_class + +Is the aggregate of class type? +[dcl.init.aggr]/3.1 + + + +aggregate_explicit_is_designated->aggregate_explicit_desginated_is_class + + +Yes + + + +aggregate_explicit_is_init_list + +Is the initializer list an initializer-list (i.e. does it have at least one element)? +[dcl.init.aggr]/3.2 + + + +aggregate_explicit_is_designated->aggregate_explicit_is_init_list + + +No + + + +aggregate_explicit_designated_are_designators_valid + +Does each designators identifier name a direct non-static data member of that class? +[dcl.init.aggr]/3.1 + + + +aggregate_explicit_desginated_is_class->aggregate_explicit_designated_are_designators_valid + + +Yes + + + +aggregate_explicit_desginated_is_class__generated_ill_formed + +The program is ill-formed. + + + +aggregate_explicit_desginated_is_class->aggregate_explicit_desginated_is_class__generated_ill_formed + + +No + + + +aggregate_explicit_init_list + +The explicitly initialized elements are the first elements of the aggregate, matching the number in the initializer list. +[dcl.init.aggr]/3.2 + + + +aggregate_explicit_is_init_list->aggregate_explicit_init_list + + +Yes + + + +aggregate_explicit_empty + +The initializer list is "{}", and there are no explicitly initialized elements. +[dcl.init.aggr]/3.3 + + + +aggregate_explicit_is_init_list->aggregate_explicit_empty + + +No + + + +aggregate_explicit_desginated + +The explicitly initialized elements are those named by the designator's initializers (or those that contain the named elements) +[dcl.init.aggr]/3.1 + + + +aggregate_explicit_designated_are_designators_valid->aggregate_explicit_desginated + + +Yes + + + +aggregate_explicit_designated_are_designators_valid__generated_ill_formed + +The program is ill-formed. + + + +aggregate_explicit_designated_are_designators_valid->aggregate_explicit_designated_are_designators_valid__generated_ill_formed + + +No + + + +aggregate_explicit_is_union + +Is the aggregate a union? +[dcl.init.aggr]/19 + + + +aggregate_explicit_desginated->aggregate_explicit_is_union + + + + + +aggregate_explicit_list_union_is_excess_explicit_init + +Is there more than one explicitly initialized element? +[dcl.init.aggr]/19 + + + +aggregate_explicit_is_union->aggregate_explicit_list_union_is_excess_explicit_init + + +Yes + + + +aggregate_initialize_explicit + +The explicitly initialized elements are initialized as follows: +[dcl.init.aggr]/4 + + + +aggregate_explicit_is_union->aggregate_initialize_explicit + + +No + + + +aggregate_explicit_init_list->aggregate_explicit_is_union + + + + + +aggregate_explicit_empty->aggregate_explicit_is_union + + + + + +aggregate_explicit_list_union_is_excess_explicit_init->aggregate_initialize_explicit + + +No + + + +aggregate_explicit_list_union_is_excess_explicit_init__generated_ill_formed + +The program is ill-formed. + + + +aggregate_explicit_list_union_is_excess_explicit_init->aggregate_explicit_list_union_is_excess_explicit_init__generated_ill_formed + + +Yes + + + +aggregate_initialize_explicit_foreach + +For each explicitly initialized element... +[dcl.init.aggr]/4 + + + +aggregate_initialize_explicit->aggregate_initialize_explicit_foreach + + + + + +aggregate_initialize_explicit_is_anon_union + +Is the element an anonymous union object? +[dcl.init.aggr]/4.1 + + + +aggregate_initialize_explicit_foreach->aggregate_initialize_explicit_is_anon_union + + + + + +aggregate_initialize_explicit_union_is_designated + +Is the initializer-list a designated-initializer-list? +[dcl.init.aggr]/4.1 + + + +aggregate_initialize_explicit_is_anon_union->aggregate_initialize_explicit_union_is_designated + + +Yes + + + +aggregate_initialize_explicit_copy_kind + +What is the kind of brace initializer? +[dcl.init.aggr]/4.2 + + + +aggregate_initialize_explicit_is_anon_union->aggregate_initialize_explicit_copy_kind + + +No + + + +aggregate_initialize_explicit_union_is_designated->aggregate_initialize_explicit_copy_kind + + +No + + + +aggregate_initialize_explicit_union_is_duplicate_designator + +Is there more than one designator that names a member of that anonymous union? +[dcl.init.aggr]/4.1 + + + +aggregate_initialize_explicit_union_is_designated->aggregate_initialize_explicit_union_is_duplicate_designator + + +Yes + + + +aggregate_initialize_explicit_copy_init_list + +The element is copy-initialized from the corresponding initializer-clause. +[dcl.init.aggr]/4.2 + + + +aggregate_initialize_explicit_copy_kind->aggregate_initialize_explicit_copy_init_list + + +initializer-list + + + +aggregate_initialize_explicit_copy_designated + +The element is initialized with the brace-or-equal initializer of the corresponding designated-initializer-clause. +[dcl.init.aggr]/4.2 + + + +aggregate_initialize_explicit_copy_kind->aggregate_initialize_explicit_copy_designated + + +designated-initializer-list + + + +aggregate_initialize_explicit_union_is_duplicate_designator__generated_ill_formed + +The program is ill-formed. + + + +aggregate_initialize_explicit_union_is_duplicate_designator->aggregate_initialize_explicit_union_is_duplicate_designator__generated_ill_formed + + +Yes + + + +aggregate_initialize_explicit_union_init + +The anonymous union object is initialized by { D }, where D is the designated-initializer-clause naming a member of the anonymous union object. + + + +aggregate_initialize_explicit_union_is_duplicate_designator->aggregate_initialize_explicit_union_init + + +No + + + +aggregate_initialize_explicit_repeat_next + +Repeat with the next explicitly initialized element. + + + +aggregate_initialize_explicit_union_init->aggregate_initialize_explicit_repeat_next + + + + + +aggregate_initialize_nonexplicit_is_union + +Is the aggregate a union? +[dcl.init.aggr]/5 + + + +aggregate_initialize_explicit_repeat_next->aggregate_initialize_nonexplicit_is_union + + +Once done with all explicitly initialized elements + + + +aggregate_initialize_explicit_is_narrowing_checked + +Is the initializer of the form "assignment-expression" or "= assignment-expression"? +[dcl.init.aggr]/4.2 + + + +aggregate_initialize_explicit_copy_init_list->aggregate_initialize_explicit_is_narrowing_checked + + + + + +aggregate_initialize_explicit_copy_designated->aggregate_initialize_explicit_is_narrowing_checked + + + + + +aggregate_initialize_explicit_is_narrowing_checked->aggregate_initialize_explicit_repeat_next + + +No + + + +aggregate_initialize_explicit_is_narrowing + +Is a narrowing conversion required to convert the expression? +[dcl.init.aggr]/4.2 + + + +aggregate_initialize_explicit_is_narrowing_checked->aggregate_initialize_explicit_is_narrowing + + +Yes + + + +aggregate_initialize_explicit_is_narrowing->aggregate_initialize_explicit_repeat_next + + +No + + + +aggregate_initialize_explicit_is_narrowing__generated_ill_formed + +The program is ill-formed. + + + +aggregate_initialize_explicit_is_narrowing->aggregate_initialize_explicit_is_narrowing__generated_ill_formed + + +Yes + + + +aggregate_initialize_nonexplicit_union_is_list_empty + +Is the initializer list empty? +[dcl.init.aggr]/5 + + + +aggregate_initialize_nonexplicit_is_union->aggregate_initialize_nonexplicit_union_is_list_empty + + +Yes + + + +aggregate_initialize_nonexplicit_nonunion + +For each non-explicitly-initialized element: +[dcl.init.aggr]/5 + + + +aggregate_initialize_nonexplicit_is_union->aggregate_initialize_nonexplicit_nonunion + + +No + + + +aggregate_initialize_nonexplicit_union_empty_has_dflt + +Does any variant member of the union have a default member initializer? +[dcl.init.aggr]/5.4 + + + +aggregate_initialize_nonexplicit_union_is_list_empty->aggregate_initialize_nonexplicit_union_empty_has_dflt + + +Yes + + + +aggregate_initialize_nonexplicit_union_is_list_empty__generated_done + +Done + + + +aggregate_initialize_nonexplicit_union_is_list_empty->aggregate_initialize_nonexplicit_union_is_list_empty__generated_done + + +No + + + +aggregate_initialize_nonexplicit_nonunion_has_dflt_mem_init + +Does the element have a default member initializer? +[dcl.init.aggr]/5.1 + + + +aggregate_initialize_nonexplicit_nonunion->aggregate_initialize_nonexplicit_nonunion_has_dflt_mem_init + + + + + +aggregate_initialize_nonexplicit_nonunion_dflt_mem_init + +The element is initialized from that initializer. +[dcl.init.aggr]/5.1 + + + +aggregate_initialize_nonexplicit_nonunion_has_dflt_mem_init->aggregate_initialize_nonexplicit_nonunion_dflt_mem_init + + +Yes + + + +aggregate_initialize_nonexplicit_nonunion_is_reference + +Is the element a reference? +[dcl.init.aggr]/5.2 + + + +aggregate_initialize_nonexplicit_nonunion_has_dflt_mem_init->aggregate_initialize_nonexplicit_nonunion_is_reference + + +No + + + +aggregate_initialize_nonexplicit_nonunion_repeat_next + +Repeat with the next non-explicitly-initialized element. + + + +aggregate_initialize_nonexplicit_nonunion_dflt_mem_init->aggregate_initialize_nonexplicit_nonunion_repeat_next + + + + + +aggregate_initialize_nonexplicit_nonunion_copy_init + +The element is copy-initialized from an empty initializer list. +[dcl.init.aggr]/5.2 + + + +aggregate_initialize_nonexplicit_nonunion_is_reference->aggregate_initialize_nonexplicit_nonunion_copy_init + + +No + + + +aggregate_initialize_nonexplicit_nonunion_is_reference__generated_ill_formed + +The program is ill-formed. + + + +aggregate_initialize_nonexplicit_nonunion_is_reference->aggregate_initialize_nonexplicit_nonunion_is_reference__generated_ill_formed + + +Yes + + + +aggregate_initialize_nonexplicit_nonunion_repeat_next__generated_done + +Done + + + +aggregate_initialize_nonexplicit_nonunion_repeat_next->aggregate_initialize_nonexplicit_nonunion_repeat_next__generated_done + + +Once done with all explicitly initialized elements + + + +aggregate_initialize_nonexplicit_nonunion_copy_init->aggregate_initialize_nonexplicit_nonunion_repeat_next + + + + + +aggregate_initialize_nonexplicit_union_dflt_mem + +That member is initialized from its default member initializer. +[dcl.init.aggr]/5.4 + + + +aggregate_initialize_nonexplicit_union_empty_has_dflt->aggregate_initialize_nonexplicit_union_dflt_mem + + +Yes + + + +aggregate_initialize_nonexplicit_union_first_mem + +The first member of the union (if any) is copy-initialized from an empty initializer list. +[dcl.init.aggr]/5.5 + + + +aggregate_initialize_nonexplicit_union_empty_has_dflt->aggregate_initialize_nonexplicit_union_first_mem + + +No + + + +aggregate_initialize_nonexplicit_union_dflt_mem__generated_done + +Done + + + +aggregate_initialize_nonexplicit_union_dflt_mem->aggregate_initialize_nonexplicit_union_dflt_mem__generated_done + + + + + +aggregate_initialize_nonexplicit_union_first_mem__generated_done + +Done + + + +aggregate_initialize_nonexplicit_union_first_mem->aggregate_initialize_nonexplicit_union_first_mem__generated_done + + + + + diff --git a/std-2023/initialization.png b/std-2023/initialization.png new file mode 100644 index 0000000..95130d7 Binary files /dev/null and b/std-2023/initialization.png differ diff --git a/std-2023/initialization.svg b/std-2023/initialization.svg new file mode 100644 index 0000000..0c4c601 --- /dev/null +++ b/std-2023/initialization.svg @@ -0,0 +1,5910 @@ + + + + + + +initialization + + +cluster_is_const_default_constructible + + + +cluster_default_initialization + + + +cluster_zero_initialization + + + +cluster_value_initialization + + + +cluster_string_literal_initialization + + + +cluster_reference_initialization + + + +cluster_aggregate_initialization + + + + +cdc_head + +To determine if class type T is const-default-constructible: +[dcl.init.general/8] + + + +cdc_would_invoke_user_provided + +Would default-initialization of T invoke a user-provided constructor of +T (not inherited from a base class)? +[dcl.init.general/8] + + + +cdc_head->cdc_would_invoke_user_provided + + + + + +default_initialization_head + +Default-initialization +[dcl.init.general]/7 + + + +default_is_reference + +Is the destination a reference? +[dcl.init.general]/10 + + + +default_initialization_head->default_is_reference + + + + + +__local_ill_formed_0 + +The program is ill-formed. + + + +default_is_reference->__local_ill_formed_0 + + +Yes + + + +default_defn_t + +Let the type of the object be T. +[dcl.init.general]/7 + + + +default_is_reference->default_defn_t + + +No + + + +default_is_const + +Is T const-qualified? +[dcl.init.general]/8 + + + +default_defn_t->default_is_const + + + + + +default_const_is_class + +Is T a class type? +[dcl.init.general]/8 + + + +default_is_const->default_const_is_class + + +Yes + + + +default_is_class + +Is T a (possibly cv-qualified) class type? +[dcl.init.general]/7.1 + + + +default_is_const->default_is_class + + +No + + + +default_const_class_is_cdc + +Is T const-default-constructible +[dcl.init.general]/8 + + + +default_const_is_class->default_const_class_is_cdc + + +Yes + + + +default_const_is_array + +Is T an array type? +[dcl.init.general]/8 + + + +default_const_is_class->default_const_is_array + + +No + + + +default_class_enumerate + +Enumerate the applicable constructors. +[dcl.init.general]/7.1 + + + +default_is_class->default_class_enumerate + + +Yes + + + +default_is_array + +Is T an array type? +[dcl.init.general]/7.2 + + + +default_is_class->default_is_array + + +No + + + +default_const_class_is_cdc->cdc_head + + + + + +default_const_class_is_cdc->default_is_class + + +Yes + + + +__local_ill_formed_1 + +The program is ill-formed. + + + +default_const_class_is_cdc->__local_ill_formed_1 + + +No + + + +default_const_array_element_is_class + +Is T's element type a class type? +[dcl.init.general]/8 + + + +default_const_is_array->default_const_array_element_is_class + + +Yes + + + +__local_ill_formed_2 + +The program is ill-formed. + + + +default_const_is_array->__local_ill_formed_2 + + +No + + + +default_const_array_element_class_is_cdc + +Is that class type const-default-constructible? +[dcl.init.general]/8 + + + +default_const_array_element_is_class->default_const_array_element_class_is_cdc + + +Yes + + + +__local_ill_formed_3 + +The program is ill-formed. + + + +default_const_array_element_is_class->__local_ill_formed_3 + + +No + + + +default_const_array_element_class_is_cdc->cdc_head + + + + + +default_const_array_element_class_is_cdc->default_is_class + + +Yes + + + +__local_ill_formed_4 + +The program is ill-formed. + + + +default_const_array_element_class_is_cdc->__local_ill_formed_4 + + +No + + + +default_class_select + +Select the best constructor for the initializer "()". +[dcl.init.general]/7.1 + + + +default_class_enumerate->default_class_select + + + + + +default_array_init + +Default-initialize each element of the array. +[dcl.init.general]/7.2 + + + +default_is_array->default_array_init + + +Yes + + + +default_no_init + +No initialization is performed. +[dcl.init.general]/7.3 + + + +default_is_array->default_no_init + + +No + + + +default_class_init + +Call the selected constructor with an empty argument list to initialize +the object +[dcl.init.general]/7.1 + + + +default_class_select->default_class_init + + + + + +__local_done_5 + +Done. + + + +default_class_init->__local_done_5 + + + + + +default_array_init->default_initialization_head + + + + + +__local_done_6 + +Done. + + + +default_array_init->__local_done_6 + + + + + +__local_done_7 + +Done. + + + +default_no_init->__local_done_7 + + + + + +__local_yes_8 + +T is const-default-constructible. + + + +cdc_would_invoke_user_provided->__local_yes_8 + + +Yes + + + +cdc_base_is_cdc + +Is each potentially constructed base class of T +const-default-constructible? +[dcl.init.general]/8.4 + + + +cdc_would_invoke_user_provided->cdc_base_is_cdc + + +No + + + +cdc_member_each + +For each direct non-variant non-static data member M of T: +[dcl.init.general]/8.1 + + + +cdc_base_is_cdc->cdc_member_each + + +Yes + + + +__local_no_9 + +T is not const-default-constructible. + + + +cdc_base_is_cdc->__local_no_9 + + +No + + + +cdc_member_has_default + +Does M have a default member initializer? + + + +cdc_member_each->cdc_member_has_default + + + + + +cdc_member_repeat + +Repeat with the next non-static data member. + + + +cdc_member_has_default->cdc_member_repeat + + +Yes + + + +cdc_member_is_class + +Does M have class type? + + + +cdc_member_has_default->cdc_member_is_class + + +No + + + +cdc_member_repeat->cdc_member_each + + + + + +cdc_is_union + +Is T a union? +[dcl.init.general]/8.2-3 + + + +cdc_member_repeat->cdc_is_union + + +Once done with all non-static data members + + + +cdc_member_class_defn_x + +Let X be that class type. + + + +cdc_member_is_class->cdc_member_class_defn_x + + +Yes + + + +cdc_member_is_array_of_class + +Does M have array of class type? + + + +cdc_member_is_class->cdc_member_is_array_of_class + + +No + + + +cdc_member_x_is_cdc + +Is X const-default-constructible? + + + +cdc_member_class_defn_x->cdc_member_x_is_cdc + + + + + +cdc_member_array_defn_x + +Let X be the element (class) type. + + + +cdc_member_is_array_of_class->cdc_member_array_defn_x + + +Yes + + + +__local_no_10 + +T is not const-default-constructible. + + + +cdc_member_is_array_of_class->__local_no_10 + + +No + + + +cdc_member_array_defn_x->cdc_member_x_is_cdc + + + + + +cdc_member_x_is_cdc->cdc_head + + + + + +cdc_member_x_is_cdc->cdc_member_repeat + + +Yes + + + +__local_no_11 + +T is not const-default-constructible. + + + +cdc_member_x_is_cdc->__local_no_11 + + +No + + + +cdc_union_has_nsdm + +Does T have at least one non-static data member? +[dcl.init.general]/8.2 + + + +cdc_is_union->cdc_union_has_nsdm + + +Yes + + + +cdc_nonunion_anon_union_each + +For each anonymous union member of T: +[dcl.init.general]/8.3 + + + +cdc_is_union->cdc_nonunion_anon_union_each + + +No + + + +cdc_union_has_one_init_nsdm + +Does exactly one variant member of T have a default member initializer? +[dcl.init.general]/8.2 + + + +cdc_union_has_nsdm->cdc_union_has_one_init_nsdm + + +Yes + + + +__local_yes_12 + +T is const-default-constructible. + + + +cdc_union_has_nsdm->__local_yes_12 + + +No + + + +cdc_nonunion_anon_union_has_nsdm + +Does that anonymous union member have at least one non-static data +member? + + + +cdc_nonunion_anon_union_each->cdc_nonunion_anon_union_has_nsdm + + + + + +__local_yes_13 + +T is const-default-constructible. + + + +cdc_union_has_one_init_nsdm->__local_yes_13 + + +Yes + + + +__local_no_14 + +T is not const-default-constructible. + + + +cdc_union_has_one_init_nsdm->__local_no_14 + + +No + + + +cdc_nonunion_anon_union_one_init_nsdm + +Does exactly one non-static data member of that anonymous union member +have a default member initializer? + + + +cdc_nonunion_anon_union_has_nsdm->cdc_nonunion_anon_union_one_init_nsdm + + +Yes + + + +cdc_nonunion_anon_union_repeat + +Repeat with the next anonymous data member. + + + +cdc_nonunion_anon_union_has_nsdm->cdc_nonunion_anon_union_repeat + + +No + + + +cdc_nonunion_anon_union_one_init_nsdm->cdc_nonunion_anon_union_repeat + + +Yes + + + +__local_no_15 + +T is not const-default-constructible. + + + +cdc_nonunion_anon_union_one_init_nsdm->__local_no_15 + + +No + + + +cdc_nonunion_anon_union_repeat->cdc_nonunion_anon_union_each + + + + + +__local_yes_16 + +T is const-default-constructible. + + + +cdc_nonunion_anon_union_repeat->__local_yes_16 + + +Once done with all anonymous union members + + + +zero_initialization_head + +Zero-initialization +[dcl.init.general]/6 + + + +zero_defn_t + +Let the type of the object or reference be T. +[dcl.init.general]/6 + + + +zero_initialization_head->zero_defn_t + + + + + +zero_is_scalar + +Is T a scalar type? +[dcl.init.general]/6.1 + + + +zero_defn_t->zero_is_scalar + + + + + +zero_scalar_init + +Initialize the object to the value obtained by converting the literal 0 +to T. +[dcl.init.general]/6.1 + + + +zero_is_scalar->zero_scalar_init + + +Yes + + + +zero_is_class + +Is T a class type? +[dcl.init.general]/6.2 + + + +zero_is_scalar->zero_is_class + + +No + + + +__local_done_17 + +Done. + + + +zero_scalar_init->__local_done_17 + + + + + +zero_is_union + +Is T a union type? +[dcl.init.general]/6.2-3 + + + +zero_is_class->zero_is_union + + +Yes + + + +zero_is_array + +Is T an array type? +[dcl.init.general]/6.4 + + + +zero_is_class->zero_is_array + + +No + + + +zero_union_padding + +Initialize the object's padding bits to zero bits. +[dcl.init.general]/6.3 + + + +zero_is_union->zero_union_padding + + +Yes + + + +zero_class_padding + +Initialize the object's padding bits to zero bits. +[dcl.init.general]/6.2 + + + +zero_is_union->zero_class_padding + + +No + + + +zero_array_elements + +Zero-initialize each element. +[dcl.init.general]/6.4 + + + +zero_is_array->zero_array_elements + + +Yes + + + +zero_is_reference + +Is T a reference type? +[dcl.init.general]/6.5 + + + +zero_is_array->zero_is_reference + + +No + + + +zero_union_first_nsdm + +Zero-nitialize the object's first non-static named data member. + + + +zero_union_padding->zero_union_first_nsdm + + + + + +zero_class_members + +Zero-initialize each of the object's non-static data members. +[dcl.init.general]/6.2 + + + +zero_class_padding->zero_class_members + + + + + +zero_class_members->zero_initialization_head + + + + + +zero_class_bases + +Zero-initialize each of the object's non-virtual base class subobjects. +[dcl.init.general]/6.2 + + + +zero_class_members->zero_class_bases + + + + + +zero_class_bases->zero_initialization_head + + + + + +zero_class_is_base_subobject + +Is the object a base class subobject? +[dcl.init.general]/6.2 + + + +zero_class_bases->zero_class_is_base_subobject + + + + + +zero_class_virtual_bases + +Zero-initialize each of the object's virtual base class subobjects. +[dcl.init.general]/6.2 + + + +zero_class_is_base_subobject->zero_class_virtual_bases + + +Yes + + + +__local_done_18 + +Done. + + + +zero_class_is_base_subobject->__local_done_18 + + +No + + + +zero_class_virtual_bases->zero_initialization_head + + + + + +__local_done_19 + +Done. + + + +zero_class_virtual_bases->__local_done_19 + + + + + +zero_union_first_nsdm->zero_initialization_head + + + + + +__local_done_20 + +Done. + + + +zero_union_first_nsdm->__local_done_20 + + + + + +zero_array_elements->zero_initialization_head + + + + + +__local_done_21 + +Done. + + + +zero_array_elements->__local_done_21 + + + + + +zero_reference_no_init + +No initialization is performed. +[dcl.init.general]/6.5 + + + +zero_is_reference->zero_reference_no_init + + +Yes + + + +__local_done_22 + +Done. + + + +zero_is_reference->__local_done_22 + + +No + + + +value_initialization_head + +Value-initialization +[dcl.init.general]/9 + + + +value_is_reference + +Is the destination a reference? +[dcl.init.general]/10 + + + +value_initialization_head->value_is_reference + + + + + +__local_ill_formed_23 + +The program is ill-formed. + + + +value_is_reference->__local_ill_formed_23 + + +Yes + + + +value_defn_t + +Let T be the type of the object. +[dcl.init.general]/9 + + + +value_is_reference->value_defn_t + + +No + + + +value_is_class + +Is the type a (possibly cv-qualified) class type? +[dcl.init.general]/9.1 + + + +value_defn_t->value_is_class + + + + + +value_class_has_default + +Does T have a default constructor? +[dcl.init.general]/9.1 + + + +value_is_class->value_class_has_default + + +Yes + + + +value_is_array + +Is the type an array type? +[dcl.init.general]/9.2 + + + +value_is_class->value_is_array + + +No + + + +value_class_default_is_deleted + +Does T have a default constructor that is deleted? +[dcl.init.general]/9.1 + + + +value_class_has_default->value_class_default_is_deleted + + +Yes + + + +value_class_direct_default_init + +Default-initialize the object. +[dcl.init.general]/9.1 + + + +value_class_has_default->value_class_direct_default_init + + +No + + + +value_array_initialize_elements + +Value-initialize each element of the array. +[dcl.init.general]/9.2 + + + +value_is_array->value_array_initialize_elements + + +Yes + + + +value_zero_initialize_fallback + +Zero-initialize the object. +[dcl.init.general]/9.3 + + + +value_is_array->value_zero_initialize_fallback + + +No + + + +value_class_default_is_deleted->value_class_direct_default_init + + +Yes + + + +value_class_default_is_user_provided + +Does T have a default constructor that is user-provided? +[dcl.init.general]/9.1 + + + +value_class_default_is_deleted->value_class_default_is_user_provided + + +No + + + +value_class_direct_default_init->default_initialization_head + + + + + +value_class_default_is_user_provided->value_class_direct_default_init + + +Yes + + + +value_class_dflt_ctor_check_zero + +Check the semantic constraints for default-initialization. +[dcl.init.general]/9.1 + + + +value_class_default_is_user_provided->value_class_dflt_ctor_check_zero + + +No + + + +value_class_dflt_ctor_zero_init + +Zero-initialize the object. +[dcl.init.general]/9.1 + + + +value_class_dflt_ctor_check_zero->value_class_dflt_ctor_zero_init + + + + + +value_class_dflt_ctor_zero_init->zero_initialization_head + + + + + +value_class_dflt_ctor_default_init + +Default-initialize the object. +[dcl.init.general]/9.1 + + + +value_class_dflt_ctor_zero_init->value_class_dflt_ctor_default_init + + + + + +value_class_dflt_ctor_default_init->default_initialization_head + + + + + +value_array_initialize_elements->value_initialization_head + + + + + +__local_done_24 + +Done. + + + +value_array_initialize_elements->__local_done_24 + + + + + +value_zero_initialize_fallback->zero_initialization_head + + + + + +string_literal_initialization_head + +Initialization as follows: +[dcl.init.string] + + + +string_literal_verify_kind + +Verify array element type and literal type match. + + + +string_literal_initialization_head->string_literal_verify_kind + + + + + +string_literal_kind_char + +char / ordinary literal + + + +string_literal_verify_kind->string_literal_kind_char + + + + + +string_literal_kind_uchar + +unsigned char / ordinary literal + + + +string_literal_verify_kind->string_literal_kind_uchar + + + + + +string_literal_kind_schar + +signed char / ordinary literal + + + +string_literal_verify_kind->string_literal_kind_schar + + + + + +string_literal_kind_char8 + +char8_t / UTF-8 literal + + + +string_literal_verify_kind->string_literal_kind_char8 + + + + + +string_literal_kind_utf8_char + +char / UTF-8 literal + + + +string_literal_verify_kind->string_literal_kind_utf8_char + + + + + +string_literal_kind_utf8_uchar + +unsigned char / UTF-8 literal + + + +string_literal_verify_kind->string_literal_kind_utf8_uchar + + + + + +string_literal_kind_char16 + +char16_t / UTF-16 literal + + + +string_literal_verify_kind->string_literal_kind_char16 + + + + + +string_literal_kind_char32 + +char32_t / UTF-32 literal + + + +string_literal_verify_kind->string_literal_kind_char32 + + + + + +string_literal_kind_wchar + +wchar_t / wide literal + + + +string_literal_verify_kind->string_literal_kind_wchar + + + + + +string_literal_kind_other + +Anything else + + + +string_literal_verify_kind->string_literal_kind_other + + + + + + +string_literal_initialize_first + +Initialize the first elements of the array with successive values from +the string literal. + + + +string_literal_kind_char->string_literal_initialize_first + + + + + + +string_literal_kind_uchar->string_literal_initialize_first + + + + + + +string_literal_kind_schar->string_literal_initialize_first + + + + + + +string_literal_kind_char8->string_literal_initialize_first + + + + + + +string_literal_kind_utf8_char->string_literal_initialize_first + + + + + + +string_literal_kind_utf8_uchar->string_literal_initialize_first + + + + + + +string_literal_kind_char16->string_literal_initialize_first + + + + + + +string_literal_kind_char32->string_literal_initialize_first + + + + + + +string_literal_kind_wchar->string_literal_initialize_first + + + + + +__local_ill_formed_25 + +The program is ill-formed. + + + +string_literal_kind_other->__local_ill_formed_25 + + + + + +string_literal_has_too_many + +Are there more initializers than array elements? + + + +string_literal_initialize_first->string_literal_has_too_many + + + + + +__local_ill_formed_26 + +The program is ill-formed. + + + +string_literal_has_too_many->__local_ill_formed_26 + + +Yes + + + +string_literal_initialize_rest + +Zero-initialize the remaining elements of the array (if any). + + + +string_literal_has_too_many->string_literal_initialize_rest + + +No + + + +string_literal_initialize_rest->zero_initialization_head + + + + + +__local_done_27 + +Done. + + + +string_literal_initialize_rest->__local_done_27 + + + + + +reference_initialization_head + +Reference initialization +[dcl.init.ref] + + + +reference_dest_type_defn + +Let the destination be a reference to type "cv1 T1". +[dcl.init.ref]/5 + + + +reference_initialization_head->reference_dest_type_defn + + + + + +reference_source_type_defn + +Let the initializer expression have type "cv2 T2". +[dcl.init.ref]/5 + + + +reference_dest_type_defn->reference_source_type_defn + + + + + +reference_is_dest_lval_for_step_1 + +Is the destination an lvalue reference? +[dcl.init.ref]/5.1 + + + +reference_source_type_defn->reference_is_dest_lval_for_step_1 + + + + + +reference_dest_lval_is_source_lval + +Is the initializer expression an lvalue? +[dcl.init.ref]/5.1.1 + + + +reference_is_dest_lval_for_step_1->reference_dest_lval_is_source_lval + + +Yes + + + +reference_is_dest_lval_for_step_2 + +Is the destination an lvalue reference? +[dcl.init.ref]/5.2 + + + +reference_is_dest_lval_for_step_1->reference_is_dest_lval_for_step_2 + + +No + + + +reference_dest_lval_is_source_lval_bitfield + +Is the initializer expression a bit-field? +[dcl.init.ref]/5.1.1 + + + +reference_dest_lval_is_source_lval->reference_dest_lval_is_source_lval_bitfield + + +Yes + + + +reference_dest_lval_is_source_class + +Is T2 a class type? +[dcl.init.ref]/5.1.2 + + + +reference_dest_lval_is_source_lval->reference_dest_lval_is_source_class + + +No + + + +reference_lval_dest_is_const + +Is the destination a reference to a const-qualified type? +[dcl.init.ref]/5.2 + + + +reference_is_dest_lval_for_step_2->reference_lval_dest_is_const + + +Yes + + + +reference_rval_conv_source_is_rvalue + +Is the initializer an rvalue? +[dcl.init.ref]/5.3.1 + + + +reference_is_dest_lval_for_step_2->reference_rval_conv_source_is_rvalue + + +No + + + +reference_dest_lval_is_source_lval_bitfield->reference_dest_lval_is_source_class + + +Yes + + + +reference_lvals_is_compatible + +Is cv1 T1 reference-compatible with cv2 T2? +[dcl.init.ref]/5.1.1 + + + +reference_dest_lval_is_source_lval_bitfield->reference_lvals_is_compatible + + +No + + + +reference_dest_lval_is_source_class->reference_is_dest_lval_for_step_2 + + +No + + + +reference_dest_lval_source_class_is_reference_related + +Is T1 reference-related to T2? +[dcl.init.ref]/5.1.2 + + + +reference_dest_lval_is_source_class->reference_dest_lval_source_class_is_reference_related + + +Yes + + + +reference_lvals_is_compatible->reference_dest_lval_is_source_class + + +No + + + +reference_lvals_compatible_bind + +Bind the destination reference to the initializer expression lvalue (or +appropriate base class subobject). +[dcl.init.ref]/5.1 + + + +reference_lvals_is_compatible->reference_lvals_compatible_bind + + +Yes + + + +__local_done_28 + +Done. + + + +reference_lvals_compatible_bind->__local_done_28 + + + + + +reference_dest_lval_source_class_is_reference_related->reference_is_dest_lval_for_step_2 + + +Yes + + + +reference_dest_lval_source_class_is_convertible + +Is the initializer expression convertible to an lvalue of type "cv3 +T3" such that cv1 T1 is reference-compatible with cv3 T3? +[dcl.init.ref]/5.1.2 + + + +reference_dest_lval_source_class_is_reference_related->reference_dest_lval_source_class_is_convertible + + +No + + + +reference_dest_lval_source_class_is_convertible->reference_is_dest_lval_for_step_2 + + +No + + + +reference_class_enumerate_conversions + +Enumerate applicable conversion functions. +[dcl.init.ref]/5.1.2 + + + +reference_dest_lval_source_class_is_convertible->reference_class_enumerate_conversions + + +Yes + + + +reference_class_select_conversion + +Select the best applicable conversion function. +[dcl.init.ref]/5.1.2 + + + +reference_class_enumerate_conversions->reference_class_select_conversion + + + + + +reference_class_do_initialization + +Bind the destination reference to the lvalue result of the conversion +(or appropriate base class subobject). +[dcl.init.ref]/5.1 + + + +reference_class_select_conversion->reference_class_do_initialization + + + + + +__local_done_29 + +Done. + + + +reference_class_do_initialization->__local_done_29 + + + + + +reference_dest_is_volatile + +Is the destination a reference to a volatile-qualified type? +[dcl.init.ref]/5.2 + + + +reference_lval_dest_is_const->reference_dest_is_volatile + + +Yes + + + +__local_ill_formed_30 + +The program is ill-formed. + + + +reference_lval_dest_is_const->__local_ill_formed_30 + + +No + + + +reference_rval_conv_source_is_rvalue_bitfield + +Is the initializer a bit-field? +[dcl.init.ref]/5.3.1 + + + +reference_rval_conv_source_is_rvalue->reference_rval_conv_source_is_rvalue_bitfield + + +Yes + + + +reference_rval_conv_source_is_lval + +Is the initializer an lvalue? +[dcl.init.ref]/5.3.1 + + + +reference_rval_conv_source_is_rvalue->reference_rval_conv_source_is_lval + + +No + + + +reference_dest_is_volatile->reference_rval_conv_source_is_rvalue + + +No + + + +__local_ill_formed_31 + +The program is ill-formed. + + + +reference_dest_is_volatile->__local_ill_formed_31 + + +Yes + + + +reference_rval_conv_source_is_rvalue_bitfield->reference_rval_conv_source_is_lval + + +Yes + + + +reference_rval_conv_source_rval_or_function_is_ref_compat + +Is cv1 T1 reference-compatible with cv2 T2? +[dcl.init.ref]/5.3.1 + + + +reference_rval_conv_source_is_rvalue_bitfield->reference_rval_conv_source_rval_or_function_is_ref_compat + + +No + + + +reference_rval_conv_source_lval_is_function + +Is the initializer of function type? +[dcl.init.ref]/5.3.1 + + + +reference_rval_conv_source_is_lval->reference_rval_conv_source_lval_is_function + + +Yes + + + +reference_rval_conv_source_is_class + +Is T2 a class type? +[dcl.init.ref]/5.3.2 + + + +reference_rval_conv_source_is_lval->reference_rval_conv_source_is_class + + +No + + + +reference_rval_conv_source_rval_or_function_is_ref_compat->reference_rval_conv_source_is_class + + +No + + + +reference_rval_conv_bind_direct + +The converted initializer is the value of the initializer. +[dcl.init.ref]/5.3 + + + +reference_rval_conv_source_rval_or_function_is_ref_compat->reference_rval_conv_bind_direct + + +Yes + + + +reference_rval_conv_source_lval_is_function->reference_rval_conv_source_rval_or_function_is_ref_compat + + +Yes + + + +reference_rval_conv_source_lval_is_function->reference_rval_conv_source_is_class + + +No + + + +reference_rval_conv_source_class_is_ref_related + +Is T1 reference-related to T2? +[dcl.init.ref]/5.3.2 + + + +reference_rval_conv_source_is_class->reference_rval_conv_source_class_is_ref_related + + +Yes + + + +reference_temp_is_dest_class + +Is T1 a class type? +[dcl.init.ref]/5.4.1 + + + +reference_rval_conv_source_is_class->reference_temp_is_dest_class + + +No + + + +reference_rval_conv_is_converted_prval + +Is the converted initializer a prvalue? +[dcl.init.ref]/5.3 + + + +reference_rval_conv_bind_direct->reference_rval_conv_is_converted_prval + + + + + +reference_rval_conv_prval_t4_defn + +Let the prvalue have type "T4". +[dcl.init.ref]/5.3 + + + +reference_rval_conv_is_converted_prval->reference_rval_conv_prval_t4_defn + + +Yes + + + +reference_rval_conv_bind_glval + +Bind the destination reference to the resulting glvalue (or to an +appropriate base class subobject). +[dcl.init.ref]/5.3 + + + +reference_rval_conv_is_converted_prval->reference_rval_conv_bind_glval + + +No + + + +reference_rval_conv_source_class_is_ref_related->reference_temp_is_dest_class + + +Yes + + + +reference_rval_conv_source_class_convertible_target + +Is the initializer convertible to an rvalue or function lvalue of type +"cv3 T3", where "cv1 T1" is reference-compatible with "cv3 T3"? +[dcl.init.ref]/5.3.2 + + + +reference_rval_conv_source_class_is_ref_related->reference_rval_conv_source_class_convertible_target + + +No + + + +reference_temp_is_related + +Is T1 reference-related to T2? +[dcl.init.ref]/5.4.1 + + + +reference_temp_is_dest_class->reference_temp_is_related + + +Yes + + + +reference_temp_is_source_class + +Is T2 a class type? +[dcl.init.ref]/5.4.1 + + + +reference_temp_is_dest_class->reference_temp_is_source_class + + +No + + + +reference_rval_conv_source_class_convertible_target->reference_temp_is_dest_class + + +No + + + +reference_rval_conv_bind_converted + +The converted initializer is the converted expression. +[dcl.init.ref]/5.3 + + + +reference_rval_conv_source_class_convertible_target->reference_rval_conv_bind_converted + + +Yes + + + +reference_rval_conv_bind_converted->reference_rval_conv_is_converted_prval + + + + + +reference_rval_conv_prval_adjust_type + +Adjust the prvalue's type to "cv1 T4". + + + +reference_rval_conv_prval_t4_defn->reference_rval_conv_prval_adjust_type + + + + + +__local_done_32 + +Done. + + + +reference_rval_conv_bind_glval->__local_done_32 + + + + + +reference_rval_conv_prval_materialize + +Apply the temporary materialization conversion to the prvalue. +[dcl.init.ref]/5.3 + + + +reference_rval_conv_prval_adjust_type->reference_rval_conv_prval_materialize + + + + + +reference_rval_conv_prval_materialize->reference_rval_conv_bind_glval + + + + + +reference_temp_implicit_conv + +The initializer expression is implicitly converted to a prvalue of type +"T1". +[dcl.init.ref]/5.4.2 + + + +reference_temp_is_related->reference_temp_implicit_conv + + +Yes + + + +reference_temp_user_defined_conv + +Consider user-defined conversions for the copy-initialization of an +object of type "cv1 T1" by user-defined conversion. +[dcl.init.ref]/5.4.1 + + + +reference_temp_is_related->reference_temp_user_defined_conv + + +No + + + +reference_temp_is_source_class->reference_temp_is_related + + +Yes + + + +reference_temp_is_source_class->reference_temp_implicit_conv + + +No + + + +reference_temp_implicit_conv_materialize + +Apply the temporary materialization conversion to the prvalue, +considering the type of the prvalue to be "cv1 T1". +[dcl.init.ref]/5.4.2 + + + +reference_temp_implicit_conv->reference_temp_implicit_conv_materialize + + + + + +reference_temp_user_defined_conv_is_ill_formed + +Would the non-reference copy-initialization be ill-formed? +[dcl.init.ref]/5.4.1 + + + +reference_temp_user_defined_conv->reference_temp_user_defined_conv_is_ill_formed + + + + + +__local_ill_formed_33 + +The program is ill-formed. + + + +reference_temp_user_defined_conv_is_ill_formed->__local_ill_formed_33 + + +Yes + + + +reference_temp_user_defined_conv_direct_initialize + +The result of the call to the conversion function, as described by +non-reference copy-initialization, is used to direct-initialize the +reference. For the direct-initialization, user-defined conversions are +not considered. +[dcl.init.ref]/5.4.1 + + + +reference_temp_user_defined_conv_is_ill_formed->reference_temp_user_defined_conv_direct_initialize + + +No + + + +__local_recurse34 + +Recurse. + + + +reference_temp_user_defined_conv_direct_initialize->__local_recurse34 + + + + + +reference_temp_implicit_conv_is_reference_related + +Is T1 reference-related to T2? +[dcl.init.ref]/5.4 + + + +__local_recurse34->reference_temp_implicit_conv_is_reference_related + + + + + +reference_temp_implicit_conv_is_cv_okay + +Is cv1 at least as qualified as cv2? +[dcl.init.ref]/5.4.3 + + + +reference_temp_implicit_conv_is_reference_related->reference_temp_implicit_conv_is_cv_okay + + +Yes + + + +__local_done_35 + +Done. + + + +reference_temp_implicit_conv_is_reference_related->__local_done_35 + + +No + + + +reference_temp_implicit_conv_materialize_bind + +Bind the reference to the result. +[dcl.init.ref]/5.4.2 + + + +reference_temp_implicit_conv_materialize->reference_temp_implicit_conv_materialize_bind + + + + + +reference_temp_implicit_conv_materialize_bind->reference_temp_implicit_conv_is_reference_related + + + + + +reference_temp_implicit_conv_is_dest_rval + +Is the destination an rvalue reference? +[dcl.init.ref]/5.4.4 + + + +reference_temp_implicit_conv_is_cv_okay->reference_temp_implicit_conv_is_dest_rval + + +Yes + + + +__local_ill_formed_36 + +The program is ill-formed. + + + +reference_temp_implicit_conv_is_cv_okay->__local_ill_formed_36 + + +No + + + +reference_temp_implicit_conv_is_source_lval + +Is the initializer an lvalue? +[dcl.init.ref]/5.4.4 + + + +reference_temp_implicit_conv_is_dest_rval->reference_temp_implicit_conv_is_source_lval + + +Yes + + + +__local_done_37 + +Done. + + + +reference_temp_implicit_conv_is_dest_rval->__local_done_37 + + +No + + + +__local_ill_formed_38 + +The program is ill-formed. + + + +reference_temp_implicit_conv_is_source_lval->__local_ill_formed_38 + + +Yes + + + +__local_done_39 + +Done. + + + +reference_temp_implicit_conv_is_source_lval->__local_done_39 + + +No + + + +aggregate_initialization_head + +Aggregate initialization +[dcl.init.aggr] + + + +aggregate_determine_elements + +Determine the elements of the aggregate. +[dcl.init.aggr]/2 + + + +aggregate_initialization_head->aggregate_determine_elements + + + + + +aggregate_elements_type + +What is the type of the aggregate? +[dcl.init.aggr]/2 + + + +aggregate_determine_elements->aggregate_elements_type + + + + + +aggregate_elements_array + +The elements are the array elements in increasing subscript order. +[dcl.init.aggr]/2.1 + + + +aggregate_elements_type->aggregate_elements_array + + +an array type + + + +aggregate_elements_class + +The elements are the direct base classes in declaration order, followed +by the direct non-static data members that are not members of an +anonymous union, in declaration order. +[dcl.init.aggr]/2.2 + + + +aggregate_elements_type->aggregate_elements_class + + +a class type + + + +aggregate_determine_explicit_init_elems + +Determine the explicitly initialized elements +[dcl.init.aggr]/3 + + + +aggregate_elements_array->aggregate_determine_explicit_init_elems + + + + + +aggregate_elements_class->aggregate_determine_explicit_init_elems + + + + + +aggregate_explicit_is_designated + +Is the initializer list a brace-enclosed designated-initializer-list? +[dcl.init.aggr]/3.1 + + + +aggregate_determine_explicit_init_elems->aggregate_explicit_is_designated + + + + + +aggregate_explicit_desginated_is_class + +Is the aggregate of class type? +[dcl.init.aggr]/3.1 + + + +aggregate_explicit_is_designated->aggregate_explicit_desginated_is_class + + +Yes + + + +aggregate_explicit_is_init_list + +Is the initializer list a brace-enclosed initializer-list? +[dcl.init.aggr]/3.2 + + + +aggregate_explicit_is_designated->aggregate_explicit_is_init_list + + +No + + + +aggregate_explicit_designated_are_designators_valid + +Does each designator's identifier name a direct non-static data member +of that class? +[dcl.init.aggr]/3.1 + + + +aggregate_explicit_desginated_is_class->aggregate_explicit_designated_are_designators_valid + + +Yes + + + +__local_ill_formed_40 + +The program is ill-formed. + + + +aggregate_explicit_desginated_is_class->__local_ill_formed_40 + + +No + + + +aggregate_explicit_init_list_defn_n + +Let n be the number of elements in the initializer list. +[dcl.init.aggr]/3.2 + + + +aggregate_explicit_is_init_list->aggregate_explicit_init_list_defn_n + + +Yes + + + +aggregate_explicit_empty + +The initializer list is "{}", and there are no explicitly initialized +elements. +[dcl.init.aggr]/3.3 + + + +aggregate_explicit_is_init_list->aggregate_explicit_empty + + +No + + + +aggregate_explicit_desginated + +The explicitly initialized elements are those named by the designator's +initializers (or those that contain the named elements). +[dcl.init.aggr]/3.1 + + + +aggregate_explicit_designated_are_designators_valid->aggregate_explicit_desginated + + +Yes + + + +__local_ill_formed_41 + +The program is ill-formed. + + + +aggregate_explicit_designated_are_designators_valid->__local_ill_formed_41 + + +No + + + +aggregate_explicit_is_union + +Is the aggregate a union? +[dcl.init.aggr]/20 + + + +aggregate_explicit_desginated->aggregate_explicit_is_union + + + + + +aggregate_explicit_list_union_is_excess_explicit_init + +Is there more than one explicitly initialized element? +[dcl.init.aggr]/20 + + + +aggregate_explicit_is_union->aggregate_explicit_list_union_is_excess_explicit_init + + +Yes + + + +aggregate_initialize_explicit + +The explicitly initialized elements are initialized as follows: +[dcl.init.aggr]/4 + + + +aggregate_explicit_is_union->aggregate_initialize_explicit + + +No + + + +aggregate_explicit_init_list + +The explicitly initialized elements are the first n elements of the +aggregate. +[dcl.init.aggr]/3.2 + + + +aggregate_explicit_init_list_defn_n->aggregate_explicit_init_list + + + + + +aggregate_explicit_empty->aggregate_explicit_is_union + + + + + +aggregate_explicit_init_list->aggregate_explicit_is_union + + + + + +aggregate_explicit_list_union_is_excess_explicit_init->aggregate_initialize_explicit + + +No + + + +__local_ill_formed_42 + +The program is ill-formed. + + + +aggregate_explicit_list_union_is_excess_explicit_init->__local_ill_formed_42 + + +Yes + + + +aggregate_initialize_explicit_foreach + +For each explicitly initialized element... +[dcl.init.aggr]/4 + + + +aggregate_initialize_explicit->aggregate_initialize_explicit_foreach + + + + + +aggregate_initialize_explicit_is_anon_union + +Is the element an anonymous union member? +[dcl.init.aggr]/4.1 + + + +aggregate_initialize_explicit_foreach->aggregate_initialize_explicit_is_anon_union + + + + + +aggregate_initialize_explicit_union_is_designated + +Is the initializer list a brace-enclosed designated-iniitializer-list? +[dcl.init.aggr]/4.1 + + + +aggregate_initialize_explicit_is_anon_union->aggregate_initialize_explicit_union_is_designated + + +Yes + + + +aggregate_initialize_explicit_copy_kind + +What is the kind of brace initializer? +[dcl.init.aggr]/4.2 + + + +aggregate_initialize_explicit_is_anon_union->aggregate_initialize_explicit_copy_kind + + +No + + + +aggregate_initialize_explicit_union_is_designated->aggregate_initialize_explicit_copy_kind + + +No + + + +aggregate_initialize_explicit_union_is_duplicate_designator + +Is there more than one designator that names a member of that anonymous +union member? +[dcl.init.aggr]/4.1 + + + +aggregate_initialize_explicit_union_is_designated->aggregate_initialize_explicit_union_is_duplicate_designator + + +Yes + + + +aggregate_initialize_explicit_copy_init_list + +Copy-initialize the element from the corresponding initializer-clause. +[dcl.init.aggr]/4.2 + + + +aggregate_initialize_explicit_copy_kind->aggregate_initialize_explicit_copy_init_list + + +initializer-list + + + +aggregate_initialize_explicit_copy_designated + +Initialize the element with the brace-or-equal-initializer of the +corresponding designated-initializer-clause. +[dcl.init.aggr]/4.2 + + + +aggregate_initialize_explicit_copy_kind->aggregate_initialize_explicit_copy_designated + + +designated-initializer-list + + + +__local_ill_formed_43 + +The program is ill-formed. + + + +aggregate_initialize_explicit_union_is_duplicate_designator->__local_ill_formed_43 + + +Yes + + + +aggregate_initialization_explicit_union_defn_d + +Let D be the designated-initializer-clause naming a member of the +anonymous union member. +[dcl.init.aggr]/4.1 + + + +aggregate_initialize_explicit_union_is_duplicate_designator->aggregate_initialization_explicit_union_defn_d + + +No + + + +aggregate_initialize_explicit_union_init + +Initialize the element with the braced-init-list { D }. + + + +aggregate_initialization_explicit_union_defn_d->aggregate_initialize_explicit_union_init + + + + + +__local_recurse_subobject44 + +Partially recurse. + + + +aggregate_initialize_explicit_union_init->__local_recurse_subobject44 + + + + + +aggregate_initialize_explicit_repeat_next + +Repeat with the next explicitly initialized element. + + + +__local_recurse_subobject44->aggregate_initialize_explicit_repeat_next + + + + + +aggregate_initialize_explicit_repeat_next->aggregate_initialize_explicit_foreach + + + + + +aggregate_initialize_nonexplicit_is_union + +Is the aggregate a union? +[dcl.init.aggr]/5 + + + +aggregate_initialize_explicit_repeat_next->aggregate_initialize_nonexplicit_is_union + + +Once done with all explicitly initialized elements + + + +__local_recurse_subobject45 + +Partially recurse. + + + +aggregate_initialize_explicit_copy_init_list->__local_recurse_subobject45 + + + + + +__local_recurse_subobject46 + +Partially recurse. + + + +aggregate_initialize_explicit_copy_designated->__local_recurse_subobject46 + + + + + +aggregate_initialize_explicit_is_narrowing_checked_no_eq + +Is that initializer of the form "assignment-expression"? +[dcl.init.aggr]/4.2 + + + +__local_recurse_subobject45->aggregate_initialize_explicit_is_narrowing_checked_no_eq + + + + + +aggregate_initialize_explicit_is_narrowing + +Is a narrowing conversion required to convert the expression? +[dcl.init.aggr]/4.2 + + + +aggregate_initialize_explicit_is_narrowing_checked_no_eq->aggregate_initialize_explicit_is_narrowing + + +Yes + + + +aggregate_initialize_explicit_is_narrowing_checked_eq + +Is that initializer of the form "= assignment-expression"? +[dcl.init.aggr]/4.2 + + + +aggregate_initialize_explicit_is_narrowing_checked_no_eq->aggregate_initialize_explicit_is_narrowing_checked_eq + + +No + + + +__local_recurse_subobject46->aggregate_initialize_explicit_is_narrowing_checked_no_eq + + + + + +aggregate_initialize_explicit_is_narrowing->aggregate_initialize_explicit_repeat_next + + +No + + + +__local_ill_formed_47 + +The program is ill-formed. + + + +aggregate_initialize_explicit_is_narrowing->__local_ill_formed_47 + + +Yes + + + +aggregate_initialize_explicit_is_narrowing_checked_eq->aggregate_initialize_explicit_repeat_next + + +No + + + +aggregate_initialize_explicit_is_narrowing_checked_eq->aggregate_initialize_explicit_is_narrowing + + +Yes + + + +aggregate_initialize_nonexplicit_union_is_list_empty + +Is the initializer list empty? +[dcl.init.aggr]/5 + + + +aggregate_initialize_nonexplicit_is_union->aggregate_initialize_nonexplicit_union_is_list_empty + + +Yes + + + +aggregate_initialize_nonexplicit_nonunion + +For each non-explicitly-initialized element: +[dcl.init.aggr]/5 + + + +aggregate_initialize_nonexplicit_is_union->aggregate_initialize_nonexplicit_nonunion + + +No + + + +aggregate_initialize_nonexplicit_union_empty_has_dflt + +Does any variant member of the union have a default member initializer? +[dcl.init.aggr]/5.4 + + + +aggregate_initialize_nonexplicit_union_is_list_empty->aggregate_initialize_nonexplicit_union_empty_has_dflt + + +Yes + + + +aggregate_initialize_nonexplicit_union_is_list_empty__generated_done + +Done. + + + +aggregate_initialize_nonexplicit_union_is_list_empty->aggregate_initialize_nonexplicit_union_is_list_empty__generated_done + + +No + + + +aggregate_initialize_nonexplicit_nonunion_has_dflt_mem_init + +Does the element have a default member initializer? +[dcl.init.aggr]/5.1 + + + +aggregate_initialize_nonexplicit_nonunion->aggregate_initialize_nonexplicit_nonunion_has_dflt_mem_init + + + + + +aggregate_initialize_nonexplicit_nonunion_dflt_mem_init + +The element is initialized from that initializer. +[dcl.init.aggr]/5.1 + + + +aggregate_initialize_nonexplicit_nonunion_has_dflt_mem_init->aggregate_initialize_nonexplicit_nonunion_dflt_mem_init + + +Yes + + + +aggregate_initialize_nonexplicit_nonunion_is_reference + +Is the element a reference? +[dcl.init.aggr]/5.2 + + + +aggregate_initialize_nonexplicit_nonunion_has_dflt_mem_init->aggregate_initialize_nonexplicit_nonunion_is_reference + + +No + + + +__local_recurse_subobject48 + +Partially recurse. + + + +aggregate_initialize_nonexplicit_nonunion_dflt_mem_init->__local_recurse_subobject48 + + + + + +__local_ill_formed_49 + +The program is ill-formed. + + + +aggregate_initialize_nonexplicit_nonunion_is_reference->__local_ill_formed_49 + + +Yes + + + +aggregate_initialize_nonexplicit_nonunion_copy_init + +The element is copy-initialized from an empty initializer list. +[dcl.init.aggr]/5.2 + + + +aggregate_initialize_nonexplicit_nonunion_is_reference->aggregate_initialize_nonexplicit_nonunion_copy_init + + +No + + + +aggregate_initialize_nonexplicit_nonunion_repeat_next + +Repeat with the next non-explicitly-initialized element. + + + +__local_recurse_subobject48->aggregate_initialize_nonexplicit_nonunion_repeat_next + + + + + +aggregate_initialize_nonexplicit_nonunion_repeat_next->aggregate_initialize_nonexplicit_nonunion + + + + + +__local_done_51 + +Done. + + + +aggregate_initialize_nonexplicit_nonunion_repeat_next->__local_done_51 + + +Once done with all explicitly initialized elements + + + +__local_recurse_subobject50 + +Partially recurse. + + + +aggregate_initialize_nonexplicit_nonunion_copy_init->__local_recurse_subobject50 + + + + + +__local_recurse_subobject50->aggregate_initialize_nonexplicit_nonunion_repeat_next + + + + + +aggregate_initialize_nonexplicit_union_dflt_mem + +That member is initialized from its default member initializer. +[dcl.init.aggr]/5.4 + + + +aggregate_initialize_nonexplicit_union_empty_has_dflt->aggregate_initialize_nonexplicit_union_dflt_mem + + +Yes + + + +aggregate_initialize_nonexplicit_union_first_mem + +The first member of the union (if any) is copy-initialized from an +empty initializer list. +[dcl.init.aggr]/5.5 + + + +aggregate_initialize_nonexplicit_union_empty_has_dflt->aggregate_initialize_nonexplicit_union_first_mem + + +No + + + +__local_recurse_subobject52 + +Partially recurse. + + + +aggregate_initialize_nonexplicit_union_dflt_mem->__local_recurse_subobject52 + + + + + +__local_recurse_subobject54 + +Partially recurse. + + + +aggregate_initialize_nonexplicit_union_first_mem->__local_recurse_subobject54 + + + + + +__local_done_53 + +Done. + + + +__local_recurse_subobject52->__local_done_53 + + + + + +__local_done_55 + +Done. + + + +__local_recurse_subobject54->__local_done_55 + + + + + +list_initialization_head + +List-initialization +[dcl.init.list]/3 + + + +list_initialization_defn_t + +Let the initialized object or reference be of type T. +[dcl.init.list]/3 + + + +list_initialization_head->list_initialization_defn_t + + + + + +list_has_designated_initializer + +Does the braced-init-list contain a designated-initializer-list? +[dcl.init.list]/3.1 + + + +list_initialization_defn_t->list_has_designated_initializer + + + + + +list_designated_initalizer_is_aggregate + +Is the type an aggregate class? +[dcl.init.list]/3.1 + + + +list_has_designated_initializer->list_designated_initalizer_is_aggregate + + +Yes + + + +list_is_aggregate_class + +Is the type an aggregate class? +[dcl.init.list]/3.2 + + + +list_has_designated_initializer->list_is_aggregate_class + + +No + + + +list_designated_initializer_are_identifiers_valid + +Do the ordered identifiers in the designators of the +designated-initializer-list form a subsequence of the ordered +idenitifiers in the direct non-static data members of the type? +[dcl.init.list]/3.1 + + + +list_designated_initalizer_is_aggregate->list_designated_initializer_are_identifiers_valid + + +Yes + + + +__local_ill_formed_56 + +The program is ill-formed. + + + +list_designated_initalizer_is_aggregate->__local_ill_formed_56 + + +No + + + +list_aggregate_is_list_singleton + +Does the initializer list have a single element? +[dcl.init.list]/3.2 + + + +list_is_aggregate_class->list_aggregate_is_list_singleton + + +Yes + + + +list_is_type_char_array + +Is T a character array? +[dcl.init.list]/3.3 + + + +list_is_aggregate_class->list_is_type_char_array + + +No + + + +list_designated_initializer_aggregate_init + +Aggregate initialization is performed. +[dcl.init.list]/3.1 + + + +list_designated_initializer_are_identifiers_valid->list_designated_initializer_aggregate_init + + +Yes + + + +__local_ill_formed_57 + +The program is ill-formed. + + + +list_designated_initializer_are_identifiers_valid->__local_ill_formed_57 + + +No + + + +list_designated_initializer_aggregate_init->aggregate_initialization_head + + + + + +list_aggregate_is_list_singleton->list_is_type_char_array + + +No + + + +list_aggregate_defn_u + +Let the sole element have type "cv U". + + + +list_aggregate_is_list_singleton->list_aggregate_defn_u + + +Yes + + + +list_char_array_is_singleton + +Does the initializer list have a single element? +[dcl.init.list/]3.3 + + + +list_is_type_char_array->list_char_array_is_singleton + + +Yes + + + +list_is_aggregate + +Is T an aggregate? +[dcl.init.list]/3.4 + + + +list_is_type_char_array->list_is_aggregate + + +No + + + +list_aggregate_is_u_eq_t + +Is U the same as T? +[dcl.init.list]/3.2 + + + +list_aggregate_defn_u->list_aggregate_is_u_eq_t + + + + + +list_aggregate_singleton_type_init_type + +What is the type of initialization? +[dcl.init.list]/3.2 + + + +list_aggregate_is_u_eq_t->list_aggregate_singleton_type_init_type + + +Yes + + + +list_aggreagte_is_u_derived_t + +Is U a class derived from T? +[dcl.init.list]/3.2 + + + +list_aggregate_is_u_eq_t->list_aggreagte_is_u_derived_t + + +No + + + +list_aggregate_singleton_type_copy + +Copy-initialize the object from the sole element. +[dcl.init.list]/3.2 + + + +list_aggregate_singleton_type_init_type->list_aggregate_singleton_type_copy + + +copy-list-initialization + + + +list_aggregate_singleton_type_direct + +Direct-initialize the object from the sole element. +[dcl.init.list]/3.2 + + + +list_aggregate_singleton_type_init_type->list_aggregate_singleton_type_direct + + +direct-list-initialization + + + +list_aggreagte_is_u_derived_t->list_is_type_char_array + + +No + + + +list_aggreagte_is_u_derived_t->list_aggregate_singleton_type_init_type + + +Yes + + + +__local_recurse58 + +Recurse. + + + +list_aggregate_singleton_type_copy->__local_recurse58 + + + + + +__local_recurse59 + +Recurse. + + + +list_aggregate_singleton_type_direct->__local_recurse59 + + + + + +list_char_array_is_singleton->list_is_aggregate + + +No + + + +list_char_array_singleton_is_typed + +Is that element an appropriately-typed string-literal? +[dcl.init.list]/3.3 + + + +list_char_array_is_singleton->list_char_array_singleton_is_typed + + +Yes + + + +list_aggregate_aggregate_initialization + +Aggregate initialization is performed. +[dcl.init.list]/3.4 + + + +list_is_aggregate->list_aggregate_aggregate_initialization + + +Yes + + + +list_is_list_empty + +Is the initializer list empty? +[dcl.init.list]/3.5 + + + +list_is_aggregate->list_is_list_empty + + +No + + + +list_char_array_singleton_is_typed->list_is_aggregate + + +No + + + +list_char_array_string_literal_init + +Initialization as in [dcl.init.string] +[dcl.init.list]/3.3 + + + +list_char_array_singleton_is_typed->list_char_array_string_literal_init + + +Yes + + + +list_char_array_string_literal_init->string_literal_initialization_head + + + + + +list_aggregate_aggregate_initialization->aggregate_initialization_head + + + + + +list_empty_is_class + +Is T a class type? +[dcl.init.list]/3.5 + + + +list_is_list_empty->list_empty_is_class + + +Yes + + + +list_dest_is_initializer_list + +Is T a specialization of std::initializer_list? +[dcl.init.list]/3.6 + + + +list_is_list_empty->list_dest_is_initializer_list + + +No + + + +list_empty_is_class->list_dest_is_initializer_list + + +No + + + +list_empty_has_default_constructor + +Does T have a default constructor? +[dcl.init.list]/3.5 + + + +list_empty_is_class->list_empty_has_default_constructor + + +Yes + + + +list_initializer_list_init + +Initialize the object as follows: +[dcl.init.list]/5 + + + +list_dest_is_initializer_list->list_initializer_list_init + + +Yes + + + +list_is_class + +Is T a class type? +[dcl.init.list]/3.7 + + + +list_dest_is_initializer_list->list_is_class + + +No + + + +list_empty_has_default_constructor->list_dest_is_initializer_list + + +No + + + +list_empty_value_initialize + +Value-initialize the object. +[dcl.init.list]/3.5 + + + +list_empty_has_default_constructor->list_empty_value_initialize + + +Yes + + + +list_empty_value_initialize->value_initialization_head + + + + + +list_initializer_list_defn_e + +Let the object be of type std::initializer_list<E>. + + + +list_initializer_list_init->list_initializer_list_defn_e + + + + + +list_class_enumerate_ctors + +Enumerate the applicable constructors. +[dcl.init.list]/3.7 + + + +list_is_class->list_class_enumerate_ctors + + +Yes + + + +list_is_enum + +Is T an enumeration? +[dcl.init.list]/3.8 + + + +list_is_class->list_is_enum + + +No + + + +list_initializer_list_defn_n + +Let N be the number of elements in the initalizer list. + + + +list_initializer_list_defn_e->list_initializer_list_defn_n + + + + + +list_initializer_list_materialize_array + +Materialize a prvalue of type "array of N const E". + + + +list_initializer_list_defn_n->list_initializer_list_materialize_array + + + + + +list_initializer_list_init_array + +Copy-initialize each element of the array with the corresponding +element of the initializer list. + + + +list_initializer_list_materialize_array->list_initializer_list_init_array + + + + + +list_initializer_list_is_narrowing + +Is a narrowing conversion required to initialize any of the elements? + + + +list_initializer_list_init_array->list_initializer_list_is_narrowing + + + + + +list_initializer_list_init_array__recurse + +Partially recurse. + + + +list_initializer_list_init_array->list_initializer_list_init_array__recurse + + + + + +__local_ill_formed_60 + +The program is ill-formed. + + + +list_initializer_list_is_narrowing->__local_ill_formed_60 + + +Yes + + + +list_initializer_list_init_object + +Construct the initializer_list to refer to the materialized array. + + + +list_initializer_list_is_narrowing->list_initializer_list_init_object + + +No + + + +__local_done_61 + +Done. + + + +list_initializer_list_init_object->__local_done_61 + + + + + +list_class_select_ctor + +Select the best match selected through overload resolution (applying +the special rules in [over.match.list]). +[dcl.init.list]/3.7 + + + +list_class_enumerate_ctors->list_class_select_ctor + + + + + +list_enum_is_fixed + +Does T have fixed underlying type? +[dcl.init.list]/3.8 + + + +list_is_enum->list_enum_is_fixed + + +Yes + + + +list_final_is_singleton + +Does the initializer list have a single element? +[dcl.init.list]/3.9 + + + +list_is_enum->list_final_is_singleton + + +No + + + +list_class_is_narrowing + +Is a narrowing conversion required to convert any of the arguments? +[dcl.init.list]/3.7 + + + +list_class_select_ctor->list_class_is_narrowing + + + + + +__local_ill_formed_62 + +The program is ill-formed. + + + +list_class_is_narrowing->__local_ill_formed_62 + + +Yes + + + +__local_done_63 + +Done. + + + +list_class_is_narrowing->__local_done_63 + + +No + + + +list_enum_is_fixed->list_final_is_singleton + + +No + + + +list_enum_underlying_defn + +Let U be the underlying type. +[dcl.init.list]/3.8 + + + +list_enum_is_fixed->list_enum_underlying_defn + + +Yes + + + +list_final_singleton_type_defn + +Let E be the type of that element. +[dcl.init.list]/3.9 + + + +list_final_is_singleton->list_final_singleton_type_defn + + +Yes + + + +list_ref_prvalue_is_ref + +Is T a reference type? +[dcl.init.list]/3.10 + + + +list_final_is_singleton->list_ref_prvalue_is_ref + + +No + + + +list_enum_is_singleton + +Does the initializer-list have a single element? +[dcl.init.list]/3.8 + + + +list_enum_underlying_defn->list_enum_is_singleton + + + + + +list_enum_is_singleton->list_final_is_singleton + + +No + + + +list_enum_elem_defn + +Let v be that element. +[dcl.init.list]/3.8 + + + +list_enum_is_singleton->list_enum_elem_defn + + +Yes + + + +list_enum_is_convertible + +Can v be implicitly converted to U? +[dcl.init.list]/3.8 + + + +list_enum_elem_defn->list_enum_is_convertible + + + + + +list_enum_is_convertible->list_final_is_singleton + + +No + + + +list_enum_is_direct + +Is the initialization direct-list-initialization? +[dcl.init.list]/3.8 + + + +list_enum_is_convertible->list_enum_is_direct + + +Yes + + + +list_enum_is_direct->list_final_is_singleton + + +No + + + +list_enum_initialization + +Initialized the object with the value "T(v)" (an explicit type +conversion). + + + +list_enum_is_direct->list_enum_initialization + + +Yes + + + +list_enum_is_narrowing + +Is a narrowing conversion required to convert v to U? +[dcl.init.list]/3.8 + + + +list_enum_initialization->list_enum_is_narrowing + + + + + +__local_ill_formed_64 + +The program is ill-formed. + + + +list_enum_is_narrowing->__local_ill_formed_64 + + +Yes + + + +__local_done_65 + +Done. + + + +list_enum_is_narrowing->__local_done_65 + + +No + + + +list_final_singleton_is_dest_ref + +Is T a reference type? +[dcl.init.list]/3.9 + + + +list_final_singleton_type_defn->list_final_singleton_is_dest_ref + + + + + +list_ref_prvalue_prvalue_generated + +Generate a prvalue. +[dcl.init.list]/3.10 + + + +list_ref_prvalue_is_ref->list_ref_prvalue_prvalue_generated + + +Yes + + + +list_final_is_empty + +Is the initializer list empty? +[dcl.init.list]/3.11 + + + +list_ref_prvalue_is_ref->list_final_is_empty + + +No + + + +list_final_singleton_is_dest_ref_related + +Is T's referenced type reference-related to E? +[dcl.init.list]/3.9 + + + +list_final_singleton_is_dest_ref->list_final_singleton_is_dest_ref_related + + +Yes + + + +list_final_singleton_type + +What is the type of initialization? +[dcl.init.list]/3.9 + + + +list_final_singleton_is_dest_ref->list_final_singleton_type + + +No + + + +list_final_singleton_is_dest_ref_related->list_ref_prvalue_is_ref + + +No + + + +list_final_singleton_is_dest_ref_related->list_final_singleton_type + + +Yes + + + +list_final_singleton_direct + +Direct-initialize the destination from the element. +[dcl.init.list]/3.9 + + + +list_final_singleton_type->list_final_singleton_direct + + +direct-list-initialization + + + +list_final_singleton_copy + +Copy-initialize the destination from the element. +[dcl.init.list]/3.9 + + + +list_final_singleton_type->list_final_singleton_copy + + +copy-list-initialization + + + +__local_recurse66 + +Recurse. + + + +list_final_singleton_direct->__local_recurse66 + + + + + +__local_recurse67 + +Recurse. + + + +list_final_singleton_copy->__local_recurse67 + + + + + +list_final_singleton_is_narrowing + +Is a narrowing conversion required to convert the element to the +destination type? +[dcl.init.list]/3.9 + + + +__local_recurse66->list_final_singleton_is_narrowing + + + + + +__local_ill_formed_68 + +The program is ill-formed. + + + +list_final_singleton_is_narrowing->__local_ill_formed_68 + + +Yes + + + +__local_done_69 + +Done. + + + +list_final_singleton_is_narrowing->__local_done_69 + + +No + + + +__local_recurse67->list_final_singleton_is_narrowing + + + + + +list_ref_prvalue_type_is_unknown_bound + +Is T "reference to array of unknown bound of U"? +[dcl.init.list]/3.10 + + + +list_ref_prvalue_prvalue_generated->list_ref_prvalue_type_is_unknown_bound + + + + + +list_final_empty_value_init + +Value-initialize the object. +[dcl.init.list]/3.12 + + + +list_final_is_empty->list_final_empty_value_init + + +Yes + + + +list_nothing_else_ill_formed + +The program is ill-formed. + + + +list_final_is_empty->list_nothing_else_ill_formed + + +No + + + +list_ref_prvalue_type_unknown_bound + +The type of the prvalue is the type of x in U x[] H, where H is the +initializer list. +[dcl.init.list]/3.10 + + + +list_ref_prvalue_type_is_unknown_bound->list_ref_prvalue_type_unknown_bound + + +Yes + + + +list_ref_prvalue_type_normal + +The type of the prvalue is the type referenced by T. +[dcl.init.list]/3.10 + + + +list_ref_prvalue_type_is_unknown_bound->list_ref_prvalue_type_normal + + +No + + + +list_ref_prvalue_init_prvalue + +The prvalue initializes its result object by copy-list-initialization. +[dcl.init.list]/3.10 + + + +list_ref_prvalue_type_unknown_bound->list_ref_prvalue_init_prvalue + + + + + +list_ref_prvalue_type_normal->list_ref_prvalue_init_prvalue + + + + + +__local_recurse_subobject70 + +Partially recurse. + + + +list_ref_prvalue_init_prvalue->__local_recurse_subobject70 + + + + + +list_ref_prvalue_init_ref + +The reference is direct-initialized by the prvalue. +[dcl.init.list]/3.10 + + + +__local_recurse_subobject70->list_ref_prvalue_init_ref + + + + + +__local_recurse71 + +Recurse. + + + +list_ref_prvalue_init_ref->__local_recurse71 + + + + + +list_final_empty_value_init->value_initialization_head + + + + + +start + +So you want to initialize something? +N4950 +[dcl.init.general]/16 +Copyright Janet Cobb 2025, Licensed CC BY 4.0 + + + +is_direct_braced_init_list + +Is the initializer a non-parenthesized braced-init-list? +[dcl.init.general]/16.1 + + + +start->is_direct_braced_init_list + + + + + +is_direct_braced_init_list->list_initialization_head + + +Yes + + + +is_copy_braced_init_list + +Is the initializer of the form "= braced-init-list"? +[dcl.init.general]/16.1 + + + +is_direct_braced_init_list->is_copy_braced_init_list + + +No + + + +is_copy_braced_init_list->list_initialization_head + + +Yes + + + +is_dest_reference + +Is the destination type a reference type? +[dcl.init.general]/16.2 + + + +is_copy_braced_init_list->is_dest_reference + + +No + + + +is_dest_reference->reference_initialization_head + + +Yes + + + +is_char_arr_init_char + +Is the destination type an array of char? +[dcl.init.general]/16.3 + + + +is_dest_reference->is_char_arr_init_char:n + + +No + + + +is_char_arr_literal_init + +Is the initializer a string literal? +[dcl.init.general]/16.3 + + + +is_char_arr_init_char->is_char_arr_literal_init + + +Yes + + + +is_char_arr_init_uchar + +Is the destination type an array of unsigned char? +[dcl.init.general]/16.3 + + + +is_char_arr_init_char->is_char_arr_init_uchar + + +No + + + +is_char_arr_literal_init->string_literal_initialization_head + + +Yes + + + +is_initializer_empty_parens + +Is the initializer "()"? +[dcl.init.general]/16.4 + + + +is_char_arr_literal_init->is_initializer_empty_parens + + +No + + + +is_char_arr_init_uchar->is_char_arr_literal_init + + +Yes + + + +is_char_arr_init_schar + +Is the destination type an array of signed char? +[dcl.init.general]/16.3 + + + +is_char_arr_init_uchar->is_char_arr_init_schar + + +No + + + +is_char_arr_init_schar->is_char_arr_literal_init + + +Yes + + + +is_char_arr_init_char8 + +Is the destination type an array of char8_t? +[dcl.init.general]/16.3 + + + +is_char_arr_init_schar->is_char_arr_init_char8 + + +No + + + +is_char_arr_init_char8->is_char_arr_literal_init + + +Yes + + + +is_char_arr_init_char16 + +Is the destination type an array of char16_t? +[dcl.init.general]/16.3 + + + +is_char_arr_init_char8->is_char_arr_init_char16 + + +No + + + +is_char_arr_init_char16->is_char_arr_literal_init + + +Yes + + + +is_char_arr_init_char32 + +Is the destination type an array of char32_t? +[dcl.init.general]/16.3 + + + +is_char_arr_init_char16->is_char_arr_init_char32 + + +No + + + +is_char_arr_init_char32->is_char_arr_literal_init + + +Yes + + + +is_char_arr_init_wchar + +Is the destination type an array of wchar_t? +[dcl.init.general]/16.3 + + + +is_char_arr_init_char32->is_char_arr_init_wchar + + +No + + + +is_char_arr_init_wchar->is_char_arr_literal_init + + +Yes + + + +is_char_arr_init_wchar->is_initializer_empty_parens + + +No + + + +empty_parens_value_init + +Value-initialize the object. +[dcl.init/16.3] + + + +is_initializer_empty_parens->empty_parens_value_init + + +Yes + + + +is_dest_array + +Is the destination type an array? +[dcl.init.general]/16.5 + + + +is_initializer_empty_parens->is_dest_array + + +No + + + +empty_parens_value_init->value_initialization_head + + + + + +array_initialization_head + +Initialize the object as follows: +[dcl.init.general]/16.5 + + + +is_dest_array->array_initialization_head + + +Yes + + + +is_dest_class_type + +Is the destination type a (possibly cv-qualified) class type? +[dcl.init.general]/16.6 + + + +is_dest_array->is_dest_class_type + + +No + + + +array_is_paren_expr_list + +Is the initializer of the form "( expression-list )"? +CWG2824 resolution + + + +array_initialization_head->array_is_paren_expr_list + + + + + +class_dest_initialization_head + +Initialize the object as follows: +[dcl.init.general]/16.6 + + + +is_dest_class_type->class_dest_initialization_head + + +Yes + + + +is_source_class_type + +Is the source type a (possibly cv-qualified) class type? +[dcl.init.general]/16.7 + + + +is_dest_class_type->is_source_class_type + + +No + + + +array_x_definition + +Let x_1, ..., x_k be the elements of the expression-list. + + + +array_is_paren_expr_list->array_x_definition + + +Yes + + + +__local_ill_formed_72 + +The program is ill-formed. + + + +array_is_paren_expr_list->__local_ill_formed_72 + + +No + + + +array_is_dest_unknown + +Is the destination type an array of unknown bound? + + + +array_x_definition->array_is_dest_unknown + + + + + +array_unknown_dest + +The destination type is defined as having k elements. + + + +array_is_dest_unknown->array_unknown_dest + + +Yes + + + +array_n_definition + +Let n be the size of the array (after adjustment). + + + +array_is_dest_unknown->array_n_definition + + +No + + + +array_unknown_dest->array_n_definition + + + + + +array_is_k_gt_n + +Is k > n? + + + +array_n_definition->array_is_k_gt_n + + + + + +__local_ill_formed_73 + +The program is ill-formed. + + + +array_is_k_gt_n->__local_ill_formed_73 + + +Yes + + + +array_copy_init_k + +For each 1 <= i <= k, copy-initialize the i-th array element with x_i. + + + +array_is_k_gt_n->array_copy_init_k + + +No + + + +array_value_init_n + +For each k < i <= n, value-initialize the i-th array element. + + + +array_copy_init_k->array_value_init_n + + + + + +array_copy_init_k__recurse + +Partially recurse. + + + +array_copy_init_k->array_copy_init_k__recurse + + + + + +array_value_init_n->value_initialization_head + + + + + +__local_done_74 + +Done. + + + +array_value_init_n->__local_done_74 + + + + + +class_is_initializer_prvalue + +Is the initializer a prvalue? +[dcl.init.general]/16.6.1 + + + +class_dest_initialization_head->class_is_initializer_prvalue + + + + + +class_source_initialization_head + +Initialize the object as follows: +[dcl.init.general]/16.7 + + + +is_source_class_type->class_source_initialization_head + + +Yes + + + +is_direct_init_for_nullptr + +Is the initialization direct-initialization? +[dcl.init.general]/16.8 + + + +is_source_class_type->is_direct_init_for_nullptr + + +No + + + +class_source_enumerate_conversion_functions + +Enumerate the applicable conversion functions (as in +[over.match.conv]). + + + +class_source_initialization_head->class_source_enumerate_conversion_functions + + + + + +is_source_type_nullptr + +Is the source type std::nullptr_t? +[dcl.init.general]/16.8 + + + +is_direct_init_for_nullptr->is_source_type_nullptr + + +Yes + + + +standard_conv_seq_initialization_head + +Initialize the object as follows: +[dcl.init.general]/16.9 + + + +is_direct_init_for_nullptr->standard_conv_seq_initialization_head + + +No + + + +is_source_type_nullptr->standard_conv_seq_initialization_head + + +No + + + +is_dest_type_bool_for_nullptr + +Is the destination type bool? +[dcl.init.general]/16.8 + + + +is_source_type_nullptr->is_dest_type_bool_for_nullptr + + +Yes + + + +standard_conv_seq_do_init + +Initialize the object using the value of the initializer expression, +using a standard conversion sequence if necessary, not considering any +user-defined conversions. + + + +standard_conv_seq_initialization_head->standard_conv_seq_do_init + + + + + +is_dest_type_bool_for_nullptr->standard_conv_seq_initialization_head + + +No + + + +nullptr_to_bool_init + +Initialize the bool to false. +[dcl.init.general]/16.8 + + + +is_dest_type_bool_for_nullptr->nullptr_to_bool_init + + +Yes + + + +__local_done_75 + +Done. + + + +nullptr_to_bool_init->__local_done_75 + + + + + +class_is_initializer_prvalue_same_class + +Is the cv-unqualified version of the source type the same class as the +class of the destination? +[dcl.init.general]/16.6.1 + + + +class_is_initializer_prvalue->class_is_initializer_prvalue_same_class + + +Yes + + + +class_is_copy_init + +Is the initialization copy-initialization? +[dcl.init.general]/16.6.2 + + + +class_is_initializer_prvalue->class_is_copy_init + + +No + + + +class_is_initializer_prvalue_same_class->class_is_copy_init + + +No + + + +class_initialize_by_prvalue + +Use the prvalue to initialize the destination object. +[dcl.init.general]/16.6.1 + + + +class_is_initializer_prvalue_same_class->class_initialize_by_prvalue + + +Yes + + + +class_is_copy_init_same_class + +Is the cv-unqualified version of the source type the same class as the +class of the destination? +[dcl.init.general]/16.6.2 + + + +class_is_copy_init->class_is_copy_init_same_class + + +Yes + + + +class_is_direct_init + +The initialization is direct-initialization. +[dcl.init.general]/16.6.2 + + + +class_is_copy_init->class_is_direct_init + + +No + + + +__local_done_76 + +Done. + + + +class_initialize_by_prvalue->__local_done_76 + + + + + +class_consider_constructors + +Enumerate applicable constructors and select the best through overload +resolution. +[dcl.init.general]/16.6.2 + + + +class_is_copy_init_same_class->class_consider_constructors + + +Yes + + + +class_is_copy_init_derived_class + +Is the cv-unqualified version of the source type a derived class of the +class of the destination? +[dcl.init.general]/16.6.2 + + + +class_is_copy_init_same_class->class_is_copy_init_derived_class + + +No + + + +class_is_direct_init->class_consider_constructors + + + + + +class_constructors_is_resolution_successful + +Is overload resolution succesful? +[dcl.init.general]/16.6.2.1 + + + +class_consider_constructors->class_constructors_is_resolution_successful + + + + + +class_is_copy_init_derived_class->class_consider_constructors + + +Yes + + + +class_user_defined_conv_head + +Initialize the object as follows: +[dcl.init.general]/16.6.3 + + + +class_is_copy_init_derived_class->class_user_defined_conv_head + + +No + + + +class_user_defined_conv_enumerate + +Enumerate the user-defined conversions that can convert from the source +type to the destination type or (when a conversion function is used) to +a derived class thereof (as described in [over.match.copy]). + + + +class_user_defined_conv_head->class_user_defined_conv_enumerate + + + + + +class_constructors_use_selected + +Call the selected constructor to initialize the object with the +initializer expression or expression-list as its argument(s). +[dcl.init.general]/16.6.2.1 + + + +class_constructors_is_resolution_successful->class_constructors_use_selected + + +Yes + + + +class_is_constructor_viable + +Is a constructor viable? +[dcl.init.general]/16.6.2.2 + + + +class_constructors_is_resolution_successful->class_is_constructor_viable + + +No + + + +__local_done_77 + +Done. + + + +class_constructors_use_selected->__local_done_77 + + + + + +__local_ill_formed_78 + +The program is ill-formed. + + + +class_is_constructor_viable->__local_ill_formed_78 + + +Yes + + + +class_is_aggregate + +Is the destination type an aggregate class? +[dcl.init.general]/16.6.2.2 + + + +class_is_constructor_viable->class_is_aggregate + + +No + + + +class_aggregate_is_initializer_expr_list + +Is the initializer a parenthesized expression-list? +[dcl.init.general]/16.6.2.2 + + + +class_is_aggregate->class_aggregate_is_initializer_expr_list + + +Yes + + + +__local_ill_formed_79 + +The program is ill-formed. + + + +class_is_aggregate->__local_ill_formed_79 + + +No + + + +class_aggregate_paren_init_head + +Initialize the object as follows: +[dcl.init.general]/16.6.2.2 + + + +class_aggregate_is_initializer_expr_list->class_aggregate_paren_init_head + + +Yes + + + +__local_ill_formed_80 + +The program is ill-formed. + + + +class_aggregate_is_initializer_expr_list->__local_ill_formed_80 + + +No + + + +class_aggregate_paren_e_defn + +Let e_1, ..., e_k be the elements of the aggregate. + + + +class_aggregate_paren_init_head->class_aggregate_paren_e_defn + + + + + +class_aggregate_paren_x_defn + +Let x_1, ..., x_n be the elements of the expression-list. + + + +class_aggregate_paren_e_defn->class_aggregate_paren_x_defn + + + + + +class_aggregate_paren_is_k_gt_n + +Is k > n? + + + +class_aggregate_paren_x_defn->class_aggregate_paren_is_k_gt_n + + + + + +__local_ill_formed_81 + +The program is ill-formed. + + + +class_aggregate_paren_is_k_gt_n->__local_ill_formed_81 + + +Yes + + + +class_aggregate_paren_initialize_first_k + +For each 1 <= i <= k, copy-initialize e_i with x_i. + + + +class_aggregate_paren_is_k_gt_n->class_aggregate_paren_initialize_first_k + + +No + + + +class_aggregate_paren_initialize_rest + +The remaining elements are initialized with their default member +initializers, if any, and are otherwise value-initialized. + + + +class_aggregate_paren_initialize_first_k->class_aggregate_paren_initialize_rest + + + + + +class_aggregate_paren_initialize_first_k__recurse + +Partially recurse. + + + +class_aggregate_paren_initialize_first_k->class_aggregate_paren_initialize_first_k__recurse + + + + + +class_aggregate_paren_initialize_rest->value_initialization_head + + + + + +__local_done_82 + +Done. + + + +class_aggregate_paren_initialize_rest->__local_done_82 + + + + + +class_user_defined_conv_overload_resolution + +Use overload resolution to select the best conversion. + + + +class_user_defined_conv_enumerate->class_user_defined_conv_overload_resolution + + + + + +class_user_defined_conv_is_possible + +Is the conversion ambiguous or impossible? + + + +class_user_defined_conv_overload_resolution->class_user_defined_conv_is_possible + + + + + +__local_ill_formed_83 + +The program is ill-formed. + + + +class_user_defined_conv_is_possible->__local_ill_formed_83 + + +Yes + + + +class_user_defined_conv_do_conversion + +Call the selected function with the initializer expression as its +argument. + + + +class_user_defined_conv_is_possible->class_user_defined_conv_do_conversion + + +No + + + +call_user_defined_conv_is_constructor + +Is the selected function a constructor? + + + +class_user_defined_conv_do_conversion->call_user_defined_conv_is_constructor + + + + + +call_user_defined_conv_constructor + +The call is a prvalue of the cv-unqualified version of the destination +type whose result object is initialized by the constructor. + + + +call_user_defined_conv_is_constructor->call_user_defined_conv_constructor + + +Yes + + + +class_user_defined_conv_initialize + +Direct-initialize the destination object using the call. + + + +call_user_defined_conv_is_constructor->class_user_defined_conv_initialize + + +No + + + +call_user_defined_conv_constructor->class_user_defined_conv_initialize + + + + + +__local_recurse84 + +Recurse. + + + +class_user_defined_conv_initialize->__local_recurse84 + + + + + +class_source_overload_resolution + +Use overload resolution to select the best applicable conversion +function. + + + +class_source_enumerate_conversion_functions->class_source_overload_resolution + + + + + +class_source_conversion_is_impossible + +Is the conversion ambiguous or impossible? + + + +class_source_overload_resolution->class_source_conversion_is_impossible + + + + + +__local_ill_formed_85 + +The program is ill-formed. + + + +class_source_conversion_is_impossible->__local_ill_formed_85 + + +Yes + + + +class_source_initialize + +Call the selected user-defined conversion to convert the initializer +expression into the object being initialized. + + + +class_source_conversion_is_impossible->class_source_initialize + + +No + + + +__local_done_86 + +Done. + + + +class_source_initialize->__local_done_86 + + + + + +standard_conv_seq_is_possible + +Is the conversion possible? + + + +standard_conv_seq_do_init->standard_conv_seq_is_possible + + + + + +standard_conv_seq_is_bitfield + +Is the object to be initialized a bit-field? + + + +standard_conv_seq_is_possible->standard_conv_seq_is_bitfield + + +Yes + + + +__local_ill_formed_87 + +The program is ill-formed. + + + +standard_conv_seq_is_possible->__local_ill_formed_87 + + +No + + + +standard_conv_seq_is_bitfield_in_range + +Is the value representable by the bit-field? + + + +standard_conv_seq_is_bitfield->standard_conv_seq_is_bitfield_in_range + + +Yes + + + +__local_done_88 + +Done. + + + +standard_conv_seq_is_bitfield->__local_done_88 + + +No + + + +__local_done_89 + +Done. + + + +standard_conv_seq_is_bitfield_in_range->__local_done_89 + + +Yes + + + +standard_conv_seq_bitfield_imp_def + +The value of the bit-field is implementation-defined. + + + +standard_conv_seq_is_bitfield_in_range->standard_conv_seq_bitfield_imp_def + + +No + + + +__local_done_90 + +Done. + + + +standard_conv_seq_bitfield_imp_def->__local_done_90 + + + + +