Array of const objects with indirections and std.algorithm.copy

drug007 via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Thu Jul 28 12:19:29 PDT 2016


On 28.07.2016 21:45, Ali Çehreli wrote:
> On 07/27/2016 04:51 AM, drug wrote:
>
>  > cfoo.copy(foo); // fails to compile because phobos in case of array uses
>  >                 // array specialization and this specialization fails
>  >                 // see
>  >
> https://github.com/dlang/phobos/blob/v2.071.1/std/algorithm/mutation.d#L333
>
> Thanks for explaining further. Yes, this is a bug. Although
> areCopyCompatibleArrays!(const(Foo)[], Foo[]) is true,
> std.algorithm.copy of that specialization fails. Please create a bug
> report at
>
>    https://issues.dlang.org/
>
> Thank you,
> Ali
>
Thank you too.
done https://issues.dlang.org/show_bug.cgi?id=16332


More information about the Digitalmars-d-learn mailing list