|
Boost : |
Subject: Re: [boost] [units] Interest in UDLs (e.g. _kg) for units?
From: Mathias Gaunard (mathias.gaunard_at_[hidden])
Date: 2014-08-25 07:24:08
On 22/08/14 10:08, Curdeius Curdeius wrote:
> Hi all,
>
> I was wondering if there is any interest in adding User-Defined Literals
> (UDLs) to Boost.Units.
>
> IMO, it could simplify some code and improve code readability in some cases.
> For example instead of writing (it's a somehow artificial example)
> 5.34 * si::milli * si::kilogram;
> 1234 * si::kilogram;
> one would write
> 5.34_g;
> 1234_kg;
Did you mean to write
5.34_g * si::milli;
or
5.34_mg;
?
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk