All pastes #2051333 Raw Edit

Unnamed

public text v1 · immutable
#2051333 ·published 2011-04-27 21:26 UTC
rendered paste body
class version : private std::pair<unsigned int, unsigned int>
    {
    public:
      explicit version(unsigned int major = 2, unsigned int minor = 0) throw();
      std::string str() const throw();

      unsigned int major() const throw();
      unsigned int minor() const throw();

      static version parse(const std::string& str) throw(parse_error);
      
      friend bool operator==(const version& v1, const version& v2);
      friend bool operator!=(const version& v1, const version& v2);
      friend bool operator< (const version& v1, const version& v2);
      friend bool operator<=(const version& v1, const version& v2);
      friend bool operator> (const version& v1, const version& v2);
      friend bool operator>=(const version& v1, const version& v2);
    };