diff options
| author | Marshall Clow <mclow.lists@gmail.com> | 2013-09-11 00:06:45 +0000 |
|---|---|---|
| committer | Marshall Clow <mclow.lists@gmail.com> | 2013-09-11 00:06:45 +0000 |
| commit | 0a55d17bcd45a7af9d6db9786ff22c563c971bf6 (patch) | |
| tree | 1f79ce74b301633a9adc69555ec9a26cac3cb842 /libcxx/test/containers/associative/set/set.cons/iter_iter_alloc.pass.cpp | |
| parent | 2e0fb1ef5b8752fb09b86285a2bd111dbac78a28 (diff) | |
| download | bcm5719-llvm-0a55d17bcd45a7af9d6db9786ff22c563c971bf6.tar.gz bcm5719-llvm-0a55d17bcd45a7af9d6db9786ff22c563c971bf6.zip | |
LWG Issue #2210 Part 4 - map/multimap
llvm-svn: 190454
Diffstat (limited to 'libcxx/test/containers/associative/set/set.cons/iter_iter_alloc.pass.cpp')
| -rw-r--r-- | libcxx/test/containers/associative/set/set.cons/iter_iter_alloc.pass.cpp | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/libcxx/test/containers/associative/set/set.cons/iter_iter_alloc.pass.cpp b/libcxx/test/containers/associative/set/set.cons/iter_iter_alloc.pass.cpp index 9b4992bdb09..1ae4634a5b7 100644 --- a/libcxx/test/containers/associative/set/set.cons/iter_iter_alloc.pass.cpp +++ b/libcxx/test/containers/associative/set/set.cons/iter_iter_alloc.pass.cpp @@ -14,6 +14,10 @@ // template <class InputIterator> // set(InputIterator first, InputIterator last, // const value_compare& comp, const allocator_type& a); +// +// template <class InputIterator> +// set(InputIterator first, InputIterator last, +// const allocator_type& a); #include <set> #include <cassert> @@ -49,4 +53,32 @@ int main() assert(*m.begin() == 1); assert(*next(m.begin()) == 2); assert(*next(m.begin(), 2) == 3); +#if _LIBCPP_STD_VER > 11 + { + typedef int V; + V ar[] = + { + 1, + 1, + 1, + 2, + 2, + 2, + 3, + 3, + 3 + }; + typedef test_allocator<V> A; + typedef test_compare<std::less<int> > C; + A a(7); + std::set<V, C, A> m(ar, ar+sizeof(ar)/sizeof(ar[0]), a); + + assert(m.size() == 3); + assert(distance(m.begin(), m.end()) == 3); + assert(*m.begin() == 1); + assert(*next(m.begin()) == 2); + assert(*next(m.begin(), 2) == 3); + assert(m.get_allocator() == a); + } +#endif } |

