Boost ICL没有按预期工作,std :: set operator + = expected

时间:2012-08-28 19:21:13

标签: c++ dictionary boost set boost-icl

我正在尝试使用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);

如果你看一下"Party" code,没有什么特别的事情可以让事情发挥作用。

我希望有一个区间映射,我给它一个值,它给了我一个列表(或迭代器,我不关心)的共享指针,其间隔包含提供的值。而已。

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

1 个答案:

答案 0 :(得分:1)

看起来问题不在std :: set中。可能你正在使用那些无法比较的boost ::单位(没有运算符&lt;,&gt;)或者添加(没有运算符+ =)减去运算符 - =。

在我的示例中,我在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无法比较&lt;没有运营商&lt;。