__restrict, architecture intrinsics vs asm, consoles, and other

so so at so.so
Fri Sep 23 06:09:31 PDT 2011


On Fri, 23 Sep 2011 06:44:44 +0300, Andrei Alexandrescu  
<SeeWebsiteForEmail at erdani.org> wrote:

> On 9/22/11 9:11 PM, so wrote:
>> On Fri, 23 Sep 2011 02:40:11 +0300, Andrei Alexandrescu
>> <SeeWebsiteForEmail at erdani.org> wrote:
>>
>>> On 9/22/11 6:00 PM, so wrote:
>>>> On Thu, 22 Sep 2011 17:07:25 +0300, Andrei Alexandrescu
>>>> <SeeWebsiteForEmail at erdani.org> wrote:
>>>>
>>>>> I think we should put swizzle in std.numeric once and for all. Is
>>>>> anyone interested in taking up that task?
>>>>
>>>> You mean some helper functions to be used in user structures?
>>>
>>> I was thinking of a template that takes and return T[n].
>>>
>>> Andrei
>>
>> Something like this?
>
> Looks promising, though I was hoping to not need an additional struct V.  
> But I'm not an expert.
>
> Andrei

It was there to show how it should be used in user code, and testing.
Swizzle is not just a rvalue operation, there is also a lvalue part to it  
which plays a bit differently (hence, swizzleR and swizzleL).
We could take care of it with an overload but D doesn't act quite like  
what i expected (like C++), i don't understand why it won't differentiate  
"fun()" from "fun() const".


More information about the Digitalmars-d mailing list