You are using the wrong one day_clock- use instead:
boost::gregorian::date current_date(boost::gregorian::day_clock::local_day());
day_clockc boost::date_timeis a common interface (a template in this case) intended for use with an external date type, and you do not supply this type. day_clockin boost::gregorianis the typedef of the specified interface, using the boost::gregorian::datedate type as the supplied type.
source
share