Skip to content

Merged matching & decode on Boost.Hana serialization #56

Description

@vinipsmaker

I know Boost.Hana serialization code wasn't merged yet. The issue is a future TODO item. I'll tackle it myself. And I don't want to keep my mind busy with this information. So I'll just dump the idea here and get back to it at some point in the future.

So I previously suggested the idea to optionally merge matching/decode phases (for string values only): #44 (comment). Once the feature hits the repo, I can update the Boost.Hana serialization code to make use of it.

The idea is: when I hit a member for which a std::string value is desired, branch the algorithm on:

struct_str_member.capacity() == 0

Do not merge matching/decode steps. Perform a separate match to get the literal() size and reserve enough data in one step. Then collect the string.

struct_str_member.capacity() != 0

Trust the user's size estimate heuristic and just merge matching/decode steps.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions