title: Will the calculations in method class be optimized?
body: <p>Let's say there is a class with a constant field and a non-constant method in which calculations occur (always the same values, except for a class member).</p>
  <pre><code>class A
  {
  public:
      A(int val): m_a(val){};
  
  private:
      const int m_a;
  
      void calculation()
      {
          if (m_a + 5 == 10)
          {
  //            some code
          }
          if (m_a + 10 == 24)
          {
  //            some code
          }
          if (m_a + 14 == 105)
          {
  //            some code
          }
      }
  };
  </code></pre>
  <p>Will these calculations be optimized by the compiler (clang)? Or will they be constantly calculated? (in my example, these calculations are simple, but what if there is the same example, but with more complex ones).</p>