diff options
author | Howard Hinnant <hhinnant@apple.com> | 2013-09-30 19:08:22 +0000 |
---|---|---|
committer | Howard Hinnant <hhinnant@apple.com> | 2013-09-30 19:08:22 +0000 |
commit | 9fd9f84f480f1d260f6d6feb551b654a0d38ebfd (patch) | |
tree | e1d31da3324bb17e74d0ef030604895ead211969 /libcxx/test/containers | |
parent | 34b412676957dcdc934adc8fd0af3a583ad98252 (diff) | |
download | bcm5719-llvm-9fd9f84f480f1d260f6d6feb551b654a0d38ebfd.tar.gz bcm5719-llvm-9fd9f84f480f1d260f6d6feb551b654a0d38ebfd.zip |
SCARY/N2913 iterator support between the multi and non-multi versions of the associative and unordered containers. I beleive lack of support for this was accidentally recently introduced (by me) and this is fixing a regression. This time tests are put in to prevent such a regression in the future.
llvm-svn: 191692
Diffstat (limited to 'libcxx/test/containers')
4 files changed, 96 insertions, 0 deletions
diff --git a/libcxx/test/containers/associative/multimap/scary.pass.cpp b/libcxx/test/containers/associative/multimap/scary.pass.cpp new file mode 100644 index 00000000000..b99d9bc2df9 --- /dev/null +++ b/libcxx/test/containers/associative/multimap/scary.pass.cpp @@ -0,0 +1,24 @@ +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +// <map> + +// class map class multimap + +// Extension: SCARY/N2913 iterator compatibility between map and multimap + +#include <map> + +int main() +{ + typedef std::map<int, int> M1; + typedef std::multimap<int, int> M2; + M2::iterator i; + M1::iterator j = i; +} diff --git a/libcxx/test/containers/associative/multiset/scary.pass.cpp b/libcxx/test/containers/associative/multiset/scary.pass.cpp new file mode 100644 index 00000000000..f5ee32714e8 --- /dev/null +++ b/libcxx/test/containers/associative/multiset/scary.pass.cpp @@ -0,0 +1,24 @@ +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +// <set> + +// class set class multiset + +// Extension: SCARY/N2913 iterator compatibility between set and multiset + +#include <set> + +int main() +{ + typedef std::set<int> M1; + typedef std::multiset<int> M2; + M2::iterator i; + M1::iterator j = i; +} diff --git a/libcxx/test/containers/unord/unord.multimap/scary.pass.cpp b/libcxx/test/containers/unord/unord.multimap/scary.pass.cpp new file mode 100644 index 00000000000..e619a7a5429 --- /dev/null +++ b/libcxx/test/containers/unord/unord.multimap/scary.pass.cpp @@ -0,0 +1,24 @@ +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +// <unordered_map> + +// class unordered_map class unordered_multimap + +// Extension: SCARY/N2913 iterator compatibility between unordered_map and unordered_multimap + +#include <unordered_map> + +int main() +{ + typedef std::unordered_map<int, int> M1; + typedef std::unordered_multimap<int, int> M2; + M2::iterator i; + M1::iterator j = i; +} diff --git a/libcxx/test/containers/unord/unord.multiset/scary.pass.cpp b/libcxx/test/containers/unord/unord.multiset/scary.pass.cpp new file mode 100644 index 00000000000..dfd144bb317 --- /dev/null +++ b/libcxx/test/containers/unord/unord.multiset/scary.pass.cpp @@ -0,0 +1,24 @@ +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +// <unordered_set> + +// class unordered_set class unordered_multiset + +// Extension: SCARY/N2913 iterator compatibility between unordered_set and unordered_multiset + +#include <unordered_set> + +int main() +{ + typedef std::unordered_set<int> M1; + typedef std::unordered_multiset<int> M2; + M2::iterator i; + M1::iterator j = i; +} |