From c885de34f5a0b3bf42e3b00949df5e7714b7312b Mon Sep 17 00:00:00 2001 From: Barry Revzin Date: Sat, 14 Oct 2023 13:03:31 -0500 Subject: [PATCH] Fixes --- 2996_reflection/p2996r0.html | 16 +++++++--------- 2996_reflection/reflection.md | 17 ++++++++--------- 2 files changed, 15 insertions(+), 18 deletions(-) diff --git a/2996_reflection/p2996r0.html b/2996_reflection/p2996r0.html index 556db6e6..aae4a4ce 100644 --- a/2996_reflection/p2996r0.html +++ b/2996_reflection/p2996r0.html @@ -572,7 +572,6 @@

Contents

  • 2 Examples
  • 3 Proposed Features @@ -633,14 +632,13 @@

    std::vector<std::meta::info> can easily represent a mixed template argument list — containing types and nontypes — without fear of slicing values).

  • -

    1.3 Additional Language Features

    +

    2 Examples

    +

    We start with a number of examples that show off what is possible with the proposed set of features. It is expected that these are mostly self-explanatory. Read ahead to the next sections for a more systematic description of each element of this proposal.

    A number of our examples here show a few other language features that we hope to progress at the same time. This facility does not strictly rely on these features, and it is possible to do without them - but it would greatly help the usability experience if those could be adopted as well:

    -

    2 Examples

    -

    We start with a number of examples that show off what is possible with the proposed set of features. It is expected that these are mostly self-explanatory. Read ahead to the next sections for a more systematic description of each element of this proposal.

    2.1 Back-And-Forth

    Our first example is not meant to be compelling but to show how to go back and forth between the reflection domain and the grammatical domain:

    @@ -841,8 +839,8 @@

    // std::array<float, 30> z; // };

    -

    2.8 A Universal Print Function

    -

    This example is taken from Boost.Describe, translated to using std::format instead of iostreams:

    +

    2.8 A Universal Formatter

    +

    This example is taken from Boost.Describe:

    struct universal_formatter {
       constexpr auto parse(auto& ctx) { return ctx.begin(); }
    @@ -886,7 +884,7 @@ 

    std::println("{}", Z()); // Z{X{.m1 = 1}, Y{.m2 = 2}, .m3 = 3, .m4 = 4} }

    -

    2.9 Implementing hash_append

    +

    2.9 Implementing member-wise hash_append

    Based on the [N3980] API:

    template <typename H, typename T> requires std::is_standard_layout_v<T>
    diff --git a/2996_reflection/reflection.md b/2996_reflection/reflection.md
    index 1a843f7f..76f07c2e 100644
    --- a/2996_reflection/reflection.md
    +++ b/2996_reflection/reflection.md
    @@ -81,12 +81,6 @@ Other advantages of a single opaque type include:
         can easily represent a mixed template argument list — containing types and
         nontypes — without fear of slicing values).
     
    -## Additional Language Features
    -
    -A number of our examples here show a few other language features that we hope to progress at the same time. This facility does not strictly rely on these features, and it is possible to do without them - but it would greatly help the usability experience if those could be adopted as well:
    -
    -* expansion statements [@P1306R1]
    -* non-transient constexpr allocation [@P0784R7] [@P1974R0] [@P2670R1]
     
     # Examples
     
    @@ -94,6 +88,11 @@ We start with a number of examples that show off what is possible with the propo
     It is expected that these are mostly self-explanatory.
     Read ahead to the next sections for a more systematic description of each element of this proposal.
     
    +A number of our examples here show a few other language features that we hope to progress at the same time. This facility does not strictly rely on these features, and it is possible to do without them - but it would greatly help the usability experience if those could be adopted as well:
    +
    +* expansion statements [@P1306R1]
    +* non-transient constexpr allocation [@P0784R7] [@P1974R0] [@P2670R1]
    +
     ## Back-And-Forth
     
     Our first example is not meant to be compelling but to show how to go back and forth between the reflection domain and the grammatical domain:
    @@ -351,9 +350,9 @@ using points = struct_of_arrays;
     ```
     :::
     
    -## A Universal Print Function
    +## A Universal Formatter
     
    -This example is taken from Boost.Describe, translated to using `std::format` instead of iostreams:
    +This example is taken from Boost.Describe:
     
     ::: bq
     ```cpp
    @@ -401,7 +400,7 @@ int main() {
     ```
     :::
     
    -## Implementing hash_append
    +## Implementing member-wise `hash_append`
     
     Based on the [@N3980] API: