std::span<T,Extent>::last
提供: cppreference.com
<tbody>
</tbody>
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 個の要素から構成されるサブスパンを取得します (パブリックメンバ関数) | |
| サブスパンを取得します (パブリックメンバ関数) |