次の方法で共有


end

指定したコンテナーの最後の要素の後に要素への反復子を取得します。

template<class Container>
    auto end(Container& cont) 
        -> decltype(cont.end());
template<class Container>
    auto end(const Container& cont) 
        -> decltype(cont.end());
template<class Ty, class Size>
    Ty *end(Ty (&array)[Size]); 

パラメーター

  • cont
    コンテナー。

  • array
    型 Tyのオブジェクトの配列。

戻り値

最初の 2 種類のテンプレート関数は、cont.end()。

3 番目のテンプレート関数は &array[Size]を返します。

必要条件

ヘッダー: <iterator>

名前空間: std

参照

関連項目

<iterator>

begin