Fix build with C++20

"erase" without namespace conflicts with std::erase, with the latter
taking precedence.

Amends 9929d3dd73

Fixes: QTCREATORBUG-26386
Change-Id: I7fa64827ad61f1da262ce48082854975bc431c69
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
Eike Ziller
2021-10-18 11:00:52 +02:00
parent 39b36bf773
commit 57b5cd69b9

View File

@@ -376,7 +376,7 @@ void Project::setExtraProjectFiles(const QSet<FilePath> &projectDocumentPaths,
const QSet<FilePath> toAdd = uniqueNewFiles - existingWatches; const QSet<FilePath> toAdd = uniqueNewFiles - existingWatches;
const QSet<FilePath> toRemove = existingWatches - uniqueNewFiles; const QSet<FilePath> toRemove = existingWatches - uniqueNewFiles;
erase(d->m_extraProjectDocuments, [&toRemove](const std::unique_ptr<IDocument> &d) { Utils::erase(d->m_extraProjectDocuments, [&toRemove](const std::unique_ptr<IDocument> &d) {
return toRemove.contains(d->filePath()); return toRemove.contains(d->filePath());
}); });
if (docUpdater) { if (docUpdater) {