Possible Duplicate:
Consider following C++ example
class A
{
public:
int foo(int a, int b);
int foo(int a, double b);
};
int main()
{
A a;
auto f = std::async(std::launch::async, &A::foo, &a, 2, 3.5);
}
This gives 'std::async' : cannot deduce template argument as function argument is ambiguous. How do I resolve this ambiguity??
f = std::async(std::launch::async, [&a] { a.foo(2, 3.5); }); int x = f.get();
is not work. Is there any especial way of getting the value? – Must