title: C++ do inline functions prevent copying?
body: <p>Assuming the compiler does in fact inline <code>foo</code> is there a performance difference between these 2 statements?</p>
  
  <pre><code>inline int foo (int val) {
    return val;
  }
  
  int main () {
  
    std::cout &lt;&lt; foo(123) &lt;&lt; std::endl;
  
    std::cout &lt;&lt; 123 &lt;&lt; std::endl;
  
    return 0; 
  }
  </code></pre>
  
  <p>Let's ignore any implications that move semantics and copy elision might have.</p>