Swap furthest element type of an array
Andrej Mitrovic
andrej.mitrovich at gmail.com
Mon Jun 18 19:31:44 PDT 2012
On 6/19/12, Andrej Mitrovic <andrej.mitrovich at gmail.com> wrote:
> On 6/19/12, Andrej Mitrovic <andrej.mitrovich at gmail.com> wrote:
>> On 6/19/12, Timon Gehr <timon.gehr at gmx.ch> wrote:
>>> Indeed. If you are interested, I'll make it work with qualified types as
>>> well. =)
>>
>> I thought it already does?
>>
>
> Oh you meant to *keep* the qualifier, yeah.
>
Well since you conveniently use the "R" alias, I think all that's
needed is this at the end:
static if (is(A T == const))
alias const(R) SwapElem;
else
alias R SwapElem;
More information about the Digitalmars-d-learn
mailing list