Skip to content

How to implement aliased quantity types? #502

@mpusz

Description

@mpusz

height, depth, altitude are aliases to the same quantity types. Right now, the library implements them as:

inline constexpr struct height : quantity_spec<length> {} height;
inline constexpr auto depth = height;
inline constexpr auto altitude = height;

which means that the user will always see isq::height in the quantity type even when another aliased name was used in the code.

The feature associated with it is the fact that:

static_assert(isq::height / isq::depth == dimensionless);

Metadata

Metadata

Assignees

No one assigned

    Labels

    designDesign-related discussionquestionFurther information is requested

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions