www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - How to abort compilation

reply "tcak" <1ltkrs+3wyh1ow7kzn1k sharklasers.com> writes:
To keep the story short (if necessary, I can explain the 
use-case), if there any way to abort compilation with a message. 
I would use "static if" or "version" to check a situation, and 
"pragma msg" to show a message. But I couldn't have found any 
"proper" way to abort compilation.
Jul 12 2015
parent Rikki Cattermole <alphaglosined gmail.com> writes:
On 13/07/2015 6:36 p.m., tcak wrote:
 To keep the story short (if necessary, I can explain the use-case), if
 there any way to abort compilation with a message. I would use "static
 if" or "version" to check a situation, and "pragma msg" to show a
 message. But I couldn't have found any "proper" way to abort compilation.
static assert. Like assert only at compile time. I did suggest early on when I joined for e.g. pragma error but Walter & co didn't like it.
Jul 12 2015