Reputation: 291
I am trying to get started with Boost.Units and facing the following issue:
#include <boost/units/quantity.hpp>
#include <boost/units/systems/si/prefixes.hpp>
#include <boost/units/systems/si/length.hpp>
using namespace boost::units::si;
using namespace boost::units;
int main()
{
quantity<length> a(10.0 * centi * meter); //compiles fine
quantity<length> b = 10.0 * centi * meter; //compiler error
}
The error, due to the templated nature of the library, is very long: error: conversion from 'boost::units::multiply_typeof_helper<boost::units::quantity
...
Is this by design, or am I missing something?
Upvotes: 0
Views: 384