Kinds of containers

Andrei Alexandrescu via Digitalmars-d digitalmars-d at puremagic.com
Sun Oct 25 14:15:40 PDT 2015


On 10/25/2015 05:06 PM, Timon Gehr wrote:
>
> class A{};
> class B: A{};
>
> int main(){
>      vector<A*> a;
>      vector<B*> b;
>      a=b;
> }
>
> However, the conversion would be safe.

Agreed. I don't see that as an important matter though; it's after all a 
coercion so a function call is plenty fine. -- Andrei




More information about the Digitalmars-d mailing list