Feature request: assert expressions should live inside version(assert)

Andrej Mitrovic andrej.mitrovich at gmail.com
Sun Jul 7 05:30:16 PDT 2013


On 7/7/13, Tommi <tommitissari at hotmail.com> wrote:
> Sometimes you need to have some extra data to check against in
> the assert expression. That data isn't needed in release mode
> when assertions are ignored. Therefore, you put that extra data
> inside a version(assert). But then those assertions fail to
> compile in release mode because the symbol lookup for that extra
> data fails. For this reason, assert statements should live inside
> version(assert) blocks by default.

I've ran into an issue when implementing this feature back in February
(see the pull request):

http://d.puremagic.com/issues/show_bug.cgi?id=9450
https://github.com/D-Programming-Language/dmd/pull/1614


More information about the Digitalmars-d mailing list