我在 C++ 中有一个矢量代码:
typedef vector<boost::tuple<ppa::Node*, ppa::Node*, ppa::Node*, bool> >::iterator traveling;
traveling running =
std::partition( wait.begin(), wait.end(), tuple_comp );
running_jobs.insert(running, wait.end());
wait.erase( running, wait.end() );
这个错误给了我:
main.cpp:223: error: no matching function for call to ‘std::vector<boost::tuples::tuple<ppa::Node*, ppa::Node*, ppa::Node*, bool, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type>, std::allocator<boost::tuples::tuple<ppa::Node*, ppa::Node*, ppa::Node*, bool, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type> >
>::insert(threaded_function(ppa::Model_factory&, ppa::Node*)::traveling&,
__gnu_cxx::__normal_iterator<boost::tuples::tuple<ppa::Node*, ppa::Node*, ppa::Node*, bool, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type>*, std::vector<boost::tuples::tuple<ppa::Node*, ppa::Node*, ppa::Node*, bool, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type>, std::allocator<boost::tuples::tuple<ppa::Node*, ppa::Node*, ppa::Node*, bool, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type> > > >)’
这是netbeans 7.2,我不知道std中的向量应该有插入,我错过了什么吗?
running_jobs = vector<boost::tuple<ppa::Node*, ppa::Node*, ppa::Node*, bool> > running_jobs;
line 223 running_jobs.insert(running, wait.end());