I tried code below in Wandbox:
#include <array>
#include <iostream>
#include <tuple>
#include <typeinfo>
#include <functional>
#include <utility>
int main()
{
constexpr std::array<const char, 10> str{"123456789"};
constexpr auto foo = std::apply([](auto... args) constexpr { std::integer_sequence<char, args...>{}; } , str);
std::cout << typeid(foo).name();
}
and the compiler told me that args...
are not constant expression.
What's wrong?