#include <iostream>
template <class Function, typename...Args>
inline auto FunctionWrapper(Function &&fun, Args &&...args) -> decltype(fun(std::forward<Args>(args)...)) {
return fun(std::forward<Args>(args)...);
}
void test0() {
std::cout << "test0" << std::endl;
}
int test1() {
std::cout << "test1" << std::endl;
return 1;
}
int test2(int x) {
std::cout << "test2" << std::endl;
return x;
}
std::string test3(const std::string s1, const std::string s2) {
std::cout << "test3" << std::endl;
return s1 + s2;
}
int main() {
FunctionWrapper(test0);
FunctionWrapper(test1);
FunctionWrapper(test2, 10);
FunctionWrapper(test3, "aa", "bb");
return 0;
}