Copy Constructor DIP and implementation

Nicholas Wilson iamthewilsonator at hotmail.com
Thu Sep 13 00:05:23 UTC 2018


On Wednesday, 12 September 2018 at 23:55:05 UTC, Nicholas Wilson 
wrote:
> The bog-standard way of dealing with avoidable breakage with 
> DIPs is a -dip-10xx flag. In this case, if set, would prefer to 
> call copy constructors over blit + postblit.
>
> Also adding @implicit is a backwards incompatible change to a 
> codebase that wants to use it as it will cause it to fail on 
> older compilers.  Even if one does :
>
> static if (__VERSION__ < 2085) // or whenever it gets 
> implemented
>      enum implicit;
> all over the place,
>
>> It is illegal to declare a copy constructor for a struct that 
>> has a postblit defined and vice versa:

Hmm, I suppose one could
  static if (__VERSION__ < 2085)
  // use a postblit
else
// use a copy ctor.


More information about the Digitalmars-d-announce mailing list