Is it possible to write something like this?
[](std::index_sequence<std::size_t ...I> s) {
};
Or this?
[]<std::size_t ...I>(std::index_sequence<I...> s) {
}
How is the syntax for this in C++14 or C++17? Or is it not possible at all? Basically, I just want to have the I as a template parameter pack, and the lambda just serves as a way to do that. Alternatively, is there a syntax to achieve the following?
std::index_sequence<std::size_t ...I> x = std::make_index_sequence<10>{};
// I now is a local template parameter pack
GCC provides the latter syntax as an extension, but it's not standard:
Live Demo