I've got the following code :
#include <functional>
using namespace std;
void foo(function<void(int)>);
void foo(function<void(float, int)>);
void bar(int);
void bar2(float, int);
void dummy()
{
foo(bar);
foo(bar2);
}
Depending on the different compilers I tried on http://gcc.godbolt.org/ there is an ambiguity error or not... Who's right ? What is the most elegant way to solve this issue ?