Using g++ version 4.7.2, if I try compiling the following
#include <boost/date_time/local_time/local_time.hpp> class Bar { public: Bar() { tz_db_.load_from_file("/home/date_time_zonespec.csv"); } private: boost::local_time::tz_database tz_db_; }; int main() { return 0; } with -std=c++0x I get the following error.
In file included from /usr/local/include/boost/date_time/local_time/local_time_types.hpp:18:0, from /usr/local/include/boost/date_time/local_time/local_time.hpp:13, from test.h:4, from test.cpp:1: /usr/local/include/boost/date_time/local_time/custom_time_zone.hpp: In instantiation of ‘bool boost::local_time::custom_time_zone_base<CharT>::has_dst() const [with CharT = char]’: test.cpp:11:1: required from here /usr/local/include/boost/date_time/local_time/custom_time_zone.hpp:67:30: error: cannot convert ‘const boost::shared_ptr<boost::date_time::dst_day_calc_rule<boost::gregorian::date> >’ to ‘bool’ in return If I leave off the c++0x option, everything is fine. Can anybody tell me what's going on here?