forked from qt-creator/qt-creator
Algorithm: Improve a recommended usage to more modern C++
Change-Id: Ia2be90e3f9384656a8390dcc948a7b3e0e6a8ca6 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -1101,9 +1101,7 @@ Q_REQUIRED_RESULT R filteredCast(const C &container, F predicate)
|
|||||||
/////////////////
|
/////////////////
|
||||||
|
|
||||||
// Recommended usage:
|
// Recommended usage:
|
||||||
// C hit;
|
// const auto [hit, miss] = Utils::partition(container, predicate);
|
||||||
// C miss;
|
|
||||||
// std::tie(hit, miss) = Utils::partition(container, predicate);
|
|
||||||
|
|
||||||
template<typename C, typename F>
|
template<typename C, typename F>
|
||||||
Q_REQUIRED_RESULT
|
Q_REQUIRED_RESULT
|
||||||
|
Reference in New Issue
Block a user