Skip to content

Vocabulary Types vs. Traits #1

@mmha

Description

@mmha

Currently, T is used for required fields, option<T> for optional fields and defaulted<T> for optional fields that have a default value. Fields that require a special parser (i. e. gsl::span<T>, index to pointer conversions) are written outside of BOOST_HANA_DEFINE_STRUCT

It may be beneficial to introduce a ignore<T> type to make the struct correctly iterable. Also, it would improve consistency, as every member can be accessed via ->.

Alternatively, this information could probably be injected via type traits specialized on the class and a member pointer. However, this may impair readability of the source code

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