On Wednesday, 21 January 2015 at 18:08:44 UTC, bearophile wrote:
The sizeof values aren't relevant for D array casts. What matters are the array "contents".See: void main() { int[5] m = cast(int[5])[1, 2, 3, 4, 5]; assert(m == [1, 2, 3, 4, 5]); pragma(msg, m.sizeof); // 20u pragma(msg, [1, 2, 3, 4, 5].sizeof); // 8u } Bye, bearophile
i'm sorry if I've lead you on a wrong way. My bad.