Is there a way to bypass the file and line into D assert function ?

Newbie2019 newbie2019 at gmail.com
Mon Jul 22 13:00:23 UTC 2019


On Monday, 22 July 2019 at 09:54:13 UTC, Jacob Carlborg wrote:
> On 2019-07-19 22:16, Max Haughton wrote:
>
>> Isn't assert a template (file and line) rather than a plain 
>> function call?
>
> No. It's a keyword, it's built-in to the compiler. It get extra 
> benefits compared to a regular functions: the asserts will be 
> removed in release builds.

Thanks for explain.


More information about the Digitalmars-d-learn mailing list