Re: am I using version right?
On Tuesday, 12 March 2019 at 17:07:11 UTC, DFTW wrote: In that code, the static assert() will run if and only if neither version condition is true, i.e, the OS is neither Windows nor linux. Correct? yes, that's right.
am I using version right?
version(Windows) { writeln("Hello from Windows system!"); } else version(linux) { writeln("hello from linux!"); } else static assert(0, "unknow system!"); In that code, the static assert() will run if and