The desired behaviour can be illustrated as follows:
void foo(int x, int y) {
std::cout << x << " " << y << std::endl;
}
int main() {
all_combinations<2>(foo, std::make_tuple(1, 2)); // K = 2
// to run:
// foo(1, 1)
// foo(1, 2)
// foo(2, 1)
// foo(2, 2)
}
Aucun commentaire:
Enregistrer un commentaire