#include <iostream>
#include <functional>
#include <utility>

void cb1(int a, double b, char c)
{
    std::cout << "cb1( " << a << ", " << b << ", " << c << ")\n";
}

void cb2(const char* a, const char* b)
{
	std::cout << "cb2( \"" << a << "\", \"" << b << "\")\n" ; 
}

template <typename ...Args>
void mylibfun(int, int, std::function<void(Args...)>&& func, Args... args)
{
    func(args...);
}

template <typename ...Args>
void mylibfun(int a, int b, void f(Args...), Args... args)
{
    mylibfun(a, b, std::function<void(Args...)>(f), args...);
}

int main()
{
    mylibfun(1, 2, cb1, 1, 2.0, 'c');
    mylibfun(3, 4, cb2, "abc", "xyz") ;
}