title: Compare user value with value from enum
body: <p>The essence of the task: to choose the best screen resolution for the user, based on his data.
  I need to ompare user value with value from ENUM and return the appropriate one.
  For example:</p>
  
  <pre><code>enum class Resolutions {
      V720_height = 720,
      V720_width = 1280,
      V1080_height = 1080,
      V1080_width = 1920
  };
  
  int main() {
      int user_height = 1200;
      int user_width = 430;
      // I know this does not work, just an example.
      std::for_each(Resolutions.begin(), Resolutions.end(), [](Resolutions tmp) {
          if (static_cast&lt;int&gt;(tmp) &gt; user_height) {
              std::cout &lt;&lt; tmp &lt;&lt; " - is better resolution\n";
          }
      });
  }
  </code></pre>
  
  <p>I need a good idea, how can this be implemented?</p>