 st8b7c:f320:99b9:690f:4595:cd17:293a:c069ranges8b7c:f320:99b9:690f:4595:cd17:293a:c069zip_transform_view<F,Views...>8b7c:f320:99b9:690f:4595:cd17:293a:c069size    constexpr auto size()
    requires ranges8b7c:f320:99b9:690f:4595:cd17:293a:c069sized_range</*InnerView*/>;
  (1)   (since C++23)     constexpr auto size() const
    requires ranges8b7c:f320:99b9:690f:4595:cd17:293a:c069sized_range<const /*InnerView*/>
  (2)   (since C++23)    Returns the number of elements in the zip_transform_view. Provided only if each underlying (adapted) range satisfies sized_range.

1,2) Equivalent to: return zip_.size();.  Parameters (none).
 Return value The number of elements, which is the minimum size among all sizes of adapted views.
 Example  #include <algorithm>
#include <cassert>
#include <deque>
#include <forward_list>
#include <functional>
#include <iostream>
#include <ranges>
#include <vector>
 
int main()
{
    auto x = st8b7c:f320:99b9:690f:4595:cd17:293a:c069vector{1, 2, 3, 4, 5};
    auto y = st8b7c:f320:99b9:690f:4595:cd17:293a:c069deque<short>{10, 20, 30};
    auto z = st8b7c:f320:99b9:690f:4595:cd17:293a:c069forward_list{100., 200.};
 
    auto v1 = st8b7c:f320:99b9:690f:4595:cd17:293a:c069views8b7c:f320:99b9:690f:4595:cd17:293a:c069zip_transform(st8b7c:f320:99b9:690f:4595:cd17:293a:c069plus, x, y);
    assert(v1.size() == st8b7c:f320:99b9:690f:4595:cd17:293a:c069min(x.size(), y.size()));
    assert(v1.size() == 3);
    for (int i : v1) st8b7c:f320:99b9:690f:4595:cd17:293a:c069cout << i << '\n';
 
    [[maybe_unused]] auto v2 = st8b7c:f320:99b9:690f:4595:cd17:293a:c069views8b7c:f320:99b9:690f:4595:cd17:293a:c069zip_transform(st8b7c:f320:99b9:690f:4595:cd17:293a:c069plus, x, z);
//  auto sz = v2.size(); // Error, v2 does not have size():
    static_assert(not st8b7c:f320:99b9:690f:4595:cd17:293a:c069ranges8b7c:f320:99b9:690f:4595:cd17:293a:c069sized_range<decltype(z)>);
} Output:
11 22 33   See also     ranges8b7c:f320:99b9:690f:4595:cd17:293a:c069size
(C++20)   returns an integer equal to the size of a range  (customization point object) 
    ranges8b7c:f320:99b9:690f:4595:cd17:293a:c069ssize
(C++20)   returns a signed integer equal to the size of a range  (customization point object) 
  

    
{'path': 'public/docs/cpp/ranges/zip_transform_view/size.html', 'source': 'DevDocs.IO'}