Boost ICL未按预期工作,std::set operator+=应为



我正在尝试使用Boost(1.51)ICL来简化一些区间搜索。

类型:

  • SequenceI::shp_set是共享指针的std::集
  • types:mz_t是Boost::Units数量

interval_map<types::mz_t, SequenceI::shp_set>是区间映射的typedef

我有一个创建适当分段的功能,然后我尝试进行

msMap.add(segment);

然后我在编译过程中得到以下错误:

In file included from /home/adamb/Development/apollo/libapollo/include/theory.hpp:16:
In file included from /home/adamb/local/include/boost/icl/interval_map.hpp:13:
In file included from /home/adamb/local/include/boost/icl/interval_set.hpp:14:
In file included from /home/adamb/local/include/boost/icl/interval_base_set.hpp:24:
In file included from /home/adamb/local/include/boost/icl/associative_interval_container.hpp:16:
In file included from /home/adamb/local/include/boost/icl/concept/interval_set.hpp:13:
In file included from /home/adamb/local/include/boost/icl/detail/set_algo.hpp:16:
/home/adamb/local/include/boost/icl/functors.hpp:73:18: error: no viable overloaded '+='
        { object += operand; }
          ~~~~~~ ^  ~~~~~~~
/home/adamb/local/include/boost/icl/interval_base_map.hpp:855:5: note: in instantiation of member function 'boost::icl::inplace_plus<std::set<boost::shared_ptr<apollo::SequenceI>, std::less<boost::shared_ptr<apollo::SequenceI> >,
      std::allocator<boost::shared_ptr<apollo::SequenceI> > > >::operator()' requested here
    Combiner()((*it_).second, co_val);
    ^
