On Sunday, 10 September 2017 at 10:43:24 UTC, Petar Kirov
[ZombineDev] wrote:
Since Phobos always uses the latest compiler frontend, there's
nothing to check ;)
Here's an example of what I mean.
In D 2.074.0, std.format added some compile-time format string
functionality. So if I compile wi
On Sunday, 10 September 2017 at 01:49:42 UTC, Mike Parker wrote:
On Saturday, 9 September 2017 at 16:53:19 UTC, jmh530 wrote:
version(DLANGSEMVER >= 2.076.0)
{
//include static foreach code.
}
but we can't do conditionals in version blocks, so you'd need
a static if. Alternately, we'd also
On Sunday, 10 September 2017 at 02:13:58 UTC, jmh530 wrote:
On Sunday, 10 September 2017 at 01:49:42 UTC, Mike Parker wrote:
But Adam's point about the false branch still holds, so:
static if(__VERSION__ >= 2076)
mixin(`static foreach(i; 0..3) writeln(i);`);
else
writeln("Version too l
On Saturday, 9 September 2017 at 16:30:51 UTC, Jean-Louis Leroy
wrote:
Is there a way to test whether 'static foreach' is available,
e.g. via a version symbol?
Also, is it possible to conditionally compile depending on the
compiler's version, not only the compiler (I mean, not compile
a block
On Sunday, 10 September 2017 at 01:49:42 UTC, Mike Parker wrote:
But Adam's point about the false branch still holds, so:
static if(__VERSION__ >= 2076)
mixin(`static foreach(i; 0..3) writeln(i);`);
else
writeln("Version too low");
The same is true for version statements.
But it woul
On Saturday, 9 September 2017 at 16:53:19 UTC, jmh530 wrote:
version(DLANGSEMVER >= 2.076.0)
{
//include static foreach code.
}
but we can't do conditionals in version blocks, so you'd need a
static if. Alternately, we'd also need a trait or something to
get the semver of the compiler.
A
On Saturday, 9 September 2017 at 17:32:54 UTC, Adam D. Ruppe
wrote:
std.compiler looks useful
http://dpldocs.info/experimental-docs/std.compiler.version_minor.html
Did not realize that was in there. TIL.
On Saturday, 9 September 2017 at 16:30:51 UTC, Jean-Louis Leroy
wrote:
I did look at the docs, several times, couldn't find it...
you should use my unofficial docs
http://dpldocs.info/version
std.compiler looks useful
http://dpldocs.info/experimental-docs/std.compiler.version_minor.html
sta
On Saturday, 9 September 2017 at 16:53:19 UTC, jmh530 wrote:
On Saturday, 9 September 2017 at 16:30:51 UTC, Jean-Louis Leroy
wrote:
Also, is it possible to conditionally compile depending on the
compiler's version, not only the compiler (I mean, not compile
a block if it's GDC version 5.4.1 o
On Saturday, 9 September 2017 at 16:30:51 UTC, Jean-Louis Leroy
wrote:
Also, is it possible to conditionally compile depending on the
compiler's version, not only the compiler (I mean, not compile
a block if it's GDC version 5.4.1 or lower)?
What you really need is a version statement based
Is there a way to test whether 'static foreach' is available,
e.g. via a version symbol?
Also, is it possible to conditionally compile depending on the
compiler's version, not only the compiler (I mean, not compile a
block if it's GDC version 5.4.1 or lower)?
I did look at the docs, several
11 matches
Mail list logo