[Issue 15045] [Reg 2.069-devel] hasElaborateCopyConstructor is true for struct with opDispatch

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Mon Sep 14 10:58:07 PDT 2015


https://issues.dlang.org/show_bug.cgi?id=15045

--- Comment #3 from Martin Nowak <code at dawg.eu> ---
(In reply to Kenji Hara from comment #2)
> IMHO, it would be better to prevent forwarding some built-in special member
> names prefixed by double-underscore through alias this or opDispatch.
> 
> As we've already patched in library code like,
> 
>  https://github.com/D-Programming-Language/druntime/pull/1313
> 
> forwarding of __xpostblit and __xdtor are hardly useless.
> 
> From the dmd internal view, 
> the complete list of "no forward" members would be:
> 
> __ctor (Id.ctor)
> __dtor (Id.dtor)
> __xdtor (Id.__xdtor)
> __postblit (Id.postblit)
> __xpostblit (Id.__xpostblit)

Oh yes, that's a much better solution. The semantics of those builtin member
functions don't make sense with forwarding (through alias this or for
opDispatch) anyhow.

--


More information about the Digitalmars-d-bugs mailing list