Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow any type, including predefined ones, to become a base unit #22

Closed
erikerlandson opened this issue Aug 8, 2017 · 1 comment
Closed

Comments

@erikerlandson
Copy link
Owner

The coefficient of a base unit is always 1. The only thing I need for a base unit is (1) a way to detect that it is a base unit, and (2) long and abbreviated name.

Allowing any type to serve as a base unit might be very powerful - associating quantities with any kind of object.

Directly declaring an implicit UnitDecl is one possible option, or using a special variation to detect when something is declared as a BaseUnit directly, or if it is being applied to an existing type

@erikerlandson
Copy link
Owner Author

I have implemented this (opt-in policy) on #66

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant