1 //===----------------------------------------------------------------------===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
13 // size_type count(const key_type& k) const;
18 #include "test_macros.h"
19 #include "min_allocator.h"
20 #include "private_constructor.h"
26 typedef std::set
<int> M
;
27 typedef M::size_type R
;
39 const M
m(ar
, ar
+sizeof(ar
)/sizeof(ar
[0]));
59 #if TEST_STD_VER >= 11
62 typedef std::set
<int, std::less
<int>, min_allocator
<int>> M
;
63 typedef M::size_type R
;
75 const M
m(ar
, ar
+sizeof(ar
)/sizeof(ar
[0]));
99 typedef std::set
<int, std::less
<>> M
;
100 typedef M::size_type R
;
112 const M
m(ar
, ar
+sizeof(ar
)/sizeof(ar
[0]));
133 typedef PrivateConstructor V
;
134 typedef std::set
<V
, std::less
<>> M
;
135 typedef M::size_type R
;
138 m
.insert ( V::make ( 5 ));
139 m
.insert ( V::make ( 6 ));
140 m
.insert ( V::make ( 7 ));
141 m
.insert ( V::make ( 8 ));
142 m
.insert ( V::make ( 9 ));
143 m
.insert ( V::make ( 10 ));
144 m
.insert ( V::make ( 11 ));
145 m
.insert ( V::make ( 12 ));