Kinds of containers
Timon Gehr via Digitalmars-d
digitalmars-d at puremagic.com
Sat Oct 24 16:12:54 PDT 2015
On 10/24/2015 09:33 PM, David Nadlinger wrote:
> On Friday, 23 October 2015 at 17:44:55 UTC, deadalnix wrote:
>> Collection!T and Collection!const(T) are 2 completely different types.
>
> Isn't this also required anyway because of covariance vs. contravariance
> considerations?
>
> — David
(I'm assuming 'this' is referring to a solution to the problem.)
Yes, basically one often wants bit-by-bit conversions between structs
whose fields corecursively convert to each other bit-by-bit. If we had
opImplicitCastTo, this could probably be implemented (somewhat
inefficiently) in the library, but a targeted language feature might be
in order.
More information about the Digitalmars-d
mailing list