Boost 文件系统库 Visual C++ 编译错误

发布于 2024-07-27 20:13:08 字数 486 浏览 5 评论 0原文

我在尝试使用 Boost 文件系统库编译/运行一些示例程序时遇到以下问题。 我正在使用 MS-Visual C++ 和 Visual Studio .NET (2003)。

我已经使用 BoostPro 安装程序安装了 Boost 库,版本 1.38 和 1.39(以防万一出现版本问题)。

如果我只是尝试包含 /boost/filesystem/operations.hpp 我收到以下错误:

\boost_1_38\boost\system\error_code.hpp(230) : error C2039: 'type' : is not a member of 'boost::enable_if<boost::system::is_error_condition_enum<Cond,boost::detail::enable_if_default_T>'

非常感谢任何帮助。 谢谢你!

I'm having the following issue just trying to compile/run some of the example programs with the Boost Filesystem Library. I'm using MS-Visual C++ with Visual Studio .NET (2003).

I've installed the Boost libraries, version 1.38 and 1.39 (just in case there was a version problem) using the BoostPro installers.

If I just try to include /boost/filesystem/operations.hpp I receive the following error:

\boost_1_38\boost\system\error_code.hpp(230) : error C2039: 'type' : is not a member of 'boost::enable_if<boost::system::is_error_condition_enum<Cond,boost::detail::enable_if_default_T>'

Any help is greatly appreciated. Thank you!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

℡寂寞咖啡 2024-08-03 20:13:08

这听起来像是 SFINAE 不起作用——这可能是 VS 2003 特有的问题。我建议
您编辑该行上定义的构造函数以使其不具有第二个参数。 它可能会导致不太有用的错误消息,但不应破坏任何内容(假设没有其他 1 参数构造函数。

This sounds like SFINAE not working -- which could be a problem specific to VS 2003. I suggest
you edit the constructor defined on that line to not have that second parameter. It might lead to less useful error messages, but should not break anything (given that there's no other 1-argument constructor.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文