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

Jacob Carlborg doob at me.com
Mon Jul 22 09:54:13 UTC 2019


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.

-- 
/Jacob Carlborg


More information about the Digitalmars-d-learn mailing list