Kinds of containers

Kagamin via Digitalmars-d digitalmars-d at puremagic.com
Sat Oct 24 13:41:52 PDT 2015


On Friday, 23 October 2015 at 17:44:55 UTC, deadalnix wrote:
> void foo(T)(const Collection!const(T) c) {}
> void main() {
>   Collection!T c;
>   foo(c); // Error, GTFO !
> }

How about this?

void f(T)(const Collection!T c)
{
   const Collection!(Unqual!T) cc = c;
}


More information about the Digitalmars-d mailing list