c++ - 错误:使用已删除的函数 boost::filesystem3::directory_iterator

标签 c++ boost g++ deleted-functions

当我尝试编译 C++ 和 qt 项目时出现这个奇怪的错误:

error: use of deleted function ‘boost::filesystem3::directory_iterator::directory_iterator(const boost::filesystem3::directory_iterator&)’

代码中没有使用delete(),这个错误是什么意思?发生此类错误时我应该寻找什么?

最佳答案

如果您将 std=c++11 与旧的 libboost(如 1.48)一起使用,就会发生这种情况。

解决方案是安装新版本。

参见 this answer还有。

关于c++ - 错误:使用已删除的函数 boost::filesystem3::directory_iterator,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22676324/

相关文章:

c++ - Glvalue 引用一个基类子对象

c++ - 达到基本情况时如何返回值

c++ - 类似于 c++11 中的 boost::mpl::if_

c++ - 同一个线程中的 std::unique_lock 和 std::shared_lock - 不应该工作,但是可以吗?

c++ - 使用 g++ 编译器的 OpenGL C++,无法在 Windows 10 上找到 GLFW(无 Visual Studio)

c++ - Qt Creator - 设置架构标志

c++ - C 链接和 C++ 头文件

c++ - 比较 boost 功能 - 功能签名?

c++ - Boost Graph bellman_ford_shortest_paths 与 labeled_graph

c++ - "control reaches end of non-void function"枚举类型完全处理大小写切换