On Sunday, 21 February 2016 at 21:48:21 UTC, Steven Schveighoffer
wrote:
This isn't a bug. Here is what happens.
1. template this is assigned the compile-time type of the
object *when the function is called*.
2. A base class constructor is called from the next derived
constructor. So C2's
Hi! I'm struggling to use "Template This Parameters" feature(as
described in
https://dlang.org/spec/template.html#TemplateThisParameter) in
class constructor. But it's usage isn't documented very clearly
and I'm not even sure if it's supposed to work this way. Consider
the following example:
Okay, I've cleared up some misconception.
On Wednesday, 6 January 2016 at 03:22:47 UTC, Vlad Leberstein
wrote:
The same happens with immutable class(there is related thread
with workaround at
Hi!
I've stumbled into some strange problem. I'm trying to put an
immutable struct into std.variant.Variant but get some
compilation error(but only when struct has at least one member).
Stripped down example(tested on Linux dmd64 v2.069.2):
import std.variant : Variant;
immutable struct
Hi! My use case requires interaction with C API which in turn
implies storing object instance reference as void *. I'm using
gdc 4.9.2 and everything worked fine with object - void * -
object conversion, but object - void * - interface failed.
The stripped-down example is something like this:
auto self = cast(TestInterface)cast(Object) rawSelf
Works like a charm! Thank you both!