• Class / Function / Type

      std::
    • Header file

      <>
    • Other / All

    最終更新日時(UTC):
    が更新

    履歴 編集

    function template
    <ranges>

    std::ranges::view_interface::operator []

    template<random_access_range R = D>
    constexpr decltype(auto) operator[](range_difference_t<R> n)       // (1)
    
    template<random_access_range R = const D>
    constexpr decltype(auto) operator[](range_difference_t<R> n) const // (2)
    

    概要

    Rangeの要素にアクセスする。

    テンプレートパラメータ制約

    Rrandom_access_rangeであること。

    戻り値

    (1)、(2)共に、以下と等価:

    計算量

    償却定数時間

    バージョン

    言語

    • C++20

    処理系

    参照