[Issue 17593] __POS__ magical constant like __FILE__ and friends

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Wed Jul 5 04:59:08 PDT 2017


https://issues.dlang.org/show_bug.cgi?id=17593

--- Comment #4 from Vladimir Panteleev <dlang-bugzilla at thecybershadow.net> ---
(In reply to Eyal from comment #2)
> So alternatively to adding __POS__, dmd could be fixed so that __LINE__ is
> based on its *lexical* position. i.e: same value for __LINE__ in a default
> CT param value and when it is given to Pos() inside a default CT param value.

That seems like the way to go here IMO. As described, __POS__ seems a bit too
specific to your logging framework, whereas the above should be a more
universal improvement.

--


More information about the Digitalmars-d-bugs mailing list