Movatterモバイル変換


[0]ホーム

URL:


cppreference.com
Namespaces
Variants
    Actions

      operator==,!=(std::allocator)

      From cppreference.com
      <cpp‎ |memory‎ |allocator
       
       
      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)
      template<class T1,class T2>
      bool operator==(const allocator<T1>& lhs,const allocator<T2>& rhs)throw();
      (until C++11)
      template<class T1,class T2>
      bool operator==(const allocator<T1>& lhs,const allocator<T2>& rhs)noexcept;
      (since C++11)
      (until C++20)
      template<class T1,class T2>

      constexprbool

          operator==(const allocator<T1>& lhs,const allocator<T2>& rhs)noexcept;
      (since C++20)
      (2)
      template<class T1,class T2>
      bool operator!=(const allocator<T1>& lhs,const allocator<T2>& rhs)throw();
      (until C++11)
      template<class T1,class T2>
      bool operator!=(const allocator<T1>& lhs,const allocator<T2>& rhs)noexcept;
      (since C++11)
      (until C++20)

      Compares two default allocators. Since default allocators are stateless, two default allocators are always equal.

      1) Returnstrue.
      2) Returnsfalse.

      The!= operator issynthesized fromoperator==.

      (since C++20)

      [edit]Parameters

      lhs, rhs - default allocators to compare

      [edit]Return value

      1)true
      2)false
      Retrieved from "https://en.cppreference.com/mwiki/index.php?title=cpp/memory/allocator/operator_cmp&oldid=153189"

      [8]ページ先頭

      ©2009-2025 Movatter.jp