Movatterモバイル変換


[0]ホーム

URL:


cppreference.com
Namespaces
Variants
    Actions

      operator==,!=(std::istreambuf_iterator<CharT,Traits>)

      From cppreference.com
      <cpp‎ |iterator‎ |istreambuf 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)
       
       
      Defined in header<iterator>
      template<class CharT,class Traits>

      bool operator==(conststd::istreambuf_iterator<CharT,Traits>& lhs,

                       conststd::istreambuf_iterator<CharT,Traits>& rhs);
      (1)
      template<class CharT,class Traits>

      bool operator!=(conststd::istreambuf_iterator<CharT,Traits>& lhs,

                       conststd::istreambuf_iterator<CharT,Traits>& rhs);
      (2)(until C++20)
      friendbool operator==(const istreambuf_iterator& lhs,
                             std::default_sentinel_t);
      (3)(since C++20)

      Checks whether bothlhs andrhs are valid, or both are invalid, regardless of the stream buffer objects they use.

      1) Equivalent tolhs.equal(rhs).
      2) Equivalent to!lhs.equal(rhs).
      3) Checks whetherlhs is invalid. Equivalent tolhs.equal(istreambuf_iterator{}).
      This function is not visible to ordinaryunqualified orqualified lookup, and can only be found byargument-dependent lookup when std::istreambuf_iterator<CharT,Traits> is an associated class of the arguments.

      The!= operator issynthesized fromoperator==.

      (since C++20)

      [edit]Parameters

      lhs, rhs - stream buffer iterators to compare

      [edit]Return value

      1) The result oflhs.equal(rhs).
      2) The result of!lhs.equal(rhs).
      3) The result oflhs.equal(istreambuf_iterator{}).

      [edit]Exceptions

      May throw implementation-defined exceptions.

      Retrieved from "https://en.cppreference.com/mwiki/index.php?title=cpp/iterator/istreambuf_iterator/operator_cmp&oldid=156810"

      [8]ページ先頭

      ©2009-2026 Movatter.jp