logoalt Hacker News

grg0 • last Sunday at 9:31 PM • 5 replies • view on HN

> pre<std::contracts::controls::enforced>(x > 0)

Ho-lee, guys. We just needed pre(x > 0)


Replies

andrewjf • last Sunday at 9:37 PM

Yeah but why wouldn't "x" be a type that could only represent positive integers?

➕ show 4 replies
mort96 • yesterday at 12:55 AM

I mean you can write that too? It just gets the default configurable behavior. The syntax you quoted lets you force it to always be enforced regardless of compiler config

morcatabiew • last Sunday at 11:22 PM

[dead]

account42 • yesterday at 2:57 PM

Yeah definitially feels like malicious compliance. Hopefully the NBs reject this mess again.