Units of Measurement Library: units-d

ag0aep6g via Digitalmars-d-announce digitalmars-d-announce at puremagic.com
Fri Apr 1 14:46:35 PDT 2016


On 01.04.2016 22:59, Simen Kjaeraas wrote:
> The usual way to fix it would be to include __FILE__ and __LINE__ in the
> template arguments:

Right, no mixin this way. I wouldn't call this "truly nice", though.

It depends on code formatting to work. Put everything on one line and it 
breaks. Significant whitespace is a pain when generating code. Though 
this is not nearly as bad as significant indentation, of course.

__FILE__ also kind of breaks separate compilation. All object files have 
to be compiled from the same directory. Otherwise __FILE__ will be 
different.

__LINE__ has a similar (maybe even more obscure) issue. Add or remove a 
newline before compiling dependent modules and things break. Usually, 
one recompiles all dependents when a dependency changes, but a 
significant newline, really?


More information about the Digitalmars-d-announce mailing list