Today I used boost-units
for the first time and I was really satisfied with the outcome.
Unfortunately, I'm not completely satisfied with the display of the operator<<
for a given unit.
The following code prints m s^-2
on the console:
#include <boost/units/systems/si/acceleration.hpp>
#include <boost/units/io.hpp>
#include <iostream>
int main(int argc, char**args) {
using namespace boost::units;
using namespace boost::units::si;
std::cout << acceleration() << std::endl;
return 0;
}
I'm wondering if there is an easy way to change the output to something like m/(s^2)
or even m/s^2
. I think, that this kind of representation might be easier to read.