Consider the following case:

```
void Set(const std::function<void(int)> &fn);
void Set(const std::function<void(int, int)> &fn);

```

Now calling the function with

```
Set([](int a) {
    //...
});

```

Gives "ambiguous call to overloaded function" error. I am using Visual Studio 2010. Is there a work around or another method to achieve something similar. I cannot use templates, because these functions are stored for later use because I cannot determine the number of parameters in that case. If you ask I can submit more details.