title: C++ - functor vs inline function vs operator overload?
body: <p>Based on various Stack Overflow posts, I put the following together in a license plate recognition program I did a while back:</p>
  
  <p>PossiblePlate.h:</p>
  
  <pre><code>(lines omitted)
  
  std::string strChars;
  
  ///////////////////////////////////////////////////////////////////////////////////////////////
  static bool sortDescendingByNumberOfChars(const PossiblePlate &amp;ppLeft, const PossiblePlate &amp;ppRight) {
      return(ppLeft.strChars.length() &gt; ppRight.strChars.length());
  }
  
  (lines omitted)
  </code></pre>
  
  <p>Main.cpp</p>
  
  <pre><code>(lines omitted)
  
  // sort the vector of possible plates in descending order (most number of chars to least number of chars)
  std::sort(vectorOfPossiblePlates.begin(), vectorOfPossiblePlates.end(), PossiblePlate::sortDescendingByNumberOfChars);
  
  (lines omitted)
  </code></pre>
  
  <p>Here is the repo if more context would be helpful:</p>
  
  <p><a href="https://github.com/MicrocontrollersAndMore/OpenCV_3_License_Plate_Recognition_Cpp" rel="nofollow noreferrer">https://github.com/MicrocontrollersAndMore/OpenCV_3_License_Plate_Recognition_Cpp</a></p>
  
  <p>This code is great for sorting a vector of objects in C++ based on any member variable, I've re-used it quite a few times since in various other projects.</p>
  
  <p>My question is, what is this?  A functor, inline function, operator overload, or something else entirely?  How could I determine the difference?</p>