From b51aaa53c45de6b9386b39defd6bfe5c5acc3a56 Mon Sep 17 00:00:00 2001 From: Marko Zivanovic Date: Tue, 13 Oct 2015 00:02:40 +0200 Subject: [PATCH] Minor cleanup. --- include/version.h | 37 ++++++++++++++++++------------------- 1 file changed, 18 insertions(+), 19 deletions(-) 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"