Skip to content

SFINAE check for operators #1

@skident

Description

@skident

Consider enabling operators in a Property class if those operators are available in a wrapped type.
For example std::vector and std::map have an operator[] and if there is no specialization of a Property class for those types, you cannot use operator[] directly, but need to get .value first.

Without specialization

 auto& title = config.app->main_menu.value[0].title;

With specialization

 auto& title = config.app->main_menu[0].title;

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