Dear all,
I have an issue with scaled units. I tried to implement a non-rational
scaling of units adapted from scale<> class (all in boost::units
namespace):
template<class Derived>
struct non_rational_scale
{
static const unsigned long base = 10;
typedef boost::units::static_rational<0> exponent;
typedef double value_type;
static double value() { return Derived::value(); }
static std::string name() { return Derived::name(); }
static std::string symbol() { return Derived::symbol(); }
};
struct electron_volt_scale : non_rational_scale
participants (1)
-
Matthias Wohlgemuth