date-time library and checked iterators
Dear all, last week we switched to vstudio 2008. It has checked iterator support and it already catched two incorrect (but probably also harmless) uses of iterators. Maybe in the date time library there is also such a case. The stream operator on ptime eventually calls date_time::date_facet::do_put_tm () function which probably uses an incorrect way of dereferencing string iterators when empty: // use time_put facet to create final string return std::use_facet<std::time_put<CharT> >(a_ios.getloc()).put(next, a_ios, fill_char, &tm_value, &*a_format.begin(), &*a_format.begin()+a_format.size()); When a_format is empty the begin iterator may not be dereferenced? I do know that the actual code is harmless, but now we get the M$ checked iterator error message, and turning it globally off would be pity, since it cna be an extra potential debugging tool. Wkr, me
participants (1)
-
gast128