Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

error:previous definition of 'struct boost::is_unsigned< ::boost::long_long_type>:public false_type{}' g++ version 5.4.0 How can I fix it?

未关闭
#113 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
28/100
Issue 类型
缺陷
描述清晰度
需要澄清
活跃度
停滞
技术栈
cpp
领域
build-system

调研方向

从 hyperscan/src/nfa/mcclellancompile.cpp 第 63 行开始,检查所包含的 Boost Range 头文件,尤其是 boost/range/adaptor/map.hpp 以及报告的 type-trait 错误。使用 g++ 5.4.0 重现构建,并记录相关的 Boost 版本;当项目能够在没有重复定义 is_signed 和 is_unsigned 的情况下完成编译时,即表示完成。

由索引模型根据 Issue 内容生成。

描述

In file included from /usr/include/boost/type_traits/make_unsigned.hpp:13:0,
from /usr/include/boost/range/size_type.hpp:24,
from /usr/include/boost/range/size.hpp:21,
from /usr/include/boost/range/functions.hpp:20,
from /usr/include/boost/range/iterator_range_core.hpp:38,
from /usr/include/boost/range/iterator_range.hpp:13,
from /usr/include/boost/range/adaptor/transformed.hpp:16,
from /usr/include/boost/range/adaptor/map.hpp:14,
from /home/kylin/桌面/hyperscan/hyperscan/hyperscan/src/nfa/mcclellancompile.cpp:63:
/usr/include/boost/type_traits/is_signed.hpp:126:20: error: redefinition of ‘struct boost::is_signed’
template <> struct is_signed : public true_type{};
^
/usr/include/boost/type_traits/is_signed.hpp:125:20: error: previous definition of ‘struct boost::is_signed’
template <> struct is_signed< ::boost::long_long_type> : public true_type{};
^
In file included from /usr/include/boost/type_traits/make_unsigned.hpp:14:0,
from /usr/include/boost/range/size_type.hpp:24,
from /usr/include/boost/range/size.hpp:21,
from /usr/include/boost/range/functions.hpp:20,
from /usr/include/boost/range/iterator_range_core.hpp:38,
from /usr/include/boost/range/iterator_range.hpp:13,
from /usr/include/boost/range/adaptor/transformed.hpp:16,
from /usr/include/boost/range/adaptor/map.hpp:14,
from /home/kylin/桌面/hyperscan/hyperscan/hyperscan/src/nfa/mcclellancompile.cpp:63:
/usr/include/boost/type_traits/is_unsigned.hpp:131:20: error: redefinition of ‘struct boost::is_unsigned’
template <> struct is_unsigned : public false_type{};
^
/usr/include/boost/type_traits/is_unsigned.hpp:130:20: error: previous definition of ‘struct boost::is_unsigned’
template <> struct is_unsigned< ::boost::long_long_type> : public false_type{};

/home/kylin/桌面/hyperscan/hyperscan/hyperscan/src/nfa/mcclellancompile.cpp line 63
#include <boost/range/adaptor/map.hpp>

主要语言
C++
星标
45
派生
104
PR 合并指标
30 天内没有已合并 PR

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

boostorg/range 的其他 Issue

查看 boostorg/range 的全部 Issue

相似的 Issue

更多 C++ Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。