Re: [Development] qMoveToConst helper for rvalue references to movable Qt containers?

2018-10-20 Thread Elvis Stansvik
Den lör 20 okt. 2018 kl 18:53 skrev Giuseppe D'Angelo via Development : > > Il 20/10/18 14:43, Elvis Stansvik ha scritto: > > In our application we added a helper like > > > > template > > const T moveToConst(T &) > > { > > return std::move

[Development] qMoveToConst helper for rvalue references to movable Qt containers?

2018-10-20 Thread Elvis Stansvik
Hi all (first post), In Qt 5.7+ there's qAsConst, an std::as_const implementation for those who are not on C++17 yet, which is convenient for iterating over Qt containers using range-based for loops without causing a detach. For good reasons there's no version of qAsConst that takes an rvalue

<    1   2