title: Polymorphism with different parameters
body: <p>By any chance is it possible to do polymorphism with the same name of function with different parameters?</p>
  
  <p>For example, I want those three functions to become one.</p>
  
  <pre><code>virtual bool isValid1(const std::string&amp;) = 0;
  virtual bool isValid2(const uint32_t&amp;) = 0;
  virtual bool isValid3(const int&amp; num) = 0;
  </code></pre>
  
  <p>In other words, I have a Base <code>A</code> and three Derived A class. I also have Base <code>B</code> that holds a vector of Base A class and a T(template type, could be a <code>string</code>, <code>unit32</code> or <code>int</code>) argument. When I want to call from Base <code>B</code> the <code>isValid</code> function using the <code>vector</code> and argument (like this: <code>isValid(argument)</code>) I am a bit stuck, since I have to know before if to call <code>isValid1(string)</code>, <code>isValid2(uint32)</code> or  <code>isValid3(int)</code>.</p>
  
  <p>Some piece of the code for those who asked,</p>
  
  <pre><code>template &lt;class T&gt;
  class Field
  {
  public:
      void addValidator(BaseValidator* validator) { m_validator.push_back(validator); }
      void validate() const { m_validator[0].isValid(m_data);}
  private:
      std::vector&lt;BaseValidator*&gt; m_validator;
      T m_data;
  };
  </code></pre>
  
  <ul>
  <li>I am opting for polymorphism, yet other type of solutions are welcome.</li>
  <li>Please let me know if the question is too short to understand, so I can rewrite in a different method.</li>
  </ul>