Implicit conversion of concatenation result to immutable
Ali Çehreli
acehreli at yahoo.com
Thu Apr 1 23:21:56 UTC 2021
On 4/1/21 3:44 PM, Per Nordlöw wrote:
> On Thursday, 1 April 2021 at 22:35:57 UTC, Steven Schveighoffer wrote:
>> Yes, always an allocation. See point 5 here:
>> https://dlang.org/spec/arrays.html#array-concatenation
>
> Good, then the implicit conversion should be allowed. Anybody up for the
> job? If not, I'm gonna look into it.
As I mentioned elsewhere in this thread, the element type must not have
indirections though. If S is a struct with indirections, concatenating
const(S)[] should still produce const(S)[].
Ali
More information about the Digitalmars-d
mailing list