--- Comment #6 from Marc Glisse <glisse at gcc dot> ---
GMP's expression templates, which are based on libstdc++ valarray, have the
same issue. I tried using values in GMP ( ). I never
committed it for lack of time, but it seemed to improve performance as well,
not just safety. Somehow gcc/llvm had an easier time seeing through the
expressions with (copied) values. Not sure this applies to valarray though,
since the expressions have bounded depth there.

The real solution is still to avoid mixing auto with expression templates, at
least until we get some version of what was once proposed as "operator auto".
Maybe invent some [[warn_auto]] attribute?

Reply via email to