Hello,
I have created an extension to Boost.Units to support data sizes (bit /
byte / kilobit / etc.) and data rates (bit per sec / Byte per sec /
kbps / etc.), trying to mimic the logic behind the SI, GCS systems, so
it might be added to the library after some review and fixes. Please see
the attachment for the code (8 kB zip).
Before that, a problem has to be fixed in my implementation: If I define
the unit byte_per_second using make_scaled_unit and bit_per_second, I
get a mile-long template error about not being able to figure out the
prefix when I try to convert a quantity using that unit to string. I did
a workaround for this problem using decltype(), but that requires
including data_size.hpp and time.hpp to data_rate.hpp (although I don't
know if it is a problem), and also, it only works on compilers
supporting c++0x. You can see this workaround starting at line 40 in
boostex/units/systems/data/data_rate.hpp. If I comment back line 41, and
comment out line 44-45, the following will not compile:
quantity