On Saturday, 13 February 2016 at 00:41:35 UTC, tsbockman wrote:
On Friday, 12 February 2016 at 23:46:09 UTC, Kapps wrote:
You'll encounter this pretty often in Phobos I think. I really
don't think @nogc is ready, and tend to avoid it in my code.
Exceptions are a big reason for it, and lots of f
On Friday, 12 February 2016 at 23:46:09 UTC, Kapps wrote:
You'll encounter this pretty often in Phobos I think. I really
don't think @nogc is ready, and tend to avoid it in my code.
Exceptions are a big reason for it, and lots of functions in
Phobos throw exceptions which prevents them from bei
On Thursday, 11 February 2016 at 12:41:16 UTC, rcorre wrote:
On Thursday, 11 February 2016 at 04:20:13 UTC, tsbockman wrote:
On Thursday, 11 February 2016 at 03:09:51 UTC, rcorre wrote:
I recently tried compiling enumap with GDC, and found that it
disagrees with DMD on whether a function is @no
On Thursday, 11 February 2016 at 12:55:02 UTC, rcorre wrote:
Though it appears (in 2.070 at least) that zip's range
primitives aren't nogc:
I took a look at the source code for `zip()`, and the cause of
this deficiency is that `Zip` takes a `StoppingPolicy` as a
runtime parameter, rather than
On Thursday, 11 February 2016 at 12:41:16 UTC, rcorre wrote:
On Thursday, 11 February 2016 at 04:20:13 UTC, tsbockman wrote:
Using zip and slices guarantees that the structure returned
will be only 5*size_t.sizeof bytes, regardless of the types of
K and V.
I'm on the DMD 2.070 release, so may
On Thursday, 11 February 2016 at 04:20:13 UTC, tsbockman wrote:
On Thursday, 11 February 2016 at 03:09:51 UTC, rcorre wrote:
I recently tried compiling enumap with GDC, and found that it
disagrees with DMD on whether a function is @nogc. Here's a
semi-reduced test-case:
Here's an @nogc versio
On Thursday, 11 February 2016 at 03:09:51 UTC, rcorre wrote:
I recently tried compiling enumap with GDC, and found that it
disagrees with DMD on whether a function is @nogc. Here's a
semi-reduced test-case:
Here's an @nogc version of `byKeyValue()`:
@nogc auto byKeyValue() const {
static im
On Thursday, 11 February 2016 at 03:09:51 UTC, rcorre wrote:
GDC claims that byKeyValue() allocates a closure, but DMD is
just fine with me calling it @nogc. I'm inclined to agree with
GDC here, unless DMD is doing some magic so that actually
doesn't allocate a closure.
I cannot reproduce you
I recently tried compiling enumap with GDC, and found that it
disagrees with DMD on whether a function is @nogc. Here's a
semi-reduced test-case:
---
import std.range;
import std.traits: EnumMembers;
import std.typecons : tuple, staticIota;
import std.algorithm : map;
struct Enumap(K, V)