I need to check if an instance is of a specific type derived from
my base class but this class has template parameter and this type
isn't available at time I'm checking it. Something like:
class B { }
class A(T) : B { }
class X : B { }
class Z : B { }
auto c = can be any derived class from B
b
On Sunday, 14 February 2021 at 08:38:49 UTC, Boris Carvajal wrote:
On Sunday, 14 February 2021 at 07:09:20 UTC, frame wrote:
Although x is well initialized by A by calling opAssign(), the
compiler doesn't care and calls the S!T ctor() on B again and
opAssign() is ignored. Is this a bug or a rul
On Sunday, 14 February 2021 at 07:09:20 UTC, frame wrote:
Although x is well initialized by A by calling opAssign(), the
compiler doesn't care and calls the S!T ctor() on B again and
opAssign() is ignored. Is this a bug or a rule?
It's a rule described here:
https://dlang.org/spec/struct.html