Hi,
The documentation for Boost.Date_Time iterators says that "Date iterators
are a model of Bidirectional Iterator".
However, I am not able to use them in some STL algorithms because of the
lack of a required nested type.
The following simplified example does not compile:
#include
#include <algorithm>
void main()
{
using namespace boost::gregorian;
date v[5];
std::copy_n( month_iterator( date(2015,06,25) ), 5, v );
}
On VS2013 fails with error
'difference_type' : is not a member of
'boost::date_time::date_itrboost::gregorian::greg_durations_config::date_type,boost::gregorian::date>'
Compilation on gcc and clang fails with a similar error complaining about
the lack of 'difference_type'.
Isn't a nested difference_type a requirement of BidirectionalIterator?
Am I using these date iterators incorrectly?
Regards