void interval_set_element_iter_4_discrete_types() { typedef IntervalSet<T> IntervalSetT; typedef typename IntervalSetT::interval_type IntervalT; typedef std::vector<T> VectorT; IntervalSetT set_a; set_a.add(I_I(1,3)).add(I_I(6,7)); VectorT vec(5), cev(5); vec[0]=MK_v(1);vec[1]=MK_v(2);vec[2]=MK_v(3);vec[3]=MK_v(6);vec[4]=MK_v(7); cev[0]=MK_v(7);cev[1]=MK_v(6);cev[2]=MK_v(3);cev[3]=MK_v(2);cev[4]=MK_v(1); VectorT dest; std::copy(elements_begin(set_a), elements_end(set_a), std::back_inserter(dest)); BOOST_CHECK_EQUAL( vec == dest, true ); dest.clear(); std::copy(elements_rbegin(set_a), elements_rend(set_a), std::back_inserter(dest)); BOOST_CHECK_EQUAL( cev == dest, true ); dest.clear(); std::reverse_copy(elements_begin(set_a), elements_end(set_a), std::back_inserter(dest)); BOOST_CHECK_EQUAL( cev == dest, true ); dest.clear(); std::reverse_copy(elements_rbegin(set_a), elements_rend(set_a), std::back_inserter(dest)); BOOST_CHECK_EQUAL( vec == dest, true ); }
void SendDateEvent(const wxDateTime& dt) { // Sends both wxCalendarEvent and wxDateEvent wxWindow* datePicker = m_combo->GetParent(); wxCalendarEvent cev(datePicker, dt, wxEVT_CALENDAR_SEL_CHANGED); datePicker->GetEventHandler()->ProcessEvent(cev); wxDateEvent event(datePicker, dt, wxEVT_DATE_CHANGED); datePicker->GetEventHandler()->ProcessEvent(event); }