which works perfectly, but I'm also writing a SSE optimized version, and this is where my problem is.
For the SSE version I needed to shuffle the input vectors' components (b in the example) a certain way, so that its components modify the original vector's components (a in the example) properly.
I implemented it using some helper macros that are evaluated in compile time: https://github.com/Yours3lf/libmymath/blob/master/mymath/mm_fvec3_impl.h#L27
(macro on line 21)
However this macro solution turned out to take really long time to compile on both Visual Studio 2013 and 2015RC as well.
I tried to use constexpr too, but VS does not support it properly yet.
Do you have any idea on how I could implement the SSE version in a way that it does not make the compilation slow?
@Duoas I think so, because without it the compilation times are fine. It is possible though that the combination of all the tricks involved in making swizzling work makes the compilers go mad.
Tried it on GCC too, it performed better, but it was still slow.