diff --git a/NEWS.md b/NEWS.md index 4bdbda23a..f5a755713 100644 --- a/NEWS.md +++ b/NEWS.md @@ -16,6 +16,10 @@ v36.0.0. If it does, it will be updated to the built-in list changed in v37.0.0. Fixes #2611. +## Build system changes + +* Boost's Operators header library is now required. + # Version 37.0.0 "Leave It" 2019-08-24 diff --git a/README.md b/README.md index ce2c62f6b..f3444707e 100644 --- a/README.md +++ b/README.md @@ -94,8 +94,8 @@ programs and libraries you absolutely need are: - [zlib](http://www.zlib.net/) — a compression library - [Boost](http://www.boost.org/) — Several of Boost's libraries are - used: `RegEx`, `filesystem`, `system`, `math`, `Range`, `rational`, - `variant`. At least v1.49.0 is required. + used: `RegEx`, `filesystem`, `system`, `math`, `operators`, `Range`, + `rational`, `variant`. At least v1.49.0 is required. - [libxslt's xsltproc binary](http://xmlsoft.org/libxslt/) and [DocBook XSL stylesheets](https://sourceforge.net/projects/docbook/files/docbook-xsl/) diff --git a/ac/boost.m4 b/ac/boost.m4 index 34c2968e4..f9b63f71c 100644 --- a/ac/boost.m4 +++ b/ac/boost.m4 @@ -48,6 +48,10 @@ if test x"$ac_cv_header_boost_integer_common_factor_hpp" != xyes; then ]) fi +AX_BOOST_CHECK_HEADERS([boost/operators.hpp],,[ + AC_MSG_ERROR([Boost's Operators library is required but wasn't found]) +]) + AX_BOOST_CHECK_HEADERS([boost/range.hpp],,[ AC_MSG_ERROR([Boost's Range library is required but wasn't found]) ]) diff --git a/src/common/version.cpp b/src/common/version.cpp index 4feb21c39..6b90f2216 100644 --- a/src/common/version.cpp +++ b/src/common/version.cpp @@ -102,6 +102,13 @@ version_number_t::operator <(const version_number_t &cmp) return compare(cmp) == -1; } +bool +version_number_t::operator ==(const version_number_t &cmp) + const +{ + return compare(cmp) == 0; +} + std::string version_number_t::to_string() const diff --git a/src/common/version.h b/src/common/version.h index 12d8eb3b4..a5d667af6 100644 --- a/src/common/version.h +++ b/src/common/version.h @@ -16,6 +16,7 @@ #include "common/common_pch.h" #include +#include #include "common/xml/xml.h" @@ -24,7 +25,7 @@ #define MTX_DOWNLOAD_URL "https://mkvtoolnix.download/downloads.html" #define MTX_NEWS_URL "https://mkvtoolnix.download/doc/NEWS.md" -struct version_number_t { +struct version_number_t: boost::totally_ordered { std::vector parts; unsigned int build{}; bool valid{}; @@ -33,6 +34,7 @@ struct version_number_t { version_number_t(const std::string &s); bool operator <(const version_number_t &cmp) const; + bool operator ==(const version_number_t &cmp) const; int compare(const version_number_t &cmp) const; std::string to_string() const;