Boost logo

Boost :

Subject: Re: [boost] [units] Interest in UDLs (e.g. _kg) for units?
From: Marek Kurdej (curdeius_at_[hidden])
Date: 2014-08-28 05:29:15


 Looks much nicer!

> Will reduce the user resistance to using Boost.Units - it's a bit verbose
> for mere engineers and scientist's taste ;-)
> But have you implemented it yet?
> (and are there any hidden gotchas? - the proposed C++ time literals
> suffixes proved to be a can of worms :-(
> Paul

I have a partial implementation for mass and length units.
You can have a look at it :
https://github.com/mkurdej/units/tree/feature/user-defined-literals
You guess right, there are some problems to solve with output of quantities
created with literals. See lines with FIXME in test/test_literals.cpp

For those who were sceptic about "megagrams" and so on: that was just an
example.
Actually, I implemented tonnes (t), kilotonnes (kt), Gt and so on.
Still, someone could possibly use Mg, Gg for uniformity... (but I haven't
found such a person yet).

Marek Kurdej

--
Ph.D. candidate

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk