Skip to content

strong_typedef: numeric_limits #129

@BrukerJWD

Description

@BrukerJWD

I'm new to this lib, but I like the idea very much.

What about numeric_limits?
I know that std::chrono:duration defines them on the type itself, but I would also be happy with some external limits type. What I don't like is this amount of characters:

struct my_type
    : type_safe::strong_typedef<my_type, std::int32_t>
    , type_safe::strong_typedef_op::equality_comparison<my_type>
    , type_safe::strong_typedef_op::relational_comparison<my_type>
    , type_safe::strong_typedef_op::integer_arithmetic<my_type>
{}
constexpr my_type max { std::numeric_limits<ts::underlying_type<my_type>>::max() };

what about something like my_type::max()?

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