Re: Vector Swizzling in D
Thanks for the suggestions, I updated the article with an improved CTFE version at the end.
Re: Vector Swizzling in D
On Wednesday, 14 March 2012 at 17:35:06 UTC, Don Clugston wrote: In the last bit of code, why not use CTFE for valid(string s) instead of templates? bool valid(string s) { foreach(c; s) { if (c 'w' || c 'z') return false; } return true; } In fact you can use CTFE for the