I'm getting a missing template arguments
when compiling a simple date parsing test using boost, here is the code:
#include "boost/date_time/gregorian/gregorian.hpp"
#include "boost/date_time/gregorian/parsers.hpp"
boost::date_time::date test = boost::gregorian::from_us_string("07-Sep-2010");
and the compiler complains
error: missing template arguments before ‘test’
boost::date_time::date test = boost::gregorian::from_us_string("07-Sep-2010");
I don't understand what template arguments I should provide or why I should do provide template arguments in first place. It seems to be a little to much boiler plate code for my taste:)
It should be
boost::gregorian::date
instead ofboost::date_time::date
. Aside from that, you could useif you are using C++11.