1

Boost (1.51) ICL を使用して、インターバル検索を簡素化しようとしています。

種類:

  • SequenceI::shp_set は共有ポインタの std::set です
  • 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" コードを見ると、動作させるために特別なことは何も行われていません。

私の望みは、値を与える間隔マップを持つことであり、提供された値を含む間隔を持つ共有ポインターのリスト (またはイテレーター、私は気にしません) を提供します。それでおしまい。

ICL でこれができない場合は、別のインターバル マップ ライブラリである pronto を見つける必要があります。

4

1 に答える 1

1

std::set にはない問題のようです。おそらく、比較できない (演算子 <、> なし) または加算 (演算子 += なし) 減算演算子-= できないタイプの boost::unit を使用している可能性があります。

私の例では、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 を比較できない < 演算子がない < ことです。

于 2012-09-11T04:25:38.343 に答える