[Issue 7413] Vector literals don't work

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Mar 11 12:11:39 PDT 2012


http://d.puremagic.com/issues/show_bug.cgi?id=7413



--- Comment #4 from Manu <turkeyman at gmail.com> 2012-03-11 12:11:46 PDT ---
Walter had planned to use standard array literal syntax as far as I knew:
float4 v = [1.0, 2.0, 3.0, 4.0];
shourt8 sv = [1,2,3,4,5,6,7,8];

How he intended to disambiguate the type, I have no idea.
Vector literals must be 128bit aligned, so the compiler needs to recognise
they're being assigned to a vector and treat them special.
It sounds better to have an explicit literal syntax to me.

I guess there's always this option, but it's horrible:
int4 v = __vector([1,2,3,4]);

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list