##### cppreference.com

##### Search

Create account

##### Namespaces

- Page
- Discussion

##### Variants

##### Views

- View
- Edit
- History

##### Actions

# operator==,!=(std::scoped_allocator_adaptor)

From cppreference.com
< cpp‎ | memory‎ | scoped allocator adaptor

template< class OuterAlloc1, class OuterAlloc2, class... InnerAllocs > bool operator==( const scoped_allocator_adaptor<OuterAlloc1, InnerAllocs...>& lhs, const scoped_allocator_adaptor<OuterAlloc2, InnerAllocs...>& rhs ); |  | (since C++11)
template< class OuterAlloc1, class OuterAlloc2, class... InnerAllocs > bool operator!=( const scoped_allocator_adaptor<OuterAlloc1, InnerAllocs...>& lhs, const scoped_allocator_adaptor<OuterAlloc2, InnerAllocs...>& rhs ); |  | (since C++11)

Compares two scoped allocator adaptors. Two such allocators are equal if:

- lhs.outer_allocator() == rhs.outer_allocator(), and
- if sizeof...(InnerAllocs) > 0, lhs.inner_allocator() == rhs.inner_allocator().

### [edit] Parameters

lhs, rhs | - | scoped allocator adaptors to compare

### [edit] Return value

1) Returns true if `lhs` and `rhs` are equal, false otherwise.
2) Returns true if `lhs` and `rhs` are not equal, false otherwise.

### [edit] Exceptions

`noexcept` specification:
noexcept
Retrieved from "http://en.cppreference.com/mwiki/index.php?title=cpp/memory/scoped_allocator_adaptor/operator_cmp&oldid=91656"
Category:

- unconditionally noexcept

Hidden categories:

- Pages with unreviewed unconditional noexcept template
- Pages with unreviewed noexcept template