std::span<T,Extent>::first
提供: cppreference.com
template< std::size_t Count > constexpr std::span<element_type, Count> first() const; |
||
constexpr std::span<element_type, std::dynamic_extent> first( std::size_t Count ) const; |
||
このスパンの最初の Count
個の要素に対するビューとなるスパンを取得します。 Count > size() の場合、動作は未定義です。
[編集] 戻り値
r.data() == this->data() && r.size() == Count であるような、 *this の最初の Count
個の要素に対するビューとなるスパン r
。
[編集] 関連項目
シーケンスの最後の N 個の要素から構成されるサブスパンを取得します (パブリックメンバ関数) | |
サブスパンを取得します (パブリックメンバ関数) |