title: static inline in class inheritance
body: <p>I am reading some of the Epic Games <a href="https://github.com/EpicGames/UnrealEngine" rel="nofollow noreferrer">UnrealEngine4 source code</a> and see couple of practices which make me wonder if I miss some of essential C++ magic.</p>
  
  <ol>
  <li><p>static inline member methods in <a href="https://github.com/EpicGames/UnrealEngine/blob/b70f31f6645d764bcb55829228918a6e3b571e0b/Engine/Source/Runtime/OpenGLDrv/Public/OpenGL.h" rel="nofollow noreferrer">class declaration</a>.<a href="https://stackoverflow.com/questions/10876930/should-one-never-use-static-inline-function">Here</a> @dividebyzero user actually sheds very important info regarding the effect of using static inline,at least with GCC compiler - inline placement similar to how MACRO functions behave.</p></li>
  <li><p>Another interesting practice I can see is how UE4 creates interfaces for inheritance.Here is example based on how  OpenGL backend module in UE4 looks like:</p>
  
  <pre><code>class FOpenGLBase
  {
     public:
       static FORCEINLINE void UnmapBufferRange(GLenum Type, uint32 InOffset, uint32 InSize) UGL_REQUIRED_VOID 
  };
  </code></pre></li>
  </ol>
  
  <p>Where <code>UGL_REQURED_VOID</code> is replaced with default function body,which reports "unimplemented" method error if called on this base class.</p>
  
  <p>Next come inheritance of the above class:</p>
  
  <pre><code>    struct FOpenGL3 : public FOpenGLBase
      {
          static FORCEINLINE void UnmapBuffer(GLenum Type)
          {
            glUnmapBuffer(Type);
          }
          static FORCEINLINE void UnmapBufferRange(GLenum Type, uint32 InOffset, uint32 InSize)
          {
             UnmapBuffer(Type);
          }
      };
  </code></pre>
  
  <p>I even didn't know it was possible for a struct to inherit from class and vice -versa.</p>
  
  <p>I understand that static + inline makes it possible to generate unique function body per function call,which makes it possible to put different body but with same signature in subclass's declaration.
  But then I also wonder why one needs virtual inheritance for small methods if it is possible to override static inline methods in subclass just like this?
  Why such an approach is not common? (at least from my experience I find it uncommon)  </p>
  
  <p>PS: I wasn't sure if this question format is ok for SO or should be rather put in CodeReview site.</p>