我正在使用linux。 我试图从提升1_45传递到提升1_49。 我的代码使用了增强1_45和gcc。
我用多个编译器编译我的代码
使用boost 1_49_0:
使用gcc 4.4它可以工作。 (这是6.4 x86_64的分数)
使用gcc 3.3它不会编译。用3.3编译为mips32
我在google中没有发现这个错误...
代码
#include <boost/unordered_set.hpp>
...
boost::unordered_set< int > po_refCombinedElements;
po_refCombinedElementsp.insert(0);
错误
/rootdir/source/extlibs/boost/boost/unordered/detail/allocator_helpers.hpp: In instantiation of `boost::unordered::detail::default_type_pointer<std::allocator<boost::unordered::detail::ptr_node<int> >, boost::unordered::detail::ptr_node<int>*>':
/rootdir/source/extlibs/boost/boost/unordered/detail/allocator_helpers.hpp:358: instantiated from `boost::unordered::detail::allocator_traits<std::allocator<boost::unordered::detail::ptr_node<int> > >'
/rootdir/source/extlibs/boost/boost/unordered/detail/unique.hpp:107: instantiated from `boost::unordered::detail::pick_node<std::allocator<int>, int>'
/rootdir/source/extlibs/boost/boost/unordered/detail/unique.hpp:129: instantiated from `boost::unordered::detail::set<std::allocator<int>, int, boost::hash<int>, std::equal_to<int> >'
/rootdir/source/extlibs/boost/boost/unordered/unordered_set.hpp:58: instantiated from `boost::unordered::unordered_set<int, boost::hash<int>, std::equal_to<int>, std::allocator<int> >'
CrHealthAlarmContainer.cpp:43: instantiated from here
/rootdir/source/extlibs/boost/boost/unordered/detail/allocator_helpers.hpp:271: error: invalid use of undefined type `struct boost::unordered::detail::default_type_pointer<std::allocator<boost::unordered::detail::ptr_node<int> >, boost::unordered::detail::ptr_node<int>*>'
/rootdir/source/extlibs/boost/boost/unordered/detail/allocator_helpers.hpp:271: error: declaration of `struct boost::unordered::detail::default_type_pointer<std::allocator<boost::unordered::detail::ptr_node<int> >, boost::unordered::detail::ptr_node<int>*>'
/rootdir/source/extlibs/boost/boost/unordered/detail/allocator_helpers.hpp:271: error: enumerator value for `value' not integer constant
/rootdir/source/extlibs/boost/boost/unordered/detail/allocator_helpers.hpp: In instantiation of `boost::unordered::detail::default_type_const_pointer<std::allocator<boost::unordered::detail::ptr_node<int> >, const boost::unordered::detail::ptr_node<int>*>':
/rootdir/source/extlibs/boost/boost/unordered/detail/allocator_helpers.hpp:365: instantiated from `boost::unordered::detail::allocator_traits<std::allocator<boost::unordered::detail::ptr_node<int> > >'
/rootdir/source/extlibs/boost/boost/unordered/detail/unique.hpp:107: instantiated from `boost::unordered::detail::pick_node<std::allocator<int>, int>'
/rootdir/source/extlibs/boost/boost/unordered/detail/unique.hpp:129: instantiated from `boost::unordered::detail::set<std::allocator<int>, int, boost::hash<int>, std::equal_to<int> >'
/rootdir/source/extlibs/boost/boost/unordered/unordered_set.hpp:58: instantiated from `boost::unordered::unordered_set<int, boost::hash<int>, std::equal_to<int>, std::allocator<int> >'
CrHealthAlarmContainer.cpp:43: instantiated from here
/rootdir/source/extlibs/boost/boost/unordered/detail/allocator_helpers.hpp:272: error: invalid use of undefined type `struct boost::unordered::detail::default_type_const_pointer<std::allocator<boost::unordered::detail::ptr_node<int> >, const boost::unordered::detail::ptr_node<int>*>'
/rootdir/source/extlibs/boost/boost/unordered/detail/allocator_helpers.hpp:272: error: declaration of `struct boost::unordered::detail::default_type_const_pointer<std::allocator<boost::unordered::detail::ptr_node<int> >, const boost::unordered::detail::ptr_node<int>*>'
/rootdir/source/extlibs/boost/boost/unordered/detail/allocator_helpers.hpp:272: error: enumerator value for `value' not integer constant
/rootdir/source/extlibs/boost/boost/unordered/detail/allocator_helpers.hpp: In instantiation of `boost::unordered::detail::default_type_difference_type<std::allocator<boost::unordered::detail::ptr_node<int> >, ptrdiff_t>':
/rootdir/source/extlibs/boost/boost/unordered/detail/allocator_helpers.hpp:375: instantiated from `boost::unordered::detail::allocator_traits<std::allocator<boost::unordered::detail::ptr_node<int> > >'
/rootdir/source/extlibs/boost/boost/unordered/detail/unique.hpp:107: instantiated from `boost::unordered::detail::pick_node<std::allocator<int>, int>'
/rootdir/source/extlibs/boost/boost/unordered/detail/unique.hpp:129: instantiated from `boost::unordered::detail::set<std::allocator<int>, int, boost::hash<int>, std::equal_to<int> >'
/rootdir/source/extlibs/boost/boost/unordered/unordered_set.hpp:58: instantiated from `boost::unordered::unordered_set<int, boost::hash<int>, std::equal_to<int>, std::allocator<int> >'
CrHealthAlarmContainer.cpp:43: instantiated from here
/rootdir/source/extlibs/boost/boost/unordered/detail/allocator_helpers.hpp:275: error: invalid use of undefined type `struct boost::unordered::detail::default_type_difference_type<std::allocator<boost::unordered::detail::ptr_node<int> >, ptrdiff_t>'
/rootdir/source/extlibs/boost/boost/unordered/detail/allocator_helpers.hpp:275: error: declaration of `struct boost::unordered::detail::default_type_difference_type<std::allocator<boost::unordered::detail::ptr_node<int> >, ptrdiff_t>'
/rootdir/source/extlibs/boost/boost/unordered/detail/allocator_helpers.hpp:275: error: enumerator value for `value' not integer constant
答案 0 :(得分:0)
提升requires GCC 4.5 or higher。我找不到Boost 1.49的引用,但这仍然是问题所在。我想他们正在使用古老的GCC 3.3(2003年5月!)中的错误功能