void show_map_contents(OStreamT& os, MapT& m, const std::string& title) { os<< "<h3>" << title << "</h3>"; if (m.empty()) os<< "NONE<br />"; else for (typename MapT::const_iterator i = m.begin(); i != m.end(); ++i) os<< "<b>" << i->first << "</b> = <i>" << i->second << "</i><br />"; }
typename enable_if < mpl::and_< mpl::not_<is_total<Type> > , is_concept_compatible<is_interval_map, Type, MapT> > , void >::type add_intersection(Type& section, const Type& object, const MapT& operand) { typedef typename Type::segment_type segment_type; typedef typename Type::interval_type interval_type; typedef typename MapT::const_iterator const_iterator; if(operand.empty()) return; const_iterator common_lwb, common_upb; if(!Set::common_range(common_lwb, common_upb, operand, object)) return; const_iterator it_ = common_lwb; while(it_ != common_upb) add_intersection(section, object, *it_++); }