Boost logo

Boost Users :

Subject: Re: [Boost-users] Boost.Units Example: Convert between nautical mile and imperial foot
From: Carel Combrink (carel.combrink_at_[hidden])
Date: 2018-09-27 06:45:49


> > The library has no way to know what the correct
> > intermediate unit is.
>
> Yes, that's what I said.
>
I expected as much.

What lead me to believe that this was possible was the wording in the docs:
"These units include conversions between themselves and the meter.",
I was not sure what the "themselves" referred to, my assumption/hope was
clearly wrong.

>
> > You can use BOOST_UNITS_DEFAULT_CONVERSION to specify.
> > (Yes, I know this is kind of clunky).
>
> Oddly, given these:
>
> BOOST_UNITS_DEFAULT_CONVERSION(imperial::length_base_unit, si::length);
> BOOST_UNITS_DEFAULT_CONVERSION(nautical::length_base_unit, si::length);
>

Can this *please *be added to the docs on that specific example.

Thanks Steven and Gavin for the help, exactly what I was looking for.
Regards,



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net