iterator: assert that zip arguments are the same size

This commit is contained in:
Danny Robson 2018-07-18 15:19:53 +10:00
parent db24df329f
commit f1e5e560bc

View File

@ -439,6 +439,8 @@ namespace util {
auto auto
zip (ContainerT&&... data) zip (ContainerT&&... data)
{ {
CHECK (((std::size (data) == std::size (variadic::get<0> (data...))) && ...));
return detail::zip::collection< return detail::zip::collection<
decltype (std::forward_as_tuple (data...)), decltype (std::forward_as_tuple (data...)),
decltype (std::make_tuple (std::begin (data)...)), decltype (std::make_tuple (std::begin (data)...)),