explicit DenseSetImpl(unsigned InitialReserve = 0) : TheMap(InitialReserve) {}
+ template <typename InputIt>
+ DenseSetImpl(const InputIt &I, const InputIt &E)
+ : DenseSetImpl(PowerOf2Ceil(std::distance(I, E))) {
+ insert(I, E);
+ }
+
DenseSetImpl(std::initializer_list<ValueT> Elems)
: DenseSetImpl(PowerOf2Ceil(Elems.size())) {
insert(Elems.begin(), Elems.end());
DenseSetTestTypes;
TYPED_TEST_CASE(DenseSetTest, DenseSetTestTypes);
+TYPED_TEST(DenseSetTest, Constructor) {
+ constexpr unsigned a[] = {1, 2, 4};
+ TypeParam set(std::begin(a), std::end(a));
+ EXPECT_EQ(3u, set.size());
+ EXPECT_EQ(1u, set.count(1));
+ EXPECT_EQ(1u, set.count(2));
+ EXPECT_EQ(1u, set.count(4));
+}
+
TYPED_TEST(DenseSetTest, InitializerList) {
TypeParam set({1, 2, 1, 4});
EXPECT_EQ(3u, set.size());