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

标签 c++ boost vector

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

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 作为编译器

最佳答案

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

关于.select_on_container_copy_construction 左侧的 C++ boost::container::vector 必须具有类/结构/union ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23859880/

相关文章:

c++ - 将 RANSAC 应用于 vector<Point2f> 以进行相似性变换

c++ - c++11 中是否有 shared_memory_object 的替代品

c++ - 如何在 64 位 osx 上为 i386 构建 boost?

c++ - pair<int, int> vector 的哈希函数

c++ - std::vector 比普通数组快吗?

c++ - 使用迭代器向 vector 插入元素没有效果

c++ - 将指针 push_back 到指针 vector 中是内存泄漏吗?

c++ - 在工作目录之外的 C++ 中打开文件

c++ - 将 std::set 与自定义比较器进行比较

c++ - boost io_service 非阻塞并行执行?