Namespaces
Variants
Views
Actions

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

From cppreference.com
< cpp‎ | memory‎ | allocator
Revision as of 17:44, 26 August 2013 by P12 (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
template< class T1, class T2 >
bool operator==( const allocator<T1>& lhs, const allocator<T2>& rhs );
template< class T1, class T2 >
bool operator!=( const allocator<T1>& lhs, const allocator<T2>& rhs );

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

1) Returns true
2) Returns false

[edit] Parameters

lhs, rhs - default allocators to compare

[edit] Return value

1) true
2) false

[edit] Exceptions

(none) (until C++11)
noexcept specification:  
noexcept
  
(since C++11)