[Development] Proposal: Deprecating platforms in Qt 5.6 that don't support lambda
Thiago Macieira
thiago.macieira at intel.com
Fri Feb 20 02:26:25 CET 2015
On Friday 20 February 2015 00:17:00 Mathias Hasselmann wrote:
> Use std::cref() if not sure about your container's constness.
>
> for (auto const& item : std::cref(c)) { ... }
Do NOT do this. This will crash:
for (auto const &item : std::cref(somefunction()) { ... }
See my other email for an explanation.
And another reason is that std::cref is a C++11 Standard Library addition and
we cannot depend on that yet.
--
Thiago Macieira - thiago.macieira (AT) intel.com
Software Architect - Intel Open Source Technology Center
More information about the Development
mailing list