Merge pull request #319 from joegallo/master

Compilation errors with boost 1.56 (a second try)
This commit is contained in:
John Wiegley 2014-08-28 13:22:10 -05:00
commit c1598b7de2
6 changed files with 22 additions and 0 deletions

1
.gitignore vendored
View file

@ -1,6 +1,7 @@
*.[oa] *.[oa]
*.so *.so
*.so.* *.so.*
*.dylib
*.backup *.backup
*.elc *.elc
*.gcov *.gcov

View file

@ -261,7 +261,11 @@ public:
mutable optional<xdata_t> xdata_; mutable optional<xdata_t> xdata_;
bool has_xdata() const { bool has_xdata() const {
#if BOOST_VERSION >= 105600
return xdata_ != NULL;
#else
return xdata_; return xdata_;
#endif
} }
void clear_xdata(); void clear_xdata();
xdata_t& xdata() { xdata_t& xdata() {

View file

@ -191,7 +191,11 @@ public:
static bool use_aux_date; static bool use_aux_date;
virtual bool has_date() const { virtual bool has_date() const {
#if BOOST_VERSION >= 105600
return _date != NULL;
#else
return _date; return _date;
#endif
} }
virtual date_t date() const { virtual date_t date() const {

View file

@ -205,7 +205,11 @@ public:
mutable optional<xdata_t> xdata_; mutable optional<xdata_t> xdata_;
bool has_xdata() const { bool has_xdata() const {
#if BOOST_VERSION >= 105600
return xdata_ != NULL;
#else
return xdata_; return xdata_;
#endif
} }
void clear_xdata() { void clear_xdata() {
xdata_ = none; xdata_ = none;

View file

@ -80,7 +80,12 @@ void format_ptree::flush()
switch (format) { switch (format) {
case FORMAT_XML: case FORMAT_XML:
#if BOOST_VERSION >= 105600
auto indented = property_tree::xml_writer_make_settings<std::string> (' ', 2);
#else
property_tree::xml_writer_settings<char> indented(' ', 2); property_tree::xml_writer_settings<char> indented(' ', 2);
#endif
property_tree::write_xml(out, pt, indented); property_tree::write_xml(out, pt, indented);
out << std::endl; out << std::endl;
break; break;

View file

@ -568,7 +568,11 @@ public:
void stabilize(const optional<date_t>& date = none); void stabilize(const optional<date_t>& date = none);
bool is_valid() const { bool is_valid() const {
#if BOOST_VERSION >= 105600
return start != NULL;
#else
return start; return start;
#endif
} }
/** Find the current or next period containing date. Returns false if /** Find the current or next period containing date. Returns false if