On 2015-02-19 20:26, Thiago Macieira wrote: > Do NOT do this. This will crash: > > for (auto const &item : std::cref(somefunction()) { ... }
Does it crash without the std::cref? If not... seems like a good argument to support a free 'const'... > And another reason is that std::cref is a C++11 Standard Library addition and > we cannot depend on that yet. ...but so is range-based for (and auto). -- Matthew _______________________________________________ Development mailing list Development@qt-project.org http://lists.qt-project.org/mailman/listinfo/development