iterator/zip: prefer std::size over .size

This commit is contained in:
Danny Robson 2019-05-12 10:30:10 +10:00
parent da6d5cb2a8
commit b0897a5ea7

View File

@ -158,7 +158,7 @@ namespace cruft::iterator {
{
// All stores should have the same size so we arbitrarily pick
// the first to query.
return std::get<0> (m_store).size ();
return std::size (std::get<0> (m_store));
}
@ -208,7 +208,9 @@ namespace cruft::iterator {
// The call to `zip` will peform more rigorous tests on the sizes
// of the container collection.
return zip (
iota (::cruft::variadic::get<0> (data...).size ()),
iota (
std::size (::cruft::variadic::get<0> (data...))
),
std::forward<ContainerT> (data)...
);
}