Ambiguous FunctionOverloading in C++?
<p>I have a class A and it has two method foo which are actually overloaded. The class somewhat look like this </p>

<pre><code>class A
{
public:
    bool foo(int&amp; a);
    bool foo(size_t&amp; a);
};

bool A::foo(int&amp; a)
{
    return true;
}

bool A::foo(size_t&amp; a)
{
    int new_a = a;
    return foo(new_a);  // here Cl throws me warning C4717: 'hweudm::UDMAbstractBaseEntity::SetAttribute' : recursive on all control paths, function will cause runtime stack overflow
}

int main()
{
    A aObj;
    size_t val = 12;
    aObj.foo(val);
    return 0;
}
</code></pre>

<p>From the code it does not look ambiguous. But I don't want to this warning during compilation. So can Anyone tell me </p>

<ol>
<li>Why I am getting this warning even though I have type casted size_t to int ?</li>
<li>whether this will be be an error not a warning on GCC.</li>
</ol>
