[Boost-bugs] [Boost C++ Libraries] #11067: boost::gregorian::date_iterator missing postfix operators ++ and --

Subject: [Boost-bugs] [Boost C++ Libraries] #11067: boost::gregorian::date_iterator missing postfix operators ++ and --
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2015-03-03 16:29:10


#11067: boost::gregorian::date_iterator missing postfix operators ++ and --
-------------------------------------------------+-------------------------
 Reporter: dkochin@… | Owner: az_sw_dude
     Type: Feature Requests | Status: new
Milestone: To Be Determined | Component: date_time
  Version: Boost 1.57.0 | Severity: Problem
 Keywords: boost::gregorian::date, |
  boost::gregorian::date_iterator |
-------------------------------------------------+-------------------------
 /* Consider the following (somewhat canonical) code snippet */
 {
    std::vector<boost::gregorian::date> dates(count);
    auto dt_i = dates.begin();
    boost::gregorian::month_iterator m_i(some_start_date, 1);

    while (dt_i != dts.end())
       *dt_i++ = *m_i++; /* this will call prefix ++ operator on m_i
                          leading to subtle bug */
 }

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/11067>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:18 UTC