boost::none_t no longer convertible from literal 0 in 1.58

Instead we use boost::none, which has been documented since boost 1.34.0.
This commit is contained in:
Johann Klähn 2015-05-10 12:45:28 +02:00
parent c586e1e494
commit 48aec0f093
5 changed files with 5 additions and 21 deletions

View file

@ -261,11 +261,7 @@ 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_ != boost::none;
return xdata_ != NULL;
#else
return xdata_;
#endif
} }
void clear_xdata(); void clear_xdata();
xdata_t& xdata() { xdata_t& xdata() {

View file

@ -174,11 +174,7 @@ 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 != boost::none;
return _date != NULL;
#else
return _date;
#endif
} }
virtual date_t date() const { virtual date_t date() const {

View file

@ -118,7 +118,7 @@ public:
ptr_op_t parse(std::istream& in, ptr_op_t parse(std::istream& in,
const parse_flags_t& flags = PARSE_DEFAULT, const parse_flags_t& flags = PARSE_DEFAULT,
const optional<string>& original_string = NULL); const optional<string>& original_string = boost::none);
}; };
} // namespace ledger } // namespace ledger

View file

@ -205,11 +205,7 @@ 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_ != boost::none;
return xdata_ != NULL;
#else
return xdata_;
#endif
} }
void clear_xdata() { void clear_xdata() {
xdata_ = none; xdata_ = none;

View file

@ -500,11 +500,7 @@ 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 != boost::none;
return start != NULL;
#else
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