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

Replace `integer_quotient` with `unblock_int_div` #315

Closed chiphogg closed 4 weeks ago

chiphogg commented 4 weeks ago

Instead of integer_quotient(a, b), we now always write a / unblock_int_div(b). This gives us everything we used to have with integer_quotient, but with two big advantages:

  1. The form for the units code becomes more similar to the non-units code that it replaces (i.e., we're using the / symbol).

  2. We can now support templated code that works for both integral and non-integral types: a / unblock_int_div(b) works equally well for, say, b with floating point rep.

There's no longer any use case for integer_quotient. We therefore immediately deprecate it. We will keep it deprecated for the entirety of the 0.4.0 cycle, and remove it for 0.5.0.

Fixes #253.