nholthaus / units

a compile-time, header-only, dimensional analysis and unit conversion library built on c++14 with no dependencies.
http://nholthaus.github.io/units/
MIT License
938 stars 134 forks source link

remove trailing zeros only if the container is a floating point type #274

Closed st-e closed 3 years ago

st-e commented 3 years ago

Removing trailing zeros when using integer containers led to incorrect string representations: to_string(meter<int>(1000)) --> 1 m

coveralls commented 3 years ago

Coverage Status

Coverage remained the same at 0.0% when pulling bd3f7ca59071852b0c5f60a2a06a27a66e077a2b on st-e:v3.x into 702c5437452949eb5915b398f8d1bae7ef87e62b on nholthaus:v3.x.