Add copy c'tors and assignment operators; Change numeric prerelease identifier comparison to use long longs instead of ints.

This commit is contained in:
Marko Zivanovic
2015-10-13 12:10:43 +02:00
parent bb377082f2
commit 522e8b484b
5 changed files with 32 additions and 7 deletions
+14
View File
@@ -44,6 +44,20 @@ namespace version {
}
}
template<typename P, typename C>
Basic_version<P, C>::Basic_version(P p, C c)
: parser_(p), comparator_(c), ver_(parser_.parse("0.0.0")) {};
template<typename P, typename C>
Basic_version<P, C>::Basic_version(const std::string& v, P p, C c)
: parser_(p), comparator_(c), ver_(parser_.parse(v)) {};
template<typename P, typename C>
Basic_version<P, C>::Basic_version(const Basic_version<P, C>&) = default;
template<typename P, typename C>
Basic_version<P, C>& Basic_version<P, C>::operator=(const Basic_version<P, C>&) = default;
template<typename P, typename C>
const int Basic_version<P, C>::major() const {
return ver_.major;