【问题标题】:boost/static_assert.hpp includes itselfboost/static_assert.hpp 包含自身
【发布时间】:2017-09-19 01:32:43
【问题描述】:

我下载了适用于 Windows 的最新和最强大的增强版,即 1.65.1(zip 文件)。编译一个项目,我现在得到 static_assert.hpp 包含自身的错误。果然,这里是完整的:

//Copyright (c) 2008-2016 Emil Dotchevski and Reverge Studios, Inc.
//Distributed under the Boost Software License, Version 1.0. (See accompanying
//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

#ifndef BOOST_QVM_STATIC_ASSERT
#include <boost/static_assert.hpp>
#define BOOST_QVM_STATIC_ASSERT BOOST_STATIC_ASSERT
#endif

我以前的版本 1.62 有一个 static_assert.hpp,其中加载了大量的宏和大写的乱码。

我需要做什么?

编辑:我下载了 boost_1_65_1.7z 存档,没问题。问题解决了。有人可以将此报告给提振的人吗?

【问题讨论】:

    标签: c++ windows boost


    【解决方案1】:

    您似乎有冲突的包含路径。 boost中有多个static_assert.hpp文件,你粘贴的static_assert.hpp的内容来自boost/qvmboost/static_assert.hpp 即使在 1.65.1 中也确实有大量宏。

    我建议您将static_assert.hpp 包含为boost/static_assert.hpp 以避免包含路径混淆。

    【讨论】:

    • 不,正如我所说,我粘贴的内容来自 boost/static_assert.hpp。该文件有问题。在 .zip 存档中。在 .7z 存档中是正确的。
    • 对不起,你没有这么说。您解释说这些是 static_assert.hpp 的内容,您没有指定路径。
    • @JiveDadson 您粘贴的代码是来自boost/qvm/static_assert.hpp 的代码(仅通过查看宏就很明显)。
    【解决方案2】:

    当我使用 .7z 存档而不是 .zip 进行安装时,一切都很好。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-03-16
      • 1970-01-01
      • 2015-11-08
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多