.select_on_container_copy_construction 左侧的 C++ boost::container::vector 必须具有类/结构/联合

Posted

技术标签:

【中文标题】.select_on_container_copy_construction 左侧的 C++ boost::container::vector 必须具有类/结构/联合【英文标题】:C++ boost::container::vector left of .select_on_container_copy_construction must have class/struct/union 【发布时间】:2014-05-25 20:56:01 【问题描述】:

正如标题所说,我正在尝试在我的可执行文件中使用boost::container::vector,但出现以下错误 `left of'.select_on_container_copy_construction' 必须有 class/struct/union/ inside 文件

has_member_function_callable_with.hpp

这是产生此错误的代码

   template< class F , size_t N =sizeof((boost::move_detail::declval<F>().BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME(),0))>
     struct BOOST_PP_CAT(zeroarg_checker_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME)
     
        boost_intrusive_has_member_function_callable_with::yes_type dummy;
        BOOST_PP_CAT(zeroarg_checker_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME)(int);
     ;

我使用 Visual Studio 2013 Ultimate 作为编译器

【问题讨论】:

你能展示你自己的代码吗?还是上下文?最好是 SSCCE? 我的代码只包含 boost::container::vector&lt;std::string&gt; boost_vecTest; 没有别的,我在某处读到 Boost 没有完整的 VS 2013 支持。 应该,不过。我很确定我已经使用它(我的意思是矢量实现),带有 RTM 版本 要做两件事:1)从git获取当前的提升,看看他们是否已经修复它; 2) 如果仍然失败,请报告给 boost 的错误跟踪器。 【参考方案1】:

对于那些像我一样找到这个帖子的人来说,这似乎是一个 boost 1.55.0 问题。升级到 1.59.0 对我和其他人都有帮助(也发布在 *** 上)

【讨论】:

以上是关于.select_on_container_copy_construction 左侧的 C++ boost::container::vector 必须具有类/结构/联合的主要内容,如果未能解决你的问题,请参考以下文章