title: Inline vs constexpr for a static const getter?
body: <p>In the following piece of code, what function will allow the best optimization for an external use and why ? Is the "Version 4" allowed in C++ 2011 ?</p>
  
  <pre><code>template&lt;unsigned int TDIM&gt; class MyClass 
  {
      public:
          static inline unsigned int size()           {return _size;} // Version 1
          static inline const unsigned int size()     {return _size;} // Version 2
          static constexpr unsigned int size()        {return _size;} // Version 3
          static inline constexpr unsigned int size() {return _size;} // Version 4
      protected:
          static const unsigned int _size = TDIM*3;
  };
  </code></pre>
  
  <p>Thank you very much.</p>