Skip to content

Feature: mph integration for finding struct fields #65

@IndianBoy42

Description

@IndianBoy42

It would be nice to have a function with a signature like:

auto reflect::find<T>(std::string_view field_name)

returning the same thing we get in reflect::for_each and using a perfect hash to find the field (right now I just loop through all fields to find it)

The other possibility is something like reflect::enumerators but reflect::fields<I> which returns a lookup table between the field names and the field index which can be passed to reflect::get, reflect::member_name, reflect::type_name, etc. Which can be passed to a perfect hash library

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions