deductionguidesforstd::span (3) - Linux Manuals

deductionguidesforstd::span: deductionguidesforstd::span

NAME

deductionguidesforstd::span - deductionguidesforstd::span

Synopsis


Defined in header <span>
template<class T, std::size_t N> (1)
span(T (&)[N]) -> span<T, N>;
template<class T, std::size_t N> (2)
span(std::array<T, N>&) -> span<T, N>;
template<class T, std::size_t N> (3)
span(const std::array<T, N>&) -> span<const T, N>;
template<class Container> (4)
span(Container&) -> span<typename Container::value_type>;
template<class Container> (5)
span(const Container&) -> span<const typename Container::value_type>;


Five deduction_guides are provided for span.
(1-3) allow the static extent to be deduced from built-in arrays and std::array.
(4-5) allow the element type to be deduced from containers that supply a nested type value_type.