digitalmars.D - Static Assert?
- Jerry (2/2) Aug 10 2005 What's the difference between static assert and the normal assert functi...
- Sean Kelly (4/5) Aug 10 2005 Static assert is evaluated at compile-time. It can be useful to validat...
- Jarrett Billingsley (15/21) Aug 10 2005 I also use it for checking versions, i.e.
What's the difference between static assert and the normal assert function? -J
Aug 10 2005
In article <dddh7r$jof$1 digitaldaemon.com>, Jerry says...What's the difference between static assert and the normal assert function?Static assert is evaluated at compile-time. It can be useful to validate template parameters and such. Sean
Aug 10 2005
"Sean Kelly" <sean f4.ca> wrote in message news:dddin6$ld9$1 digitaldaemon.com...In article <dddh7r$jof$1 digitaldaemon.com>, Jerry says...I also use it for checking versions, i.e. version(VersionOne) { } else version(VersionTwo) { } else { // There must be either VersionOne or VersionTwo defined // Fail if there isn't static assert(0); }What's the difference between static assert and the normal assert function?Static assert is evaluated at compile-time. It can be useful to validate template parameters and such.
Aug 10 2005