Movatterモバイル変換


[0]ホーム

URL:


cppreference.com
Namespaces
Variants
    Actions

      std::basic_const_iterator<Iter>::operator[]

      From cppreference.com
      <cpp‎ |iterator‎ |basic const iterator
       
       
      Iterator library
      Iterator concepts
      Iterator primitives
      Algorithm concepts and utilities
      Indirect callable concepts
      Common algorithm requirements
      (C++20)
      (C++20)
      (C++20)
      Utilities
      (C++20)
      Iterator adaptors
      Range access
      (C++11)(C++14)
      (C++14)(C++14)  
      (C++11)(C++14)
      (C++14)(C++14)  
      (C++17)(C++20)
      (C++17)
      (C++17)
       
       
      constexprstd::iter_const_reference_t<Iter> operator[]( difference_type n)const
          requiresstd::random_access_iterator<Iterator>;
      (since C++23)

      Returns a reference to the element at specified relative location.

      Contents

      [edit]Parameters

      n - position relative to current location

      [edit]Return value

      A reference-to-const to the element at relative location, that is,static_cast<std::iter_const_reference_t<Iter>>(base()[n]).

      [edit]Example

      This section is incomplete
      Reason: no example

      [edit]See also

      accesses the pointed-to element
      (public member function)[edit]
      Retrieved from "https://en.cppreference.com/mwiki/index.php?title=cpp/iterator/basic_const_iterator/operator_at&oldid=171073"

      [8]ページ先頭

      ©2009-2025 Movatter.jp