digitalmars.D - Static Assert?
- Jerry <Jerry_member pathlink.com> Aug 10 2005
- Sean Kelly <sean f4.ca> Aug 10 2005
- "Jarrett Billingsley" <kb3ctd2 yahoo.com> Aug 10 2005
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...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.
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); }
Aug 10 2005








"Jarrett Billingsley" <kb3ctd2 yahoo.com>