C++ vector that uses expression templates technique to increase performance of mathematical expressions
Generally speaking, it's pretty good. However, there are still a few things that I would have done differently:


typedef becomes kind of ugly now that we have type aliases. Always using type aliases generally tends to produce more readable and more consistent code:

using size_type = typename std::vector&lt;T&gt;::size_type;

Loop only when you have to. In your std::initializer_list constructor, you don't need to loop; you can use std::vector's constructor taking a pair of iterators instead:

Vec(const std::initializer_list&lt;T&gt;&amp; elements):
    data(std::begin(elements), std::end(elements))
{
}

By the way std::initializer_list tends to be no more than a pair of pointers. You can take it directly by value instead of taking it by const reference.
In operator+ and operator-, I would have placed the return type into the function signature and then used the list initialization syntax in the return statement:

template&lt;typename T1, typename T2&gt;
auto operator+(const T1&amp; t1, const T2&amp; t2)
    -&gt; VecSum&lt;T1, T2&gt;
{
    return { t1, t2 };
}


Whether it is better or not is debatable but when the return type is fixed, rather meaningful and arguably simple, I prefer to expose it in the signature.