diff --git a/include/version.h b/include/version.h index 170c0f5..6cadf5c 100644 --- a/include/version.h +++ b/include/version.h @@ -91,12 +91,28 @@ namespace version { template std::ostream& operator<<(std::ostream& os, const Basic_version& v); + /// Compare if two version objects are different. + template + bool operator!=(const version::Basic_version& l, const version::Basic_version& r); + + /// Compare if left version object is greater than the right. + template + bool operator>(const version::Basic_version& l, const version::Basic_version& r); + + /// Compare if left version object is greater than or equal the right. + template + bool operator>=(const version::Basic_version& l, const version::Basic_version& r); + + /// Compare if left version object is less than or equal the right. + template + bool operator<=(const version::Basic_version& l, const version::Basic_version& r); + /// Generic version description and comparison class. /** Basic_version class describes general version object without prescribing parsing, - validation and comparison rules. These rules are implemented by supplied P and - C parameters. + validation and comparison rules. These rules are implemented by supplied Parser and + Comparator objects. */ template class Basic_version { @@ -120,23 +136,6 @@ namespace version { Comparator comparator_; const Version_data ver_; }; - - /// Compare if two version objects are different. - template - bool operator!=(const version::Basic_version& l, const version::Basic_version& r); - - /// Compare if left version object is greater than the right. - template - bool operator>(const version::Basic_version& l, const version::Basic_version& r); - - /// Compare if left version object is greater than or equal the right. - template - bool operator>=(const version::Basic_version& l, const version::Basic_version& r); - - /// Compare if left version object is less than or equal the right. - template - bool operator<=(const version::Basic_version& l, const version::Basic_version& r); - } #include "version.inl"