title: Expression templates and ranged based for in C++11
body: <p>It is my understanding that expression templates will break on ranged based for in C++11, as <code>for (auto x : expr)</code> has an implicit <code>auto&amp;&amp; __range = expr</code> in it, and this will result in dangling references.</p>
  
  <p>Is there a way create expression template classes so that they either behave correctly with ranged based for, or at the very least throw a compile error?</p>
  
  <p>Basically, I'd like to prevent the possibility that expression templates would correctly compile but fail at run time due to dangling references. I don't mind having to wrap expression templates in something before using them in a ranged based for, as long as there are no silent run-time errors if the user forgets to wrap the expression templates.</p>