Skip to content
Commit c43f6730 authored by Louis Dionne's avatar Louis Dionne
Browse files

[libcxx] Portability fix: unordered_set and unordered_multiset iterators are...

[libcxx] Portability fix: unordered_set and unordered_multiset iterators are not required to be the same

The unordered_set and unordered_multiset iterators are specified in the standard as follows:

using iterator             = implementation-defined; // see [container.requirements]
using const_iterator       = implementation-defined; // see [container.requirements]
using local_iterator       = implementation-defined; // see [container.requirements]
using const_local_iterator = implementation-defined; // see [container.requirements]

The pairs iterator/const_iterator and local_iterator/const_local_iterator
are not required to be the same. The reasonable requirement would be that
iterator can convert to const_iterator and local_iterator can convert to
const_local_iterator. This patch weakens the check and makes the test
more portable.

Reviewed as https://reviews.llvm.org/D56493.
Thanks to Andrey Maksimov for the patch.

llvm-svn: 352083
parent 18972d1e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment