Movatterモバイル変換


[0]ホーム

URL:


cppreference.com
Namespaces
Variants
    Actions

      no-throw-input-iterator,no-throw-forward-iterator,no-throw-sentinel-for,no-throw-input-range,no-throw-forward-range

      From cppreference.com
      <cpp‎ |memory
       
       
      Memory management library
      (exposition only*)
      Allocators
      Uninitialized memory algorithms
      Constrained uninitialized memory algorithms
      Memory resources
      Uninitialized storage(until C++20)
      (until C++20*)
      (until C++20*)
      Garbage collector support(until C++23)
      (C++11)(until C++23)
      (C++11)(until C++23)
      (C++11)(until C++23)
      (C++11)(until C++23)
      (C++11)(until C++23)
      (C++11)(until C++23)
       
      (1)(exposition only*)
      template<class I>

      concept no-throw-forward-iterator=
          no-throw-input-iterator<I>&&
         std::forward_iterator<I>&&

          no-throw-sentinel-for<I, I>;
      (2)(exposition only*)
      template<class S,class I>
      concept no-throw-sentinel-for=std::sentinel_for<S, I>;
      (3)(exposition only*)
      template<class R>

      concept no-throw-input-range=
         ranges::range<R>&&
          no-throw-input-iterator<ranges::iterator_t<R>>&&

          no-throw-sentinel-for<ranges::sentinel_t<R>,ranges::iterator_t<R>>;
      (4)(exposition only*)
      template<class R>

      concept no-throw-forward-range=
          no-throw-input-range<R>&&

          no-throw-forward-iterator<ranges::iterator_t<R>>;
      (5)(exposition only*)

      These exposition-only concepts specify that no exceptions are thrown from operations required by algorithms on iterators, sentinels, and ranges.

      1) Theno-throw-input-iterator concept requires that dereferencing the iterator yields an lvalue, likecontiguous_iterator andLegacyForwardIterator.

      [edit]Semantic requirements

      Like all standard concepts, every concept listed here is modeled only if all concepts it subsumes are modeled.

      1) A typeI modelsno-throw-input-iterator only if no exceptions are thrown from increment, copy construction, move construction, copy assignment, move assignment, or indirection through valid iterators.
      3) TypesS andI modelno-throw-sentinel-for only if no exceptions are thrown from copy construction, move construction, copy assignment, move assignment, or comparisons between valid values of typeI andS.
      4) A typeR modelsno-throw-input-range only if no exceptions are thrown from calls toranges::begin andranges::end on an object of typeR.

      [edit]Notes

      These concepts allow some operations on iterators and sentinels to throw exceptions, e.g. operations on invalid values.

      [edit]See also

      specifies that a type is an input iterator, that is, its referenced values can be read and it can be both pre- and post-incremented
      (concept)[edit]
      specifies that aninput_iterator is a forward iterator, supporting equality comparison and multi-pass
      (concept)[edit]
      specifies a type is a sentinel for aninput_or_output_iterator type
      (concept)[edit]
      specifies a range whose iterator type satisfiesinput_iterator
      (concept)[edit]
      specifies a range whose iterator type satisfiesforward_iterator
      (concept)[edit]
      Retrieved from "https://en.cppreference.com/mwiki/index.php?title=cpp/memory/ranges/nothrow_concepts&oldid=156065"

      [8]ページ先頭

      ©2009-2025 Movatter.jp