Movatterモバイル変換


[0]ホーム

URL:


cppreference.com
Namespaces
Variants
    Actions

      C++ named requirements:LegacyContiguousIterator(since C++17)

      From cppreference.com
      <cpp‎ |named req
       
       
      C++ named requirements
       

      ALegacyContiguousIterator is aLegacyIterator whose logically adjacent elements are also physically adjacent in memory.

      A pointer to an element of an array satisfies all requirements ofLegacyContiguousIterator.

      Contents

      [edit]Requirements

      The typeIt satisfiesLegacyContiguousIterator if

      And, for every

      • a, a dereferenceable iterator of typeIt
      • n, an integral value

      such that

      • a+ n is a valid and dereferenceable iterator value

      then

      [edit]Standard library

      The following standard library types areLegacyContiguousIterators.

      [edit]Notes

      Fancy pointer to object types are also required to satisfyLegacyContiguousIterator.

      LegacyContiguousIterator is replaced with thecontiguous_iterator concept: iterator types in the standard library that are required to satisfyLegacyContiguousIterator in C++17 are required to modelcontiguous_iterator in C++20.

      (since C++20)

      [edit]See also

      specifies that arandom_access_iterator is a contiguous iterator, referring to elements that are contiguous in memory
      (concept)[edit]
      Iterator library provides definitions for iterators, iterator traits, adaptors, and utility functions
      Retrieved from "https://en.cppreference.com/mwiki/index.php?title=cpp/named_req/ContiguousIterator&oldid=144910"

      [8]ページ先頭

      ©2009-2025 Movatter.jp