本页内容

QDirListing::sentinel Class

class QDirListing::sentinel

该类是在 Qt 6.8 中引入的。

详细说明

QDirListing 返回一个此类型的对象,用于指示迭代结束。对等于sentinel{} 的QDirListing::const_iterator 进行解引用将导致未定义行为。

注意: “经典”的 STL 算法不支持迭代器/哨兵,因此您需要使用 C++20 的 std::ranges 算法来处理 `QDirListing`,或者使用在 C++17 中提供基于范围算法的第三方库。

另请参阅 QDirListing 、QDirListing::const_iterator 以及QDirListing::DirEntry 。

© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.