std::pmr::operator==, std::pmr::operator!=

template< class T1, class T2 >

bool operator==( const std::pmr::polymorphic_allocator<T1>& lhs,

                 const std::pmr::polymorphic_allocator<T2>& rhs ) noexcept;
template< class T1, class T2 >

bool operator!=( const std::pmr::polymorphic_allocator<T1>& lhs,

                 const std::pmr::polymorphic_allocator<T2>& rhs ) noexcept;

比较二个 polymorphic_allocator 。若二个 polymorphic_allocator 的底层 memory_resource 比较相等,则它们比较相等。

1) 返回 *lhs.resource() == *rhs.resource()
2) 返回 !(lhs == rhs)

参数

lhs, rhs - 要比较的 polymorphic_allocator

返回值

1) *lhs.resource() == *rhs.resource()
2) !(lhs == rhs)

版本历史

  • (当前 | 先前 2017年9月28日 (四) 23:46Fruderica讨论 | 贡献 . . (926字节) (-19). . (merge noexcept) (撤销)
  • 当前 | 先前 2017年5月18日 (四) 16:13115.193.54.233讨论. . (945字节) (-2). . (撤销)
  • 当前 | 先前) 2017年5月4日 (四) 09:11Fruderica讨论 | 贡献. . (947字节) (+947). . (以“{{cpp/memory/pmr/title|operator{{==}}|operator!{{=}}}} {{cpp/memory/polymorphic_allocator/navbar}} {{dcl begin}} {{dcl | 1= template< class T1, class T2 > bool opera...”为内容创建页面)