I'm playing around with callback functions and wish to register multiple functions via std::bind that differ in signatures (altough they all return void). Assigning the result of the std::bind to the std::variant yields in a "conversion to non-scalar type" error. Is it an ambiguity error? Can I provide the compiler with more information?
Dropping the std::bind (which allows the assignment) is not an option as I wish to register the callbacks using some
template <typename Function, typename... Args>
void …Run Code Online (Sandbox Code Playgroud)