I basically want to do the following,
class C {
public:
void F(std::function<void(std::shared_ptr<void>)>){}
void F(std::function<void(std::shared_ptr<int>)>){}
};
However, when I compile and I try to use the function with std::shared_ptr<void> I get an error like:
error: call to member function 'F' is ambiguous
How may I solve this?
Aucun commentaire:
Enregistrer un commentaire