title: Converting string to integer, double, float without having to catch exceptions
body: <p>I have a <code>string</code> which can be either a <code>double</code>, <code>float</code> or <code>int</code>. I would like to convert the <code>string</code> to the data type by making function calls. I am currently using functions such as <code>stof</code> and <code>stoi</code> which throw exceptions when the input is not a <code>float</code> or <code>int</code>. Is there another way to convert the strings without having to catch exceptions? Perhaps some function that passes a a pointer to a <code>float</code> as argument and just returns a <code>boolean</code> which represents the success of the function of call. I would like to avoid using any <code>try</code> <code>catch</code> statements in any of my code.</p>