title: static vs inline for functions implemented in header files
body: <p>The way I think of <code>inline</code> in C++ is for linkage/scoping. I put it in the same basket with <code>extern</code> and <code>static</code> for global objects.</p>
  
  <p>Typically for a function implemented in a header file, my go-to solution would be to make it static:</p>
  
  <pre><code>// In Foo.h
  static void foo()
  {
      // Do stuff...
  }
  </code></pre>
  
  <p>However, I believe this is also valid and does not seem to violate ODR:</p>
  
  <pre><code>// In Foo.h
  inline void foo()
  {
      // Do stuff...
  }
  </code></pre>
  
  <p>What are the semantic differences between the two? Also I'm not exactly sure what areas of the C++ standard would explain exact differences, or if it's just undefined and differences lie with the implementation.</p>