Why isn't int[] automatically convertible to long[]?

2015-09-03 Thread Jack Stouffer via Digitalmars-d-learn
pragma(msg, is(int[] : long[])); false Why?

Re: Why isn't int[] automatically convertible to long[]?

2015-09-03 Thread Adam D. Ruppe via Digitalmars-d-learn
On Thursday, 3 September 2015 at 17:27:03 UTC, Jack Stouffer wrote: pragma(msg, is(int[] : long[])); false Why? Think of the memory layout... if you implicitly casted, either the contents would change or it would need to allocate a new array, neither of which is free. [0, 1] as int