title: C++17: still using enums as constants?
body: <p>I am used to using <code>enum</code> as constants -- they're quick to write, can be placed in .h files, and work fine.</p>
  
  <pre><code>enum {BOX_LEFT=10, BOX_TOP=50, BOX_WIDTH=100, BOX_HEIGHT=50};
  enum {REASONS_I_LIKE_ENUM_AS_CONSTANTS = 3};
  </code></pre>
  
  <p>Is this no longer a good idea?  </p>
  
  <p>I see good <a href="https://stackoverflow.com/questions/18335861/why-is-enum-class-preferred-over-plain-enum">reasons</a> to prefer enum class (conventional enums implicitly convert to int; conventional enums export their enumerators to the surrounding scope), but those are reasons to prefer old enum in this case.</p>
  
  <p>I see in a thread on <a href="https://stackoverflow.com/questions/37259807/static-constexpr-int-vs-old-fashioned-enum-when-and-why">static constexpr int vs old-fashioned enum</a> that old-style enum is better because with a static constexpr member you have to declare it outside the class as well.  But this is apparently no longer true in C++17, and may only apply to class members anyway.</p>
  
  <p>What's the preferred way in c++17?</p>