/home/adamb/local/include/boost/icl/interval_base_map.hpp:870:9: note: in instantiation of function template specialization
      'boost::icl::interval_base_map<boost::icl::interval_map<boost::units::quantity<boost::units::unit<boost::units::list<boost::units::dim<boost::units::mass_base_dimension, boost::units::static_rational<1, 1> >,
      boost::units::list<boost::units::dim<boost::units::time_base_dimension, boost::units::static_rational<-1, 1> >, boost::units::list<boost::units::dim<boost::units::current_base_dimension, boost::units::static_rational<-1, 1> >,
      boost::units::dimensionless_type> > >, boost::units::heterogeneous_system<boost::units::heterogeneous_system_impl<boost::units::list<boost::units::heterogeneous_system_dim<apollo::units::dalton_mass_base_unit,
      boost::units::static_rational<1, 1> >, boost::units::list<boost::units::heterogeneous_system_dim<apollo::units::charge_state_base_unit, boost::units::static_rational<-1, 1> >, boost::units::dimensionless_type> >,
      boost::units::list<boost::units::dim<boost::units::mass_base_dimension, boost::units::static_rational<1, 1> >, boost::units::list<boost::units::dim<boost::units::time_base_dimension, boost::units::static_rational<-1, 1> >,
      boost::units::list<boost::units::dim<boost::units::current_base_dimension, boost::units::static_rational<-1, 1> >, boost::units::dimensionless_type> > >, boost::units::dimensionless_type> >, void>, float>,
      std::set<boost::shared_ptr<apollo::SequenceI>, std::less<boost::shared_ptr<apollo::SequenceI> >, std::allocator<boost::shared_ptr<apollo::SequenceI> > >, boost::icl::partial_absorber, std::less, icl::inplace_plus,
      icl::inter_section, boost::icl::continuous_interval<boost::units::quantity<boost::units::unit<boost::units::list<boost::units::dim<boost::units::mass_base_dimension, boost::units::static_rational<1, 1> >,
      boost::units::list<boost::units::dim<boost::units::time_base_dimension, boost::units::static_rational<-1, 1> >, boost::units::list<boost::units::dim<boost::units::current_base_dimension, boost::units::static_rational<-1, 1> >,
      boost::units::dimensionless_type> > >, boost::units::heterogeneous_system<boost::units::heterogeneous_system_impl<boost::units::list<boost::units::heterogeneous_system_dim<apollo::units::dalton_mass_base_unit,
      boost::units::static_rational<1, 1> >, boost::units::list<boost::units::heterogeneous_system_dim<apollo::units::charge_state_base_unit, boost::units::static_rational<-1, 1> >, boost::units::dimensionless_type> >,
      boost::units::list<boost::units::dim<boost::units::mass_base_dimension, boost::units::static_rational<1, 1> >, boost::units::list<boost::units::dim<boost::units::time_base_dimension, boost::units::static_rational<-1, 1> >,
      boost::units::list<boost::units::dim<boost::units::current_base_dimension, boost::units::static_rational<-1, 1> >, boost::units::dimensionless_type> > >, boost::units::dimensionless_type> >, void>, float>, less>, std::allocator>,
      boost::units::quantity<boost::units::unit<boost::units::list<boost::units::dim<boost::units::mass_base_dimension, boost::units::static_rational<1, 1> >, boost::units::list<boost::units::dim<boost::units::time_base_dimension,
      boost::units::static_rational<-1, 1> >, boost::units::list<boost::units::dim<boost::units::current_base_dimension, boost::units::static_rational<-1, 1> >, boost::units::dimensionless_type> > >,
      boost::units::heterogeneous_system<boost::units::heterogeneous_system_impl<boost::units::list<boost::units::heterogeneous_system_dim<apollo::units::dalton_mass_base_unit, boost::units::static_rational<1, 1> >,
      boost::units::list<boost::units::heterogeneous_system_dim<apollo::units::charge_state_base_unit, boost::units::static_rational<-1, 1> >, boost::units::dimensionless_type> >,
      boost::units::list<boost::units::dim<boost::units::mass_base_dimension, boost::units::static_rational<1, 1> >, boost::units::list<boost::units::dim<boost::units::time_base_dimension, boost::units::static_rational<-1, 1> >,
      boost::units::list<boost::units::dim<boost::units::current_base_dimension, boost::units::static_rational<-1, 1> >, boost::units::dimensionless_type> > >, boost::units::dimensionless_type> >, void>, float>,
      std::set<boost::shared_ptr<apollo::SequenceI>, std::less<boost::shared_ptr<apollo::SequenceI> >, std::allocator<boost::shared_ptr<apollo::SequenceI> > >, boost::icl::partial_absorber, less, inplace_plus, inter_section,
      boost::icl::continuous_interval<boost::units::quantity<boost::units::unit<boost::units::list<boost::units::dim<boost::units::mass_base_dimension, boost::units::static_rational<1, 1> >,
      boost::units::list<boost::units::dim<boost::units::time_base_dimension, boost::units::static_rational<-1, 1> >, boost::units::list<boost::units::dim<boost::units::current_base_dimension, boost::units::static_rational<-1, 1> >,
      boost::units::dimensionless_type> > >, boost::units::heterogeneous_system<boost::units::heterogeneous_system_impl<boost::units::list<boost::units::heterogeneous_system_dim<apollo::units::dalton_mass_base_unit,
      boost::units::static_rational<1, 1> >, boost::units::list<boost::units::heterogeneous_system_dim<apollo::units::charge_state_base_unit, boost::units::static_rational<-1, 1> >, boost::units::dimensionless_type> >,
      boost::units::list<boost::units::dim<boost::units::mass_base_dimension, boost::units::static_rational<1, 1> >, boost::units::list<boost::units::dim<boost::units::time_base_dimension, boost::units::static_rational<-1, 1> >,
      boost::units::list<boost::units::dim<boost::units::current_base_dimension, boost::units::static_rational<-1, 1> >, boost::units::dimensionless_type> > >, boost::units::dimensionless_type> >, void>, float>, less>,
      allocator>::add_segment<boost::icl::inplace_plus<std::set<boost::shared_ptr<apollo::SequenceI>, std::less<boost::shared_ptr<apollo::SequenceI> >, std::allocator<boost::shared_ptr<apollo::SequenceI> > > > >' requested here
        add_segment<Combiner>(inter_val, co_val, it_);
        ^
