diff options
author | Marshall Clow <mclow.lists@gmail.com> | 2015-06-30 18:15:41 +0000 |
---|---|---|
committer | Marshall Clow <mclow.lists@gmail.com> | 2015-06-30 18:15:41 +0000 |
commit | 58113db00cc4bb9c63ccb7b013a3e2b405bfc1cd (patch) | |
tree | 674aa06a4107fb6afa09fc61fb9a0272b8429d34 /test/std/containers/associative/multimap/multimap.ops/count3.fail.cpp | |
parent | 07546f3b93c8ffbdac6f93d11de7040dcbce6f8c (diff) |
Add tests for LWG#2299. While doing so, I noticed that the tests we have for the transparent comparators don't actually call them. Fix those tests, too. Now one of them is failing, due to a missing const in <map>. Add that (twice). Next step is to do the same for <unordered_map>
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@241091 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/std/containers/associative/multimap/multimap.ops/count3.fail.cpp')
-rw-r--r-- | test/std/containers/associative/multimap/multimap.ops/count3.fail.cpp | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/test/std/containers/associative/multimap/multimap.ops/count3.fail.cpp b/test/std/containers/associative/multimap/multimap.ops/count3.fail.cpp new file mode 100644 index 000000000..4bb9d1463 --- /dev/null +++ b/test/std/containers/associative/multimap/multimap.ops/count3.fail.cpp @@ -0,0 +1,37 @@ +//===----------------------------------------------------------------------===// +// +// 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 multimap + +// iterator find(const key_type& k); +// const_iterator find(const key_type& k) const; +// +// The member function templates find, count, lower_bound, upper_bound, and +// equal_range shall not participate in overload resolution unless the +// qualified-id Compare::is_transparent is valid and denotes a type + + +#include <map> +#include <cassert> + +#include "is_transparent.h" + +#if _LIBCPP_STD_VER <= 11 +#error "This test requires is C++14 (or later)" +#else + +int main() +{ + typedef std::multimap<int, double, transparent_less_not_a_type> M; + + M().count(C2Int{5}); +} +#endif
\ No newline at end of file |