aurora-opensource / au

A C++14-compatible physical units library with no dependencies and a single-file delivery option. Emphasis on safety, accessibility, performance, and developer experience.
Apache License 2.0
329 stars 21 forks source link

Default construct rep inside quantity #296

Closed chiphogg closed 1 month ago

chiphogg commented 1 month ago

This won't change any actual values when the rep is a fundamental arithmetic type, but it is more stylistically consistent with the idea of a "default constructor".

We also update our contract to officially promise that we do this. This lets us get rid of the scary/threatening language that "we might change this out from under you!", even though we never had any intention to actually do so. We retain the encouragement to use au::ZERO, and to avoid using a default-constructed Quantity for anything other than future assignment.

Fixes #273.