diff options
author | Joe Gallo <joegallo@gmail.com> | 2014-08-28 11:04:55 -0400 |
---|---|---|
committer | Joe Gallo <joegallo@gmail.com> | 2014-08-28 11:04:55 -0400 |
commit | d5592ea1e325131d4a7abf5e98f67fcb5cf22287 (patch) | |
tree | 23fb9715c255d297001d259adfee1e629467bdf6 /src | |
parent | 948f5fea2818df2e4793557505914bbc859fc193 (diff) | |
download | fork-ledger-d5592ea1e325131d4a7abf5e98f67fcb5cf22287.tar.gz fork-ledger-d5592ea1e325131d4a7abf5e98f67fcb5cf22287.tar.bz2 fork-ledger-d5592ea1e325131d4a7abf5e98f67fcb5cf22287.zip |
#if guards for boost 1.56 compatibility
Diffstat (limited to 'src')
-rw-r--r-- | src/account.h | 4 | ||||
-rw-r--r-- | src/item.h | 4 | ||||
-rw-r--r-- | src/post.h | 4 | ||||
-rw-r--r-- | src/ptree.cc | 5 | ||||
-rw-r--r-- | src/times.h | 4 |
5 files changed, 21 insertions, 0 deletions
diff --git a/src/account.h b/src/account.h index d1377c39..7411dfc2 100644 --- a/src/account.h +++ b/src/account.h @@ -261,7 +261,11 @@ public: mutable optional<xdata_t> xdata_; bool has_xdata() const { +#if BOOST_VERSION >= 105600 + return xdata_ != NULL; +#else return xdata_; +#endif } void clear_xdata(); xdata_t& xdata() { @@ -191,7 +191,11 @@ public: static bool use_aux_date; virtual bool has_date() const { +#if BOOST_VERSION >= 105600 + return _date != NULL; +#else return _date; +#endif } virtual date_t date() const { @@ -205,7 +205,11 @@ public: mutable optional<xdata_t> xdata_; bool has_xdata() const { +#if BOOST_VERSION >= 105600 + return xdata_ != NULL; +#else return xdata_; +#endif } void clear_xdata() { xdata_ = none; diff --git a/src/ptree.cc b/src/ptree.cc index 6609aed9..3fc9ace6 100644 --- a/src/ptree.cc +++ b/src/ptree.cc @@ -80,7 +80,12 @@ void format_ptree::flush() switch (format) { 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); +#endif + property_tree::write_xml(out, pt, indented); out << std::endl; break; diff --git a/src/times.h b/src/times.h index 2a5b9277..00007580 100644 --- a/src/times.h +++ b/src/times.h @@ -568,7 +568,11 @@ public: void stabilize(const optional<date_t>& date = none); bool is_valid() const { +#if BOOST_VERSION >= 105600 + return start != NULL; +#else return start; +#endif } /** Find the current or next period containing date. Returns false if |