As @NathanOliver comments, you are trying to use converting operator (5), which requires std::tuple_size > 1
.
You can work around this issue by constructing the second tuple from the first's argument: std::tuple<std::any> t2{ std::get<0>(t1) };
.
If you are working in some generic code which needs to handle tuple with any number of std::any
, then you need a slightly unwieldy:
auto t2 = std::apply([](const auto&& args) {
return std::make_tuple(std::any{ std::forward(decltype(args)) }... });
}, t1);