/home/adamb/local/include/boost/icl/interval_base_map.hpp:966:9: note: in instantiation of function template specialization
      'boost::icl::interval_base_map<boost::icl::interval_map<boost::units::quantity<boost::units::unit<boost::units::list<boost::units::dim<boost::units::mass_base_dimension, boost::units::static_rational<1, 1> >,
      boost::units::list<boost::units::dim<boost::units::time_base_dimension, boost::units::static_rational<-1, 1> >, boost::units::list<boost::units::dim<boost::units::current_base_dimension, boost::units::static_rational<-1, 1> >,
      boost::units::dimensionless_type> > >, boost::units::heterogeneous_system<boost::units::heterogeneous_system_impl<boost::units::list<boost::units::heterogeneous_system_dim<apollo::units::dalton_mass_base_unit,
      boost::units::static_rational<1, 1> >, boost::units::list<boost::units::heterogeneous_system_dim<apollo::units::charge_state_base_unit, boost::units::static_rational<-1, 1> >, boost::units::dimensionless_type> >,
      boost::units::list<boost::units::dim<boost::units::mass_base_dimension, boost::units::static_rational<1, 1> >, boost::units::list<boost::units::dim<boost::units::time_base_dimension, boost::units::static_rational<-1, 1> >,
      boost::units::list<boost::units::dim<boost::units::current_base_dimension, boost::units::static_rational<-1, 1> >, boost::units::dimensionless_type> > >, boost::units::dimensionless_type> >, void>, float>,
      std::set<boost::shared_ptr<apollo::SequenceI>, std::less<boost::shared_ptr<apollo::SequenceI> >, std::allocator<boost::shared_ptr<apollo::SequenceI> > >, boost::icl::partial_absorber, std::less, icl::inplace_plus,
      icl::inter_section, boost::icl::continuous_interval<boost::units::quantity<boost::units::unit<boost::units::list<boost::units::dim<boost::units::mass_base_dimension, boost::units::static_rational<1, 1> >,
      boost::units::list<boost::units::dim<boost::units::time_base_dimension, boost::units::static_rational<-1, 1> >, boost::units::list<boost::units::dim<boost::units::current_base_dimension, boost::units::static_rational<-1, 1> >,
      boost::units::dimensionless_type> > >, boost::units::heterogeneous_system<boost::units::heterogeneous_system_impl<boost::units::list<boost::units::heterogeneous_system_dim<apollo::units::dalton_mass_base_unit,
      boost::units::static_rational<1, 1> >, boost::units::list<boost::units::heterogeneous_system_dim<apollo::units::charge_state_base_unit, boost::units::static_rational<-1, 1> >, boost::units::dimensionless_type> >,
      boost::units::list<boost::units::dim<boost::units::mass_base_dimension, boost::units::static_rational<1, 1> >, boost::units::list<boost::units::dim<boost::units::time_base_dimension, boost::units::static_rational<-1, 1> >,
      boost::units::list<boost::units::dim<boost::units::current_base_dimension, boost::units::static_rational<-1, 1> >, boost::units::dimensionless_type> > >, boost::units::dimensionless_type> >, void>, float>, less>, std::allocator>,
      boost::units::quantity<boost::units::unit<boost::units::list<boost::units::dim<boost::units::mass_base_dimension, boost::units::static_rational<1, 1> >, boost::units::list<boost::units::dim<boost::units::time_base_dimension,
      boost::units::static_rational<-1, 1> >, boost::units::list<boost::units::dim<boost::units::current_base_dimension, boost::units::static_rational<-1, 1> >, boost::units::dimensionless_type> > >,
      boost::units::heterogeneous_system<boost::units::heterogeneous_system_impl<boost::units::list<boost::units::heterogeneous_system_dim<apollo::units::dalton_mass_base_unit, boost::units::static_rational<1, 1> >,
      boost::units::list<boost::units::heterogeneous_system_dim<apollo::units::charge_state_base_unit, boost::units::static_rational<-1, 1> >, boost::units::dimensionless_type> >,
      boost::units::list<boost::units::dim<boost::units::mass_base_dimension, boost::units::static_rational<1, 1> >, boost::units::list<boost::units::dim<boost::units::time_base_dimension, boost::units::static_rational<-1, 1> >,
      boost::units::list<boost::units::dim<boost::units::current_base_dimension, boost::units::static_rational<-1, 1> >, boost::units::dimensionless_type> > >, boost::units::dimensionless_type> >, void>, float>,
      std::set<boost::shared_ptr<apollo::SequenceI>, std::less<boost::shared_ptr<apollo::SequenceI> >, std::allocator<boost::shared_ptr<apollo::SequenceI> > >, boost::icl::partial_absorber, less, inplace_plus, inter_section,
      boost::icl::continuous_interval<boost::units::quantity<boost::units::unit<boost::units::list<boost::units::dim<boost::units::mass_base_dimension, boost::units::static_rational<1, 1> >,
      boost::units::list<boost::units::dim<boost::units::time_base_dimension, boost::units::static_rational<-1, 1> >, boost::units::list<boost::units::dim<boost::units::current_base_dimension, boost::units::static_rational<-1, 1> >,
      boost::units::dimensionless_type> > >, boost::units::heterogeneous_system<boost::units::heterogeneous_system_impl<boost::units::list<boost::units::heterogeneous_system_dim<apollo::units::dalton_mass_base_unit,
      boost::units::static_rational<1, 1> >, boost::units::list<boost::units::heterogeneous_system_dim<apollo::units::charge_state_base_unit, boost::units::static_rational<-1, 1> >, boost::units::dimensionless_type> >,
      boost::units::list<boost::units::dim<boost::units::mass_base_dimension, boost::units::static_rational<1, 1> >, boost::units::list<boost::units::dim<boost::units::time_base_dimension, boost::units::static_rational<-1, 1> >,
      boost::units::list<boost::units::dim<boost::units::current_base_dimension, boost::units::static_rational<-1, 1> >, boost::units::dimensionless_type> > >, boost::units::dimensionless_type> >, void>, float>, less>,
      allocator>::add_main<boost::icl::inplace_plus<std::set<boost::shared_ptr<apollo::SequenceI>, std::less<boost::shared_ptr<apollo::SequenceI> >, std::allocator<boost::shared_ptr<apollo::SequenceI> > > > >' requested here
        add_main<Combiner>(rest_interval, co_val, it_, last_);
        ^
/home/adamb/local/include/boost/icl/interval_base_map.hpp:314:24: note: in instantiation of function template specialization
      'boost::icl::interval_base_map<boost::icl::interval_map<boost::units::quantity<boost::units::unit<boost::units::list<boost::units::dim<boost::units::mass_base_dimension, boost::units::static_rational<1, 1> >,
      boost::units::list<boost::units::dim<boost::units::time_base_dimension, boost::units::static_rational<-1, 1> >, boost::units::list<boost::units::dim<boost::units::current_base_dimension, boost::units::static_rational<-1, 1> >,
      boost::units::dimensionless_type> > >, boost::units::heterogeneous_system<boost::units::heterogeneous_system_impl<boost::units::list<boost::units::heterogeneous_system_dim<apollo::units::dalton_mass_base_unit,
      boost::units::static_rational<1, 1> >, boost::units::list<boost::units::heterogeneous_system_dim<apollo::units::charge_state_base_unit, boost::units::static_rational<-1, 1> >, boost::units::dimensionless_type> >,
      boost::units::list<boost::units::dim<boost::units::mass_base_dimension, boost::units::static_rational<1, 1> >, boost::units::list<boost::units::dim<boost::units::time_base_dimension, boost::units::static_rational<-1, 1> >,
      boost::units::list<boost::units::dim<boost::units::current_base_dimension, boost::units::static_rational<-1, 1> >, boost::units::dimensionless_type> > >, boost::units::dimensionless_type> >, void>, float>,
      std::set<boost::shared_ptr<apollo::SequenceI>, std::less<boost::shared_ptr<apollo::SequenceI> >, std::allocator<boost::shared_ptr<apollo::SequenceI> > >, boost::icl::partial_absorber, std::less, icl::inplace_plus,
      icl::inter_section, boost::icl::continuous_interval<boost::units::quantity<boost::units::unit<boost::units::list<boost::units::dim<boost::units::mass_base_dimension, boost::units::static_rational<1, 1> >,
      boost::units::list<boost::units::dim<boost::units::time_base_dimension, boost::units::static_rational<-1, 1> >, boost::units::list<boost::units::dim<boost::units::current_base_dimension, boost::units::static_rational<-1, 1> >,
      boost::units::dimensionless_type> > >, boost::units::heterogeneous_system<boost::units::heterogeneous_system_impl<boost::units::list<boost::units::heterogeneous_system_dim<apollo::units::dalton_mass_base_unit,
      boost::units::static_rational<1, 1> >, boost::units::list<boost::units::heterogeneous_system_dim<apollo::units::charge_state_base_unit, boost::units::static_rational<-1, 1> >, boost::units::dimensionless_type> >,
      boost::units::list<boost::units::dim<boost::units::mass_base_dimension, boost::units::static_rational<1, 1> >, boost::units::list<boost::units::dim<boost::units::time_base_dimension, boost::units::static_rational<-1, 1> >,
      boost::units::list<boost::units::dim<boost::units::current_base_dimension, boost::units::static_rational<-1, 1> >, boost::units::dimensionless_type> > >, boost::units::dimensionless_type> >, void>, float>, less>, std::allocator>,
      boost::units::quantity<boost::units::unit<boost::units::list<boost::units::dim<boost::units::mass_base_dimension, boost::units::static_rational<1, 1> >, boost::units::list<boost::units::dim<boost::units::time_base_dimension,
      boost::units::static_rational<-1, 1> >, boost::units::list<boost::units::dim<boost::units::current_base_dimension, boost::units::static_rational<-1, 1> >, boost::units::dimensionless_type> > >,
      boost::units::heterogeneous_system<boost::units::heterogeneous_system_impl<boost::units::list<boost::units::heterogeneous_system_dim<apollo::units::dalton_mass_base_unit, boost::units::static_rational<1, 1> >,
      boost::units::list<boost::units::heterogeneous_system_dim<apollo::units::charge_state_base_unit, boost::units::static_rational<-1, 1> >, boost::units::dimensionless_type> >,
      boost::units::list<boost::units::dim<boost::units::mass_base_dimension, boost::units::static_rational<1, 1> >, boost::units::list<boost::units::dim<boost::units::time_base_dimension, boost::units::static_rational<-1, 1> >,
      boost::units::list<boost::units::dim<boost::units::current_base_dimension, boost::units::static_rational<-1, 1> >, boost::units::dimensionless_type> > >, boost::units::dimensionless_type> >, void>, float>,
      std::set<boost::shared_ptr<apollo::SequenceI>, std::less<boost::shared_ptr<apollo::SequenceI> >, std::allocator<boost::shared_ptr<apollo::SequenceI> > >, boost::icl::partial_absorber, less, inplace_plus, inter_section,
      boost::icl::continuous_interval<boost::units::quantity<boost::units::unit<boost::units::list<boost::units::dim<boost::units::mass_base_dimension, boost::units::static_rational<1, 1> >,
      boost::units::list<boost::units::dim<boost::units::time_base_dimension, boost::units::static_rational<-1, 1> >, boost::units::list<boost::units::dim<boost::units::current_base_dimension, boost::units::static_rational<-1, 1> >,
      boost::units::dimensionless_type> > >, boost::units::heterogeneous_system<boost::units::heterogeneous_system_impl<boost::units::list<boost::units::heterogeneous_system_dim<apollo::units::dalton_mass_base_unit,
      boost::units::static_rational<1, 1> >, boost::units::list<boost::units::heterogeneous_system_dim<apollo::units::charge_state_base_unit, boost::units::static_rational<-1, 1> >, boost::units::dimensionless_type> >,
      boost::units::list<boost::units::dim<boost::units::mass_base_dimension, boost::units::static_rational<1, 1> >, boost::units::list<boost::units::dim<boost::units::time_base_dimension, boost::units::static_rational<-1, 1> >,
      boost::units::list<boost::units::dim<boost::units::current_base_dimension, boost::units::static_rational<-1, 1> >, boost::units::dimensionless_type> > >, boost::units::dimensionless_type> >, void>, float>, less>,
      allocator>::_add<boost::icl::inplace_plus<std::set<boost::shared_ptr<apollo::SequenceI>, std::less<boost::shared_ptr<apollo::SequenceI> >, std::allocator<boost::shared_ptr<apollo::SequenceI> > > > >' requested here
        this->template _add<codomain_combine>(interval_value_pair);
                       ^
