Scroll to navigation

deductionguidesforstd::ranges::take_view(3) C++ Standard Libary deductionguidesforstd::ranges::take_view(3)

NAME

deductionguidesforstd::ranges::take_view - deductionguidesforstd::ranges::take_view

Synopsis

Defined in header <ranges> template< class R > take_view( R&&, ranges::range_difference_t<R> ) -> (since C++20) take_view<views::all_t<R>>;

The deduction guide is provided for std::ranges::take_view to allow deduction from range and number of elements.

Example


This section is incomplete
Reason: no example


Defect reports

The following behavior-changing defect reports were applied retroactively to previously published C++ standards.


DR Applied to Behavior as published Correct behavior
the template parameter R is R is unconstrained LWG 3447 C++20 constrained with range (but range_difference_t requires
range)

2026.11.10 http://cppreference.com