[Stepanov]
An example of such an optimization: bool foo(vector<double>& v) { vector<double> u = v; return reduce(v.begin(), v.end()) == reduce(u.begin(), u.end()); } This should be optimized to: bool foo(vector<double>& v) { return true; }
bool foo(vector<double>& v) { vector<double> u = v; return reduce(v.begin(), v.end()) == reduce(u.begin(), u.end()); }
bool foo(vector<double>& v) { return true; }