名前空間
変種
操作

std::span<T,Extent>::last

提供: cppreference.com
< cpp‎ | container‎ | span
template<std::size_t Count >
constexpr std::span<element_type, Count> last()const;
constexpr std::span<element_type, std::dynamic_extent> last(std::size_t Count )const;

このスパンの最後の Count 個の要素に対するビューとなるスパンを取得します。 Count > size() の場合、動作は未定義です。

[編集] 戻り値

r.data()== this->data()+(this->size()- Count)&& r.size()== Count であるような、 *this の最後の Count 個の要素に対するビューとなるスパン r

[編集] 関連項目

シーケンスの最初の N 個の要素から構成されるサブスパンを取得します
(パブリックメンバ関数)[edit]
サブスパンを取得します
(パブリックメンバ関数)[edit]
close