Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/cplusplus/160.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C++ 编译boost::在gcc 4.6.4中移动_C++_Boost_C++11_Boost Move - Fatal编程技术网

C++ 编译boost::在gcc 4.6.4中移动

C++ 编译boost::在gcc 4.6.4中移动,c++,boost,c++11,boost-move,C++,Boost,C++11,Boost Move,我有一个使用Boost::move移动锁的函数- /** * Moving assignment operator transfers ownership of the lock */ const_iterator& operator=(const_iterator && other) { if (this != &other) { iter = other.iter; lock = boost::move(other

我有一个使用Boost::move移动锁的函数-

/**
 * Moving assignment operator transfers ownership of the lock
 */
 const_iterator& operator=(const_iterator && other) {
    if (this != &other) {
        iter = other.iter;
        lock = boost::move(other.lock);
    }
    return *this;
 }
我可以使用带有-std=c++11或-std=c++0x标志的GCC4.7.3来编译这段代码。但是,对于GCC4.6.4,即使使用-std=c++0x标志,该代码也会失败。有没有办法解决这个问题

用于使用C++11功能的CMAKE标志:

set(CMAKE_CXX_FLAGS "-std=c++11")
set(CMAKE_CXX_FLAGS "-std=c++0x")
用于使用C++0x功能的CMAKE标志:

set(CMAKE_CXX_FLAGS "-std=c++11")
set(CMAKE_CXX_FLAGS "-std=c++0x")
gcc 4.6.4中的错误:


错误:与–operator不匹配=’ 国际热核聚变实验堆((indexing::skarf::SkarfDatabase*)this)->indexing::skarf::SkarfDatabase::bucketFinderIndex.indexing::skarf::BucketIDT::Finder

::以P=features::Descriptor结束,T=long unsigned int™ /home/rahulg/ripe/src/index/skarf/SkarfDatabase.hpp:141:40:注意:候选对象是:/usr/local/include/boost/smart_ptr/shared_array.hpp:264:31:注意:模板bool boost::operator=(boost::detail::sp_nullptr_t,const boost::shared_array&)/usr/local/include/boost/smart_ptr/shared_array.hpp:259:31:注意:模板bool boost::operator=(const boost::shared_array&,boost::detail::sp_nullptr_t)/usr/local/include/boost/smart_ptr/shared_array.hpp:242:31:注意:模板bool boost::operator=(const boost::shared_array&,const boost::shared_array&)/usr/local/include/boost/ptr_container/detail/void_ptr_迭代器。hpp:185:21:注意:模板bool boost::operator=(const boost::void_ptr_iterator&,const boost::void_ptr_iterator&)/usr/local/include/boost/blank.hpp:73:13:注意:bool boost::operator=(const-boost::blank&,const-boost::blank&)/usr/local/include/boost/blank.hpp:73:13:注意:参数1未从“索引::skarf::BucketIDT::迭代器”进行已知转换™ to–const boost::blank–boost™ /usr/local/include/boost/range/sub_range.hpp:161:17:注意:模板bool boost::operator=(const boost::sub_range&,const boost::sub_range&)/usr/local/include/boost/function/function_template.hpp:1031:8:注意:模板void boost::operator=(const boost::function10&,const boost::function10&)/usr/local/include/boost/function/function_template.hpp:1031:8:注意:模板void boost::operator=(const boost::function9&,const boost::function9&)/usr/local/include/boost/function/function_template.hpp:1031:8:注意:模板void boost::operator=(const boost::function8&,const boost::function8&)/usr/local/include/boost/function/function_template.hpp:1031:8:注意:模板void boost::operator=(const boost::function7&,const boost::function7&)/usr/local/include/boost/function/function_template.hpp:1031:8:注意:模板void boost::operator=(const boost::function6&,const boost::function6&)/usr/local/include/boost/function/function_template.hpp:1031:8:注意:模板void boost::operator=(const boost::function5&,const boost::function5&)/usr/local/include/boost/function/function_template.hpp:1031:8:注意:模板void boost::operator=(const boost::function4&,const boost::function4&)/usr/local/include/boost/function/function_template.hpp:1031:8:注意:模板void boost::operator=(const boost::function3&,const boost::function3&)/usr/local/include/boost/function/function_template.hpp:1031:8:注意:模板void boost::operator=(const boost::function2&,const boost::function2&)/usr/local/include/boost/function/function_template.hpp:1031:8:注意:模板void boost::operator=(const boost::function0&,const boost::function0&)/usr/local/include/boost/function/function_template.hpp:1031:8:注意:模板void boost::operator=(const boost::function1&,const boost::function1&)/usr/local/include/boost/function/function\u base.hpp:872:3:注意:模板typename boost::enable\u if_c::value>::value,bool>::type boost::operator=(boost::reference_wrapper,const boost::function_base&)/usr/local/include/boost/function/function_base.hpp:863:3:注意:模板类型名称boost::enable_if_c::value>::value,bool>::type boost::operator=(const boost::function_base&,boost::reference_wrapper)/usr/local/include/boost/function/function_base.hpp:835:3:注意:模板typename boost::enable_if_c::value>::value,bool>::type boost::operator=(Functor,const boost::function_base&)/usr/local/include/boost/function/function_base.hpp:826:3:注意:模板类型boost::enable_if_c::value>::value,bool>::键入boost::operator=(const boost::function_base&,Functor)/usr/local/include/boost/function/function_base.hpp:764:13:注意:bool boost::operator=(boost::detail::function::untible\u clear\u type*,const boost::function\u base&)

boost是用gcc 4.3测试的,因此4.6应该可以工作

你看过这个吗:


使用GCC4.3测试了Boost,因此4.6应该可以工作

你看过这个吗:


G++4.6对C++11功能的支持远不及4.7或4.8。参见.G++4.6对C++11特性的支持远不及4.7或4.8。看见