Functions to compare server version strings and and determine if clone should be allowed.  
More...
#include <algorithm>
#include <array>
#include <cassert>
#include <string>
Functions to compare server version strings and and determine if clone should be allowed. 
 
◆ ParseArray
Parsed version strings array type. 
 
 
◆ is_valid_version()
  
  
      
        
          | static bool is_valid_version  | 
          ( | 
          const std::string &  | 
          version | ) | 
           | 
         
       
   | 
  
inlinestatic   | 
  
 
Helper function to determine if version string is made up of digits only. 
- Parameters
 - 
  
    | [in] | version | version string being validated  | 
  
   
- Returns
 - true if the non-empty string only contains digits 
 
 
 
◆ parse_version_string()
  
  
      
        
          | static ParseArray parse_version_string  | 
          ( | 
          std::string  | 
          version,  | 
         
        
           | 
           | 
          bool &  | 
          is_valid  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
static   | 
  
 
Parse a version string into an array of strings corresponding to the MAJOR, MINOR, PATCH and BUILD versions. 
A string of length 0 is filled in case a particular version string could not be parsed. For example, "Major.Minor.Patch-Build" yields ["Major", "Minor", "Patch", "Build"], "8.0.23-SR1" yields ["8", "0", "23", "SR1"], 
- Parameters
 - 
  
    | [in] | version | input version string  | 
    | [in,out] | is_valid | true if version string is valid  | 
  
   
- Returns
 - an array of strings containing the parsed components of the version string. 
 
 
 
◆ BUILD
  
  
      
        
          | constexpr unsigned int BUILD = 3 | 
         
       
   | 
  
constexpr   | 
  
 
 
◆ CLONE_BACKPORT_VERSION
  
  
      
        
          | constexpr unsigned long CLONE_BACKPORT_VERSION = 37 | 
         
       
   | 
  
constexpr   | 
  
 
 
◆ CLONE_PARSE_ARRAY_SIZE
  
  
      
        
          | constexpr unsigned int CLONE_PARSE_ARRAY_SIZE = 4 | 
         
       
   | 
  
constexpr   | 
  
 
Size of the parsed version strings array. 
 
 
◆ MAJOR
  
  
      
        
          | constexpr unsigned int MAJOR = 0 | 
         
       
   | 
  
constexpr   | 
  
 
Index of the array correpsonding to parts of version. 
 
 
◆ MINOR
  
  
      
        
          | constexpr unsigned int MINOR = 1 | 
         
       
   | 
  
constexpr   | 
  
 
 
◆ PATCH
  
  
      
        
          | constexpr unsigned int PATCH = 2 | 
         
       
   | 
  
constexpr   |