It's unrelated to the original question, but I urge you to use array syntax at line 5: for (size_t i = 0; i < 4; ++i) e[i] = (val_a[i] < val_b[i]) ? val_a[i] : val_b[i]);
or even better: for (size_t i = 0; i < 4; ++i) e[i] = std::min(val_a[i], val_b[i]);