On Saturday, 6 January 2018 at 23:32:42 UTC, Paul Backus wrote:
On Saturday, 6 January 2018 at 03:38:35 UTC, codephantom wrote:or even..a.append( s.to!ConvertToElementType(a) );That's not valid code of course, but the semantics are all contained in that single chunk.This works: import std.range.primitives: ElementType; a ~= s.to!(ElementType!(typeof(a)));
I think you can just do: s.to!(typeof(a[0]));