title: C++11: How to alias a function?
body: <p>If I have a class Foo in namespace bar:</p>
  
  <pre><code>namespace bar
  {
      class Foo { ... }
  };
  </code></pre>
  
  <p>I can then:</p>
  
  <pre><code>using Baz = bar::Foo;
  </code></pre>
  
  <p>and now it is just like I defined the class in my namespace with the name Baz.</p>
  
  <p>Is it possible to do the same for functions?</p>
  
  <pre><code>namespace bar
  {
      void f();
  }
  </code></pre>
  
  <p>And then:</p>
  
  <pre><code>using g = bar::f; // error: ‘f’ in namespace ‘bar’ does not name a type
  </code></pre>
  
  <p>What is the cleanest way to do this?</p>
  
  <p>The solution should also hold for template functions.</p>
  
  <p><strong>Definition:</strong> If some entity B is an <strong>alias</strong> of A, than if any or all usages (not declarations or definitions of course) of A are replaced by B in the source code than the (stripped) generated code remains the same.  For example <code>typedef A B</code> is an alias.  <code>#define B A</code> is an alias (at least).  <code>T&amp; B = A</code> is not an alias, B can effectively implemented as an indirect pointer, wheres an "unaliased" A can use "immediate semantics".</p>