title: What's the difference between static constexpr and static inline variables in C++17?
body: <p>With C++17 we get inline variables.</p>
  
  <p>One of the uses for them is to define constant fields in classes.</p>
  
  <p>So what's the difference between these two constant definitions:</p>
  
  <pre><code>class MyClass {
      static constexpr int myFirstVar = 10;
      static const inline int mySecondVar = 100;
  };
  </code></pre>
  
  <p>Of course <code>constexpr</code> makes <code>myFirstVar</code> implicitly inline.</p>
  
  <p>What's the better choice here, to use <code>constexpr</code> or <code>inline</code>?</p>
  
  <p>Note: when you don't need constness, then <code>inline</code> makes it easier. With <code>constexpr</code> you don't have that choice.</p>