title: overloaded function with no contextual type information
body: <pre><code>#include&lt;iostream&gt;
  #include&lt;stdio.h&gt;
  #include&lt;string.h&gt;
  
  using namespace std; 
  
  void cb(int x)
  {
      std::cout &lt;&lt;"print inside integer callback : " &lt;&lt; x &lt;&lt; "\n" ;    
  }
  
  void cb(float x)
  {
      std::cout &lt;&lt;"print inside float callback :" &lt;&lt; x &lt;&lt;  "\n" ;
  }
  
  void cb(std::string&amp; x)
  {
      std::cout &lt;&lt;"print inside string callback : " &lt;&lt; x &lt;&lt; "\n" ;
  }
  
  int main()
  {
  
  void(*CallbackInt)(void*);
  void(*CallbackFloat)(void*);
  void(*CallbackString)(void*);
  
  CallbackInt=(void *)cb;
  CallbackInt(5);
  
  CallbackFloat=(void *)cb;
  CallbackFloat(6.3);
  
  CallbackString=(void *)cb;
  CallbackString("John");
  
  return 0;
  
  }
  </code></pre>
  
  <p>Above is my code which has three function , I want to create three callbacks which will call overloaded function depending on their parameter. CallbackInt used to call cb function with int as parameter and similarly rest two.</p>
  
  <p>But when compiling with it gives me error as below.</p>
  
  <pre><code> function_ptr.cpp: In function ‘int main()’:
   function_ptr.cpp:29:21: error: overloaded function with no contextual type information
   CallbackInt=(void *)cb;
                   ^~
   function_ptr.cpp:30:14: error: invalid conversion from ‘int’ to ‘void*’ [-fpermissive]
   CallbackInt(5);
            ^
   function_ptr.cpp:32:23: error: overloaded function with no contextual type information
   CallbackFloat=(void *)cb;
                     ^~
   function_ptr.cpp:33:18: error: cannot convert ‘double’ to ‘void*’ in argument passing
   CallbackFloat(6.3);
                ^
   function_ptr.cpp:35:24: error: overloaded function with no contextual type information
   CallbackString=(void *)cb;
                      ^~
   function_ptr.cpp:36:24: error: invalid conversion from ‘const void*’ to ‘void*’ [-fpermissive]
   CallbackString("John");
  </code></pre>