title: Function overload with same parameter type in C++
body: <p>I want to override a function with same parameter type, but with different logical meaning. I've tried something like:</p>
  
  <pre><code>class T
  {
  };
  
  typedef T Age;
  typedef T Height;
  typedef T Weight;
  
  void foo(Age a){}
  void foo(Height a){}
  void foo(Weight a){}
  </code></pre>
  
  <p>but I have build errors:
      error C2084: function 'void foo(Age)' already has a body</p>
  
  <p>One solution would be:</p>
  
  <pre><code>class Age : public T{};
  class Height : public T{};
  class Weight : public T{};
  </code></pre>
  
  <p>but I don't want to fill my namespace with new classes only for this purpose.</p>
  
  <p>How may I achieve this without using derived classes?</p>
  
  <p>EDIT: My code is in a cpp file, I don't use headers. This is just a simple example. Full cpp content is here:</p>
  
  <pre><code>class T
  {
  };
  
  typedef T Age;
  typedef T Height;
  typedef T Weight;
  
  void foo(Age a){}
  void foo(Height a){}
  void foo(Weight a){}
  
  int main()
  {
      return 0;
  }
  </code></pre>
  
  <p>Error message: 
       .cpp(10): error C2084: function 'void foo(Age)' already has a body</p>