/home/adamb/Development/apollo/libapollo/src/theory.cpp:205:15: note: in instantiation of member function
      'boost::icl::interval_base_map<boost::icl::interval_map<boost::units::quantity<boost::units::unit<boost::units::list<boost::units::dim<boost::units::mass_base_dimension, boost::units::static_rational<1, 1> >,
      boost::units::list<boost::units::dim<boost::units::time_base_dimension, boost::units::static_rational<-1, 1> >, boost::units::list<boost::units::dim<boost::units::current_base_dimension, boost::units::static_rational<-1, 1> >,
      boost::units::dimensionless_type> > >, boost::units::heterogeneous_system<boost::units::heterogeneous_system_impl<boost::units::list<boost::units::heterogeneous_system_dim<apollo::units::dalton_mass_base_unit,
      boost::units::static_rational<1, 1> >, boost::units::list<boost::units::heterogeneous_system_dim<apollo::units::charge_state_base_unit, boost::units::static_rational<-1, 1> >, boost::units::dimensionless_type> >,
      boost::units::list<boost::units::dim<boost::units::mass_base_dimension, boost::units::static_rational<1, 1> >, boost::units::list<boost::units::dim<boost::units::time_base_dimension, boost::units::static_rational<-1, 1> >,
      boost::units::list<boost::units::dim<boost::units::current_base_dimension, boost::units::static_rational<-1, 1> >, boost::units::dimensionless_type> > >, boost::units::dimensionless_type> >, void>, float>,
      std::set<boost::shared_ptr<apollo::SequenceI>, std::less<boost::shared_ptr<apollo::SequenceI> >, std::allocator<boost::shared_ptr<apollo::SequenceI> > >, boost::icl::partial_absorber, std::less, icl::inplace_plus,
      icl::inter_section, boost::icl::continuous_interval<boost::units::quantity<boost::units::unit<boost::units::list<boost::units::dim<boost::units::mass_base_dimension, boost::units::static_rational<1, 1> >,
      boost::units::list<boost::units::dim<boost::units::time_base_dimension, boost::units::static_rational<-1, 1> >, boost::units::list<boost::units::dim<boost::units::current_base_dimension, boost::units::static_rational<-1, 1> >,
      boost::units::dimensionless_type> > >, boost::units::heterogeneous_system<boost::units::heterogeneous_system_impl<boost::units::list<boost::units::heterogeneous_system_dim<apollo::units::dalton_mass_base_unit,
      boost::units::static_rational<1, 1> >, boost::units::list<boost::units::heterogeneous_system_dim<apollo::units::charge_state_base_unit, boost::units::static_rational<-1, 1> >, boost::units::dimensionless_type> >,
      boost::units::list<boost::units::dim<boost::units::mass_base_dimension, boost::units::static_rational<1, 1> >, boost::units::list<boost::units::dim<boost::units::time_base_dimension, boost::units::static_rational<-1, 1> >,
      boost::units::list<boost::units::dim<boost::units::current_base_dimension, boost::units::static_rational<-1, 1> >, boost::units::dimensionless_type> > >, boost::units::dimensionless_type> >, void>, float>, less>, std::allocator>,
      boost::units::quantity<boost::units::unit<boost::units::list<boost::units::dim<boost::units::mass_base_dimension, boost::units::static_rational<1, 1> >, boost::units::list<boost::units::dim<boost::units::time_base_dimension,
      boost::units::static_rational<-1, 1> >, boost::units::list<boost::units::dim<boost::units::current_base_dimension, boost::units::static_rational<-1, 1> >, boost::units::dimensionless_type> > >,
      boost::units::heterogeneous_system<boost::units::heterogeneous_system_impl<boost::units::list<boost::units::heterogeneous_system_dim<apollo::units::dalton_mass_base_unit, boost::units::static_rational<1, 1> >,
      boost::units::list<boost::units::heterogeneous_system_dim<apollo::units::charge_state_base_unit, boost::units::static_rational<-1, 1> >, boost::units::dimensionless_type> >,
      boost::units::list<boost::units::dim<boost::units::mass_base_dimension, boost::units::static_rational<1, 1> >, boost::units::list<boost::units::dim<boost::units::time_base_dimension, boost::units::static_rational<-1, 1> >,
      boost::units::list<boost::units::dim<boost::units::current_base_dimension, boost::units::static_rational<-1, 1> >, boost::units::dimensionless_type> > >, boost::units::dimensionless_type> >, void>, float>,
      std::set<boost::shared_ptr<apollo::SequenceI>, std::less<boost::shared_ptr<apollo::SequenceI> >, std::allocator<boost::shared_ptr<apollo::SequenceI> > >, boost::icl::partial_absorber, less, inplace_plus, inter_section,
      boost::icl::continuous_interval<boost::units::quantity<boost::units::unit<boost::units::list<boost::units::dim<boost::units::mass_base_dimension, boost::units::static_rational<1, 1> >,
      boost::units::list<boost::units::dim<boost::units::time_base_dimension, boost::units::static_rational<-1, 1> >, boost::units::list<boost::units::dim<boost::units::current_base_dimension, boost::units::static_rational<-1, 1> >,
      boost::units::dimensionless_type> > >, boost::units::heterogeneous_system<boost::units::heterogeneous_system_impl<boost::units::list<boost::units::heterogeneous_system_dim<apollo::units::dalton_mass_base_unit,
      boost::units::static_rational<1, 1> >, boost::units::list<boost::units::heterogeneous_system_dim<apollo::units::charge_state_base_unit, boost::units::static_rational<-1, 1> >, boost::units::dimensionless_type> >,
      boost::units::list<boost::units::dim<boost::units::mass_base_dimension, boost::units::static_rational<1, 1> >, boost::units::list<boost::units::dim<boost::units::time_base_dimension, boost::units::static_rational<-1, 1> >,
      boost::units::list<boost::units::dim<boost::units::current_base_dimension, boost::units::static_rational<-1, 1> >, boost::units::dimensionless_type> > >, boost::units::dimensionless_type> >, void>, float>, less>, allocator>::add'
      requested here
        msMap.add(segment);

如果你看一下"派对"的代码,没有什么特别的东西可以让事情正常运转。

我的愿望是有一个区间映射,我给它赋值,它给我一个共享指针的列表(或者迭代器,我不在乎),其中的区间包含所提供的值。就是这样。

如果ICL不能做到这一点,那么我需要找到另一个区间映射库pronto。

看起来问题不在std::set中。可能,您使用的是无法比较(无运算符<,>)或相加(无运算符+=)减去运算符-=的类型的boost::单位。

在我的例子中,我在Visual Studio 2010 下编译

std::set<string*> tst;
boost::units::angle::radian_base_unit a,b;
bicl::interval_map<boost::units::angle::radian_base_unit,std::set<string*> > tst1;
tst1.add(make_pair(bicl::interval_map<boost::units::angle::radian_base_unit,std::set<string*> >::interval_type::closed(a,b),tst));

问题是a和b不能进行比较<不存在运算符<。

相关内容

  • 没有找到相关文章

最新更新