forked from OSchip/llvm-project
[libcxx] [test] Fix Clang -Wunused-local-typedef, part 2/3.
These typedefs were completely unused. Fixes D29136. llvm-svn: 294155
This commit is contained in:
parent
03fe6e2da2
commit
50bd9576f0
|
@ -68,7 +68,6 @@ test3(unsigned n, Allocator const &alloc = Allocator())
|
||||||
{
|
{
|
||||||
#if TEST_STD_VER > 11
|
#if TEST_STD_VER > 11
|
||||||
typedef std::deque<T, Allocator> C;
|
typedef std::deque<T, Allocator> C;
|
||||||
typedef typename C::const_iterator const_iterator;
|
|
||||||
{
|
{
|
||||||
C d(n, alloc);
|
C d(n, alloc);
|
||||||
assert(d.size() == n);
|
assert(d.size() == n);
|
||||||
|
|
|
@ -25,7 +25,6 @@ test3(unsigned n, Allocator const &alloc = Allocator())
|
||||||
{
|
{
|
||||||
#if TEST_STD_VER > 11
|
#if TEST_STD_VER > 11
|
||||||
typedef std::list<T, Allocator> C;
|
typedef std::list<T, Allocator> C;
|
||||||
typedef typename C::const_iterator const_iterator;
|
|
||||||
{
|
{
|
||||||
C d(n, alloc);
|
C d(n, alloc);
|
||||||
assert(d.size() == n);
|
assert(d.size() == n);
|
||||||
|
|
|
@ -25,14 +25,11 @@ int main()
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
typedef std::unordered_multimap<int, std::string> C;
|
typedef std::unordered_multimap<int, std::string> C;
|
||||||
typedef C::const_iterator I;
|
|
||||||
typedef std::pair<int, std::string> P;
|
|
||||||
const C c;
|
const C c;
|
||||||
LIBCPP_ASSERT(c.bucket_count() == 0);
|
LIBCPP_ASSERT(c.bucket_count() == 0);
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
typedef std::unordered_multimap<int, std::string> C;
|
typedef std::unordered_multimap<int, std::string> C;
|
||||||
typedef C::const_iterator I;
|
|
||||||
typedef std::pair<int, std::string> P;
|
typedef std::pair<int, std::string> P;
|
||||||
P a[] =
|
P a[] =
|
||||||
{
|
{
|
||||||
|
|
|
@ -44,7 +44,6 @@ int main()
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
typedef std::unordered_multimap<int, std::string> C;
|
typedef std::unordered_multimap<int, std::string> C;
|
||||||
typedef std::pair<int, std::string> P;
|
|
||||||
const C c;
|
const C c;
|
||||||
assert(c.load_factor() == 0);
|
assert(c.load_factor() == 0);
|
||||||
}
|
}
|
||||||
|
@ -70,7 +69,6 @@ int main()
|
||||||
{
|
{
|
||||||
typedef std::unordered_multimap<int, std::string, std::hash<int>, std::equal_to<int>,
|
typedef std::unordered_multimap<int, std::string, std::hash<int>, std::equal_to<int>,
|
||||||
min_allocator<std::pair<const int, std::string>>> C;
|
min_allocator<std::pair<const int, std::string>>> C;
|
||||||
typedef std::pair<int, std::string> P;
|
|
||||||
const C c;
|
const C c;
|
||||||
assert(c.load_factor() == 0);
|
assert(c.load_factor() == 0);
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,8 +25,6 @@ int main()
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
typedef std::unordered_multimap<int, std::string> C;
|
typedef std::unordered_multimap<int, std::string> C;
|
||||||
typedef C::const_iterator I;
|
|
||||||
typedef std::pair<int, std::string> P;
|
|
||||||
const C c;
|
const C c;
|
||||||
assert(c.max_bucket_count() > 0);
|
assert(c.max_bucket_count() > 0);
|
||||||
}
|
}
|
||||||
|
@ -34,8 +32,6 @@ int main()
|
||||||
{
|
{
|
||||||
typedef std::unordered_multimap<int, std::string, std::hash<int>, std::equal_to<int>,
|
typedef std::unordered_multimap<int, std::string, std::hash<int>, std::equal_to<int>,
|
||||||
min_allocator<std::pair<const int, std::string>>> C;
|
min_allocator<std::pair<const int, std::string>>> C;
|
||||||
typedef C::const_iterator I;
|
|
||||||
typedef std::pair<int, std::string> P;
|
|
||||||
const C c;
|
const C c;
|
||||||
assert(c.max_bucket_count() > 0);
|
assert(c.max_bucket_count() > 0);
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,13 +30,11 @@ int main()
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
typedef std::unordered_multimap<int, std::string> C;
|
typedef std::unordered_multimap<int, std::string> C;
|
||||||
typedef std::pair<int, std::string> P;
|
|
||||||
const C c;
|
const C c;
|
||||||
assert(c.max_load_factor() == 1);
|
assert(c.max_load_factor() == 1);
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
typedef std::unordered_multimap<int, std::string> C;
|
typedef std::unordered_multimap<int, std::string> C;
|
||||||
typedef std::pair<int, std::string> P;
|
|
||||||
C c;
|
C c;
|
||||||
assert(c.max_load_factor() == 1);
|
assert(c.max_load_factor() == 1);
|
||||||
c.max_load_factor(2.5);
|
c.max_load_factor(2.5);
|
||||||
|
@ -46,14 +44,12 @@ int main()
|
||||||
{
|
{
|
||||||
typedef std::unordered_multimap<int, std::string, std::hash<int>, std::equal_to<int>,
|
typedef std::unordered_multimap<int, std::string, std::hash<int>, std::equal_to<int>,
|
||||||
min_allocator<std::pair<const int, std::string>>> C;
|
min_allocator<std::pair<const int, std::string>>> C;
|
||||||
typedef std::pair<int, std::string> P;
|
|
||||||
const C c;
|
const C c;
|
||||||
assert(c.max_load_factor() == 1);
|
assert(c.max_load_factor() == 1);
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
typedef std::unordered_multimap<int, std::string, std::hash<int>, std::equal_to<int>,
|
typedef std::unordered_multimap<int, std::string, std::hash<int>, std::equal_to<int>,
|
||||||
min_allocator<std::pair<const int, std::string>>> C;
|
min_allocator<std::pair<const int, std::string>>> C;
|
||||||
typedef std::pair<int, std::string> P;
|
|
||||||
C c;
|
C c;
|
||||||
assert(c.max_load_factor() == 1);
|
assert(c.max_load_factor() == 1);
|
||||||
c.max_load_factor(2.5);
|
c.max_load_factor(2.5);
|
||||||
|
|
|
@ -34,7 +34,6 @@ int main()
|
||||||
typedef test_compare<std::equal_to<int> > Compare;
|
typedef test_compare<std::equal_to<int> > Compare;
|
||||||
typedef test_allocator<std::pair<const int, std::string> > Alloc;
|
typedef test_allocator<std::pair<const int, std::string> > Alloc;
|
||||||
typedef std::unordered_multimap<int, std::string, Hash, Compare, Alloc> C;
|
typedef std::unordered_multimap<int, std::string, Hash, Compare, Alloc> C;
|
||||||
typedef std::pair<int, std::string> P;
|
|
||||||
C c1(0, Hash(1), Compare(1), Alloc(1, 1));
|
C c1(0, Hash(1), Compare(1), Alloc(1, 1));
|
||||||
C c2(0, Hash(2), Compare(2), Alloc(1, 2));
|
C c2(0, Hash(2), Compare(2), Alloc(1, 2));
|
||||||
c2.max_load_factor(2);
|
c2.max_load_factor(2);
|
||||||
|
@ -219,7 +218,6 @@ int main()
|
||||||
typedef test_compare<std::equal_to<int> > Compare;
|
typedef test_compare<std::equal_to<int> > Compare;
|
||||||
typedef other_allocator<std::pair<const int, std::string> > Alloc;
|
typedef other_allocator<std::pair<const int, std::string> > Alloc;
|
||||||
typedef std::unordered_multimap<int, std::string, Hash, Compare, Alloc> C;
|
typedef std::unordered_multimap<int, std::string, Hash, Compare, Alloc> C;
|
||||||
typedef std::pair<int, std::string> P;
|
|
||||||
C c1(0, Hash(1), Compare(1), Alloc(1));
|
C c1(0, Hash(1), Compare(1), Alloc(1));
|
||||||
C c2(0, Hash(2), Compare(2), Alloc(2));
|
C c2(0, Hash(2), Compare(2), Alloc(2));
|
||||||
c2.max_load_factor(2);
|
c2.max_load_factor(2);
|
||||||
|
@ -404,7 +402,6 @@ int main()
|
||||||
typedef test_compare<std::equal_to<int> > Compare;
|
typedef test_compare<std::equal_to<int> > Compare;
|
||||||
typedef min_allocator<std::pair<const int, std::string> > Alloc;
|
typedef min_allocator<std::pair<const int, std::string> > Alloc;
|
||||||
typedef std::unordered_multimap<int, std::string, Hash, Compare, Alloc> C;
|
typedef std::unordered_multimap<int, std::string, Hash, Compare, Alloc> C;
|
||||||
typedef std::pair<int, std::string> P;
|
|
||||||
C c1(0, Hash(1), Compare(1), Alloc());
|
C c1(0, Hash(1), Compare(1), Alloc());
|
||||||
C c2(0, Hash(2), Compare(2), Alloc());
|
C c2(0, Hash(2), Compare(2), Alloc());
|
||||||
c2.max_load_factor(2);
|
c2.max_load_factor(2);
|
||||||
|
|
|
@ -33,7 +33,6 @@ int main()
|
||||||
typedef test_compare<std::equal_to<int> > Compare;
|
typedef test_compare<std::equal_to<int> > Compare;
|
||||||
typedef test_allocator<std::pair<const int, std::string> > Alloc;
|
typedef test_allocator<std::pair<const int, std::string> > Alloc;
|
||||||
typedef std::unordered_multimap<int, std::string, Hash, Compare, Alloc> C;
|
typedef std::unordered_multimap<int, std::string, Hash, Compare, Alloc> C;
|
||||||
typedef std::pair<int, std::string> P;
|
|
||||||
C c1(0, Hash(1), Compare(1), Alloc(1, 1));
|
C c1(0, Hash(1), Compare(1), Alloc(1, 1));
|
||||||
C c2(0, Hash(2), Compare(2), Alloc(1, 2));
|
C c2(0, Hash(2), Compare(2), Alloc(1, 2));
|
||||||
c2.max_load_factor(2);
|
c2.max_load_factor(2);
|
||||||
|
@ -218,7 +217,6 @@ int main()
|
||||||
typedef test_compare<std::equal_to<int> > Compare;
|
typedef test_compare<std::equal_to<int> > Compare;
|
||||||
typedef other_allocator<std::pair<const int, std::string> > Alloc;
|
typedef other_allocator<std::pair<const int, std::string> > Alloc;
|
||||||
typedef std::unordered_multimap<int, std::string, Hash, Compare, Alloc> C;
|
typedef std::unordered_multimap<int, std::string, Hash, Compare, Alloc> C;
|
||||||
typedef std::pair<int, std::string> P;
|
|
||||||
C c1(0, Hash(1), Compare(1), Alloc(1));
|
C c1(0, Hash(1), Compare(1), Alloc(1));
|
||||||
C c2(0, Hash(2), Compare(2), Alloc(2));
|
C c2(0, Hash(2), Compare(2), Alloc(2));
|
||||||
c2.max_load_factor(2);
|
c2.max_load_factor(2);
|
||||||
|
@ -403,7 +401,6 @@ int main()
|
||||||
typedef test_compare<std::equal_to<int> > Compare;
|
typedef test_compare<std::equal_to<int> > Compare;
|
||||||
typedef min_allocator<std::pair<const int, std::string> > Alloc;
|
typedef min_allocator<std::pair<const int, std::string> > Alloc;
|
||||||
typedef std::unordered_multimap<int, std::string, Hash, Compare, Alloc> C;
|
typedef std::unordered_multimap<int, std::string, Hash, Compare, Alloc> C;
|
||||||
typedef std::pair<int, std::string> P;
|
|
||||||
C c1(0, Hash(1), Compare(1), Alloc());
|
C c1(0, Hash(1), Compare(1), Alloc());
|
||||||
C c2(0, Hash(2), Compare(2), Alloc());
|
C c2(0, Hash(2), Compare(2), Alloc());
|
||||||
c2.max_load_factor(2);
|
c2.max_load_factor(2);
|
||||||
|
|
|
@ -25,14 +25,11 @@ int main()
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
typedef std::unordered_multiset<int> C;
|
typedef std::unordered_multiset<int> C;
|
||||||
typedef C::const_iterator I;
|
|
||||||
typedef int P;
|
|
||||||
const C c;
|
const C c;
|
||||||
LIBCPP_ASSERT(c.bucket_count() == 0);
|
LIBCPP_ASSERT(c.bucket_count() == 0);
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
typedef std::unordered_multiset<int> C;
|
typedef std::unordered_multiset<int> C;
|
||||||
typedef C::const_iterator I;
|
|
||||||
typedef int P;
|
typedef int P;
|
||||||
P a[] =
|
P a[] =
|
||||||
{
|
{
|
||||||
|
@ -52,15 +49,12 @@ int main()
|
||||||
{
|
{
|
||||||
typedef std::unordered_multiset<int, std::hash<int>,
|
typedef std::unordered_multiset<int, std::hash<int>,
|
||||||
std::equal_to<int>, min_allocator<int>> C;
|
std::equal_to<int>, min_allocator<int>> C;
|
||||||
typedef C::const_iterator I;
|
|
||||||
typedef int P;
|
|
||||||
const C c;
|
const C c;
|
||||||
LIBCPP_ASSERT(c.bucket_count() == 0);
|
LIBCPP_ASSERT(c.bucket_count() == 0);
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
typedef std::unordered_multiset<int, std::hash<int>,
|
typedef std::unordered_multiset<int, std::hash<int>,
|
||||||
std::equal_to<int>, min_allocator<int>> C;
|
std::equal_to<int>, min_allocator<int>> C;
|
||||||
typedef C::const_iterator I;
|
|
||||||
typedef int P;
|
typedef int P;
|
||||||
P a[] =
|
P a[] =
|
||||||
{
|
{
|
||||||
|
|
|
@ -43,7 +43,6 @@ int main()
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
typedef std::unordered_multiset<int> C;
|
typedef std::unordered_multiset<int> C;
|
||||||
typedef int P;
|
|
||||||
const C c;
|
const C c;
|
||||||
assert(c.load_factor() == 0);
|
assert(c.load_factor() == 0);
|
||||||
}
|
}
|
||||||
|
@ -69,7 +68,6 @@ int main()
|
||||||
{
|
{
|
||||||
typedef std::unordered_multiset<int, std::hash<int>,
|
typedef std::unordered_multiset<int, std::hash<int>,
|
||||||
std::equal_to<int>, min_allocator<int>> C;
|
std::equal_to<int>, min_allocator<int>> C;
|
||||||
typedef int P;
|
|
||||||
const C c;
|
const C c;
|
||||||
assert(c.load_factor() == 0);
|
assert(c.load_factor() == 0);
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,13 +29,11 @@ int main()
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
typedef std::unordered_multiset<int> C;
|
typedef std::unordered_multiset<int> C;
|
||||||
typedef int P;
|
|
||||||
const C c;
|
const C c;
|
||||||
assert(c.max_load_factor() == 1);
|
assert(c.max_load_factor() == 1);
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
typedef std::unordered_multiset<int> C;
|
typedef std::unordered_multiset<int> C;
|
||||||
typedef int P;
|
|
||||||
C c;
|
C c;
|
||||||
assert(c.max_load_factor() == 1);
|
assert(c.max_load_factor() == 1);
|
||||||
c.max_load_factor(2.5);
|
c.max_load_factor(2.5);
|
||||||
|
@ -45,14 +43,12 @@ int main()
|
||||||
{
|
{
|
||||||
typedef std::unordered_multiset<int, std::hash<int>,
|
typedef std::unordered_multiset<int, std::hash<int>,
|
||||||
std::equal_to<int>, min_allocator<int>> C;
|
std::equal_to<int>, min_allocator<int>> C;
|
||||||
typedef int P;
|
|
||||||
const C c;
|
const C c;
|
||||||
assert(c.max_load_factor() == 1);
|
assert(c.max_load_factor() == 1);
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
typedef std::unordered_multiset<int, std::hash<int>,
|
typedef std::unordered_multiset<int, std::hash<int>,
|
||||||
std::equal_to<int>, min_allocator<int>> C;
|
std::equal_to<int>, min_allocator<int>> C;
|
||||||
typedef int P;
|
|
||||||
C c;
|
C c;
|
||||||
assert(c.max_load_factor() == 1);
|
assert(c.max_load_factor() == 1);
|
||||||
c.max_load_factor(2.5);
|
c.max_load_factor(2.5);
|
||||||
|
|
|
@ -32,7 +32,6 @@ int main()
|
||||||
typedef test_compare<std::equal_to<int> > Compare;
|
typedef test_compare<std::equal_to<int> > Compare;
|
||||||
typedef test_allocator<int> Alloc;
|
typedef test_allocator<int> Alloc;
|
||||||
typedef std::unordered_multiset<int, Hash, Compare, Alloc> C;
|
typedef std::unordered_multiset<int, Hash, Compare, Alloc> C;
|
||||||
typedef int P;
|
|
||||||
C c1(0, Hash(1), Compare(1), Alloc(1, 1));
|
C c1(0, Hash(1), Compare(1), Alloc(1, 1));
|
||||||
C c2(0, Hash(2), Compare(2), Alloc(1, 2));
|
C c2(0, Hash(2), Compare(2), Alloc(1, 2));
|
||||||
c2.max_load_factor(2);
|
c2.max_load_factor(2);
|
||||||
|
@ -213,7 +212,6 @@ int main()
|
||||||
typedef test_compare<std::equal_to<int> > Compare;
|
typedef test_compare<std::equal_to<int> > Compare;
|
||||||
typedef other_allocator<int> Alloc;
|
typedef other_allocator<int> Alloc;
|
||||||
typedef std::unordered_multiset<int, Hash, Compare, Alloc> C;
|
typedef std::unordered_multiset<int, Hash, Compare, Alloc> C;
|
||||||
typedef int P;
|
|
||||||
C c1(0, Hash(1), Compare(1), Alloc(1));
|
C c1(0, Hash(1), Compare(1), Alloc(1));
|
||||||
C c2(0, Hash(2), Compare(2), Alloc(2));
|
C c2(0, Hash(2), Compare(2), Alloc(2));
|
||||||
c2.max_load_factor(2);
|
c2.max_load_factor(2);
|
||||||
|
@ -394,7 +392,6 @@ int main()
|
||||||
typedef test_compare<std::equal_to<int> > Compare;
|
typedef test_compare<std::equal_to<int> > Compare;
|
||||||
typedef min_allocator<int> Alloc;
|
typedef min_allocator<int> Alloc;
|
||||||
typedef std::unordered_multiset<int, Hash, Compare, Alloc> C;
|
typedef std::unordered_multiset<int, Hash, Compare, Alloc> C;
|
||||||
typedef int P;
|
|
||||||
C c1(0, Hash(1), Compare(1), Alloc());
|
C c1(0, Hash(1), Compare(1), Alloc());
|
||||||
C c2(0, Hash(2), Compare(2), Alloc());
|
C c2(0, Hash(2), Compare(2), Alloc());
|
||||||
c2.max_load_factor(2);
|
c2.max_load_factor(2);
|
||||||
|
|
|
@ -32,7 +32,6 @@ int main()
|
||||||
typedef test_compare<std::equal_to<int> > Compare;
|
typedef test_compare<std::equal_to<int> > Compare;
|
||||||
typedef test_allocator<int> Alloc;
|
typedef test_allocator<int> Alloc;
|
||||||
typedef std::unordered_multiset<int, Hash, Compare, Alloc> C;
|
typedef std::unordered_multiset<int, Hash, Compare, Alloc> C;
|
||||||
typedef int P;
|
|
||||||
C c1(0, Hash(1), Compare(1), Alloc(1, 1));
|
C c1(0, Hash(1), Compare(1), Alloc(1, 1));
|
||||||
C c2(0, Hash(2), Compare(2), Alloc(1, 2));
|
C c2(0, Hash(2), Compare(2), Alloc(1, 2));
|
||||||
c2.max_load_factor(2);
|
c2.max_load_factor(2);
|
||||||
|
@ -213,7 +212,6 @@ int main()
|
||||||
typedef test_compare<std::equal_to<int> > Compare;
|
typedef test_compare<std::equal_to<int> > Compare;
|
||||||
typedef other_allocator<int> Alloc;
|
typedef other_allocator<int> Alloc;
|
||||||
typedef std::unordered_multiset<int, Hash, Compare, Alloc> C;
|
typedef std::unordered_multiset<int, Hash, Compare, Alloc> C;
|
||||||
typedef int P;
|
|
||||||
C c1(0, Hash(1), Compare(1), Alloc(1));
|
C c1(0, Hash(1), Compare(1), Alloc(1));
|
||||||
C c2(0, Hash(2), Compare(2), Alloc(2));
|
C c2(0, Hash(2), Compare(2), Alloc(2));
|
||||||
c2.max_load_factor(2);
|
c2.max_load_factor(2);
|
||||||
|
@ -394,7 +392,6 @@ int main()
|
||||||
typedef test_compare<std::equal_to<int> > Compare;
|
typedef test_compare<std::equal_to<int> > Compare;
|
||||||
typedef min_allocator<int> Alloc;
|
typedef min_allocator<int> Alloc;
|
||||||
typedef std::unordered_multiset<int, Hash, Compare, Alloc> C;
|
typedef std::unordered_multiset<int, Hash, Compare, Alloc> C;
|
||||||
typedef int P;
|
|
||||||
C c1(0, Hash(1), Compare(1), Alloc());
|
C c1(0, Hash(1), Compare(1), Alloc());
|
||||||
C c2(0, Hash(2), Compare(2), Alloc());
|
C c2(0, Hash(2), Compare(2), Alloc());
|
||||||
c2.max_load_factor(2);
|
c2.max_load_factor(2);
|
||||||
|
|
|
@ -25,14 +25,11 @@ int main()
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
typedef std::unordered_set<int> C;
|
typedef std::unordered_set<int> C;
|
||||||
typedef C::const_iterator I;
|
|
||||||
typedef int P;
|
|
||||||
const C c;
|
const C c;
|
||||||
LIBCPP_ASSERT(c.bucket_count() == 0);
|
LIBCPP_ASSERT(c.bucket_count() == 0);
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
typedef std::unordered_set<int> C;
|
typedef std::unordered_set<int> C;
|
||||||
typedef C::const_iterator I;
|
|
||||||
typedef int P;
|
typedef int P;
|
||||||
P a[] =
|
P a[] =
|
||||||
{
|
{
|
||||||
|
@ -51,14 +48,11 @@ int main()
|
||||||
#if TEST_STD_VER >= 11
|
#if TEST_STD_VER >= 11
|
||||||
{
|
{
|
||||||
typedef std::unordered_set<int, std::hash<int>, std::equal_to<int>, min_allocator<int>> C;
|
typedef std::unordered_set<int, std::hash<int>, std::equal_to<int>, min_allocator<int>> C;
|
||||||
typedef C::const_iterator I;
|
|
||||||
typedef int P;
|
|
||||||
const C c;
|
const C c;
|
||||||
LIBCPP_ASSERT(c.bucket_count() == 0);
|
LIBCPP_ASSERT(c.bucket_count() == 0);
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
typedef std::unordered_set<int, std::hash<int>, std::equal_to<int>, min_allocator<int>> C;
|
typedef std::unordered_set<int, std::hash<int>, std::equal_to<int>, min_allocator<int>> C;
|
||||||
typedef C::const_iterator I;
|
|
||||||
typedef int P;
|
typedef int P;
|
||||||
P a[] =
|
P a[] =
|
||||||
{
|
{
|
||||||
|
|
|
@ -43,7 +43,6 @@ int main()
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
typedef std::unordered_set<int> C;
|
typedef std::unordered_set<int> C;
|
||||||
typedef int P;
|
|
||||||
const C c;
|
const C c;
|
||||||
assert(c.load_factor() == 0);
|
assert(c.load_factor() == 0);
|
||||||
}
|
}
|
||||||
|
@ -69,7 +68,6 @@ int main()
|
||||||
{
|
{
|
||||||
typedef std::unordered_set<int, std::hash<int>,
|
typedef std::unordered_set<int, std::hash<int>,
|
||||||
std::equal_to<int>, min_allocator<int>> C;
|
std::equal_to<int>, min_allocator<int>> C;
|
||||||
typedef int P;
|
|
||||||
const C c;
|
const C c;
|
||||||
assert(c.load_factor() == 0);
|
assert(c.load_factor() == 0);
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,13 +29,11 @@ int main()
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
typedef std::unordered_set<int> C;
|
typedef std::unordered_set<int> C;
|
||||||
typedef int P;
|
|
||||||
const C c;
|
const C c;
|
||||||
assert(c.max_load_factor() == 1);
|
assert(c.max_load_factor() == 1);
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
typedef std::unordered_set<int> C;
|
typedef std::unordered_set<int> C;
|
||||||
typedef int P;
|
|
||||||
C c;
|
C c;
|
||||||
assert(c.max_load_factor() == 1);
|
assert(c.max_load_factor() == 1);
|
||||||
c.max_load_factor(2.5);
|
c.max_load_factor(2.5);
|
||||||
|
@ -45,14 +43,12 @@ int main()
|
||||||
{
|
{
|
||||||
typedef std::unordered_set<int, std::hash<int>,
|
typedef std::unordered_set<int, std::hash<int>,
|
||||||
std::equal_to<int>, min_allocator<int>> C;
|
std::equal_to<int>, min_allocator<int>> C;
|
||||||
typedef int P;
|
|
||||||
const C c;
|
const C c;
|
||||||
assert(c.max_load_factor() == 1);
|
assert(c.max_load_factor() == 1);
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
typedef std::unordered_set<int, std::hash<int>,
|
typedef std::unordered_set<int, std::hash<int>,
|
||||||
std::equal_to<int>, min_allocator<int>> C;
|
std::equal_to<int>, min_allocator<int>> C;
|
||||||
typedef int P;
|
|
||||||
C c;
|
C c;
|
||||||
assert(c.max_load_factor() == 1);
|
assert(c.max_load_factor() == 1);
|
||||||
c.max_load_factor(2.5);
|
c.max_load_factor(2.5);
|
||||||
|
|
|
@ -32,7 +32,6 @@ int main()
|
||||||
typedef test_compare<std::equal_to<int> > Compare;
|
typedef test_compare<std::equal_to<int> > Compare;
|
||||||
typedef test_allocator<int> Alloc;
|
typedef test_allocator<int> Alloc;
|
||||||
typedef std::unordered_set<int, Hash, Compare, Alloc> C;
|
typedef std::unordered_set<int, Hash, Compare, Alloc> C;
|
||||||
typedef int P;
|
|
||||||
C c1(0, Hash(1), Compare(1), Alloc(1, 1));
|
C c1(0, Hash(1), Compare(1), Alloc(1, 1));
|
||||||
C c2(0, Hash(2), Compare(2), Alloc(1, 2));
|
C c2(0, Hash(2), Compare(2), Alloc(1, 2));
|
||||||
c2.max_load_factor(2);
|
c2.max_load_factor(2);
|
||||||
|
@ -213,7 +212,6 @@ int main()
|
||||||
typedef test_compare<std::equal_to<int> > Compare;
|
typedef test_compare<std::equal_to<int> > Compare;
|
||||||
typedef other_allocator<int> Alloc;
|
typedef other_allocator<int> Alloc;
|
||||||
typedef std::unordered_set<int, Hash, Compare, Alloc> C;
|
typedef std::unordered_set<int, Hash, Compare, Alloc> C;
|
||||||
typedef int P;
|
|
||||||
C c1(0, Hash(1), Compare(1), Alloc(1));
|
C c1(0, Hash(1), Compare(1), Alloc(1));
|
||||||
C c2(0, Hash(2), Compare(2), Alloc(2));
|
C c2(0, Hash(2), Compare(2), Alloc(2));
|
||||||
c2.max_load_factor(2);
|
c2.max_load_factor(2);
|
||||||
|
@ -394,7 +392,6 @@ int main()
|
||||||
typedef test_compare<std::equal_to<int> > Compare;
|
typedef test_compare<std::equal_to<int> > Compare;
|
||||||
typedef min_allocator<int> Alloc;
|
typedef min_allocator<int> Alloc;
|
||||||
typedef std::unordered_set<int, Hash, Compare, Alloc> C;
|
typedef std::unordered_set<int, Hash, Compare, Alloc> C;
|
||||||
typedef int P;
|
|
||||||
C c1(0, Hash(1), Compare(1), Alloc());
|
C c1(0, Hash(1), Compare(1), Alloc());
|
||||||
C c2(0, Hash(2), Compare(2), Alloc());
|
C c2(0, Hash(2), Compare(2), Alloc());
|
||||||
c2.max_load_factor(2);
|
c2.max_load_factor(2);
|
||||||
|
|
|
@ -32,7 +32,6 @@ int main()
|
||||||
typedef test_compare<std::equal_to<int> > Compare;
|
typedef test_compare<std::equal_to<int> > Compare;
|
||||||
typedef test_allocator<int> Alloc;
|
typedef test_allocator<int> Alloc;
|
||||||
typedef std::unordered_set<int, Hash, Compare, Alloc> C;
|
typedef std::unordered_set<int, Hash, Compare, Alloc> C;
|
||||||
typedef int P;
|
|
||||||
C c1(0, Hash(1), Compare(1), Alloc(1, 1));
|
C c1(0, Hash(1), Compare(1), Alloc(1, 1));
|
||||||
C c2(0, Hash(2), Compare(2), Alloc(1, 2));
|
C c2(0, Hash(2), Compare(2), Alloc(1, 2));
|
||||||
c2.max_load_factor(2);
|
c2.max_load_factor(2);
|
||||||
|
@ -213,7 +212,6 @@ int main()
|
||||||
typedef test_compare<std::equal_to<int> > Compare;
|
typedef test_compare<std::equal_to<int> > Compare;
|
||||||
typedef other_allocator<int> Alloc;
|
typedef other_allocator<int> Alloc;
|
||||||
typedef std::unordered_set<int, Hash, Compare, Alloc> C;
|
typedef std::unordered_set<int, Hash, Compare, Alloc> C;
|
||||||
typedef int P;
|
|
||||||
C c1(0, Hash(1), Compare(1), Alloc(1));
|
C c1(0, Hash(1), Compare(1), Alloc(1));
|
||||||
C c2(0, Hash(2), Compare(2), Alloc(2));
|
C c2(0, Hash(2), Compare(2), Alloc(2));
|
||||||
c2.max_load_factor(2);
|
c2.max_load_factor(2);
|
||||||
|
@ -394,7 +392,6 @@ int main()
|
||||||
typedef test_compare<std::equal_to<int> > Compare;
|
typedef test_compare<std::equal_to<int> > Compare;
|
||||||
typedef min_allocator<int> Alloc;
|
typedef min_allocator<int> Alloc;
|
||||||
typedef std::unordered_set<int, Hash, Compare, Alloc> C;
|
typedef std::unordered_set<int, Hash, Compare, Alloc> C;
|
||||||
typedef int P;
|
|
||||||
C c1(0, Hash(1), Compare(1), Alloc());
|
C c1(0, Hash(1), Compare(1), Alloc());
|
||||||
C c2(0, Hash(2), Compare(2), Alloc());
|
C c2(0, Hash(2), Compare(2), Alloc());
|
||||||
c2.max_load_factor(2);
|
c2.max_load_factor(2);
|
||||||
|
|
|
@ -34,7 +34,6 @@ test()
|
||||||
|
|
||||||
void test_edges()
|
void test_edges()
|
||||||
{
|
{
|
||||||
typedef std::complex<double> C;
|
|
||||||
const unsigned N = sizeof(testcases) / sizeof(testcases[0]);
|
const unsigned N = sizeof(testcases) / sizeof(testcases[0]);
|
||||||
for (unsigned i = 0; i < N; ++i)
|
for (unsigned i = 0; i < N; ++i)
|
||||||
{
|
{
|
||||||
|
|
|
@ -35,7 +35,6 @@ test()
|
||||||
|
|
||||||
void test_edges()
|
void test_edges()
|
||||||
{
|
{
|
||||||
typedef std::complex<double> C;
|
|
||||||
const unsigned N = sizeof(testcases) / sizeof(testcases[0]);
|
const unsigned N = sizeof(testcases) / sizeof(testcases[0]);
|
||||||
for (unsigned i = 0; i < N; ++i)
|
for (unsigned i = 0; i < N; ++i)
|
||||||
{
|
{
|
||||||
|
|
|
@ -31,7 +31,6 @@ int main()
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
typedef std::cauchy_distribution<> D;
|
typedef std::cauchy_distribution<> D;
|
||||||
typedef D::param_type P;
|
|
||||||
typedef std::mt19937 G;
|
typedef std::mt19937 G;
|
||||||
G g;
|
G g;
|
||||||
const double a = 10;
|
const double a = 10;
|
||||||
|
@ -47,7 +46,6 @@ int main()
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
typedef std::cauchy_distribution<> D;
|
typedef std::cauchy_distribution<> D;
|
||||||
typedef D::param_type P;
|
|
||||||
typedef std::mt19937 G;
|
typedef std::mt19937 G;
|
||||||
G g;
|
G g;
|
||||||
const double a = -1.5;
|
const double a = -1.5;
|
||||||
|
@ -63,7 +61,6 @@ int main()
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
typedef std::cauchy_distribution<> D;
|
typedef std::cauchy_distribution<> D;
|
||||||
typedef D::param_type P;
|
|
||||||
typedef std::mt19937 G;
|
typedef std::mt19937 G;
|
||||||
G g;
|
G g;
|
||||||
const double a = .5;
|
const double a = .5;
|
||||||
|
|
|
@ -34,7 +34,6 @@ int main()
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
typedef std::chi_squared_distribution<> D;
|
typedef std::chi_squared_distribution<> D;
|
||||||
typedef D::param_type P;
|
|
||||||
typedef std::minstd_rand G;
|
typedef std::minstd_rand G;
|
||||||
G g;
|
G g;
|
||||||
D d(0.5);
|
D d(0.5);
|
||||||
|
@ -74,7 +73,6 @@ int main()
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
typedef std::chi_squared_distribution<> D;
|
typedef std::chi_squared_distribution<> D;
|
||||||
typedef D::param_type P;
|
|
||||||
typedef std::minstd_rand G;
|
typedef std::minstd_rand G;
|
||||||
G g;
|
G g;
|
||||||
D d(1);
|
D d(1);
|
||||||
|
@ -114,7 +112,6 @@ int main()
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
typedef std::chi_squared_distribution<> D;
|
typedef std::chi_squared_distribution<> D;
|
||||||
typedef D::param_type P;
|
|
||||||
typedef std::mt19937 G;
|
typedef std::mt19937 G;
|
||||||
G g;
|
G g;
|
||||||
D d(2);
|
D d(2);
|
||||||
|
|
|
@ -51,7 +51,6 @@ int main()
|
||||||
// Purposefully only testing even integral values of m and n (for now)
|
// Purposefully only testing even integral values of m and n (for now)
|
||||||
{
|
{
|
||||||
typedef std::fisher_f_distribution<> D;
|
typedef std::fisher_f_distribution<> D;
|
||||||
typedef D::param_type P;
|
|
||||||
typedef std::mt19937 G;
|
typedef std::mt19937 G;
|
||||||
G g;
|
G g;
|
||||||
D d(2, 4);
|
D d(2, 4);
|
||||||
|
@ -69,7 +68,6 @@ int main()
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
typedef std::fisher_f_distribution<> D;
|
typedef std::fisher_f_distribution<> D;
|
||||||
typedef D::param_type P;
|
|
||||||
typedef std::mt19937 G;
|
typedef std::mt19937 G;
|
||||||
G g;
|
G g;
|
||||||
D d(4, 2);
|
D d(4, 2);
|
||||||
|
@ -87,7 +85,6 @@ int main()
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
typedef std::fisher_f_distribution<> D;
|
typedef std::fisher_f_distribution<> D;
|
||||||
typedef D::param_type P;
|
|
||||||
typedef std::mt19937 G;
|
typedef std::mt19937 G;
|
||||||
G g;
|
G g;
|
||||||
D d(18, 20);
|
D d(18, 20);
|
||||||
|
|
|
@ -34,7 +34,6 @@ int main()
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
typedef std::normal_distribution<> D;
|
typedef std::normal_distribution<> D;
|
||||||
typedef D::param_type P;
|
|
||||||
typedef std::minstd_rand G;
|
typedef std::minstd_rand G;
|
||||||
G g;
|
G g;
|
||||||
D d(5, 4);
|
D d(5, 4);
|
||||||
|
|
|
@ -34,7 +34,6 @@ int main()
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
typedef std::exponential_distribution<> D;
|
typedef std::exponential_distribution<> D;
|
||||||
typedef D::param_type P;
|
|
||||||
typedef std::mt19937 G;
|
typedef std::mt19937 G;
|
||||||
G g;
|
G g;
|
||||||
D d(.75);
|
D d(.75);
|
||||||
|
@ -74,7 +73,6 @@ int main()
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
typedef std::exponential_distribution<> D;
|
typedef std::exponential_distribution<> D;
|
||||||
typedef D::param_type P;
|
|
||||||
typedef std::mt19937 G;
|
typedef std::mt19937 G;
|
||||||
G g;
|
G g;
|
||||||
D d(1);
|
D d(1);
|
||||||
|
@ -114,7 +112,6 @@ int main()
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
typedef std::exponential_distribution<> D;
|
typedef std::exponential_distribution<> D;
|
||||||
typedef D::param_type P;
|
|
||||||
typedef std::mt19937 G;
|
typedef std::mt19937 G;
|
||||||
G g;
|
G g;
|
||||||
D d(10);
|
D d(10);
|
||||||
|
|
|
@ -34,7 +34,6 @@ int main()
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
typedef std::weibull_distribution<> D;
|
typedef std::weibull_distribution<> D;
|
||||||
typedef D::param_type P;
|
|
||||||
typedef std::mt19937 G;
|
typedef std::mt19937 G;
|
||||||
G g;
|
G g;
|
||||||
D d(0.5, 2);
|
D d(0.5, 2);
|
||||||
|
@ -78,7 +77,6 @@ int main()
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
typedef std::weibull_distribution<> D;
|
typedef std::weibull_distribution<> D;
|
||||||
typedef D::param_type P;
|
|
||||||
typedef std::mt19937 G;
|
typedef std::mt19937 G;
|
||||||
G g;
|
G g;
|
||||||
D d(1, .5);
|
D d(1, .5);
|
||||||
|
@ -122,7 +120,6 @@ int main()
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
typedef std::weibull_distribution<> D;
|
typedef std::weibull_distribution<> D;
|
||||||
typedef D::param_type P;
|
|
||||||
typedef std::mt19937 G;
|
typedef std::mt19937 G;
|
||||||
G g;
|
G g;
|
||||||
D d(2, 3);
|
D d(2, 3);
|
||||||
|
|
|
@ -29,7 +29,6 @@ test(It first, It last)
|
||||||
{
|
{
|
||||||
typedef typename std::iterator_traits<It>::value_type charT;
|
typedef typename std::iterator_traits<It>::value_type charT;
|
||||||
typedef std::basic_string<charT, std::char_traits<charT>, test_allocator<charT> > S;
|
typedef std::basic_string<charT, std::char_traits<charT>, test_allocator<charT> > S;
|
||||||
typedef typename S::traits_type T;
|
|
||||||
typedef typename S::allocator_type A;
|
typedef typename S::allocator_type A;
|
||||||
S s2(first, last);
|
S s2(first, last);
|
||||||
LIBCPP_ASSERT(s2.__invariants());
|
LIBCPP_ASSERT(s2.__invariants());
|
||||||
|
@ -47,7 +46,6 @@ test(It first, It last, const A& a)
|
||||||
{
|
{
|
||||||
typedef typename std::iterator_traits<It>::value_type charT;
|
typedef typename std::iterator_traits<It>::value_type charT;
|
||||||
typedef std::basic_string<charT, std::char_traits<charT>, A> S;
|
typedef std::basic_string<charT, std::char_traits<charT>, A> S;
|
||||||
typedef typename S::traits_type T;
|
|
||||||
S s2(first, last, a);
|
S s2(first, last, a);
|
||||||
LIBCPP_ASSERT(s2.__invariants());
|
LIBCPP_ASSERT(s2.__invariants());
|
||||||
assert(s2.size() == static_cast<std::size_t>(std::distance(first, last)));
|
assert(s2.size() == static_cast<std::size_t>(std::distance(first, last)));
|
||||||
|
|
|
@ -56,7 +56,6 @@ int main()
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
typedef test_allocator<char> A;
|
typedef test_allocator<char> A;
|
||||||
typedef std::basic_string<char, std::char_traits<char>, A> S;
|
|
||||||
|
|
||||||
test("");
|
test("");
|
||||||
test("", A(2));
|
test("", A(2));
|
||||||
|
@ -73,7 +72,6 @@ int main()
|
||||||
#if TEST_STD_VER >= 11
|
#if TEST_STD_VER >= 11
|
||||||
{
|
{
|
||||||
typedef min_allocator<char> A;
|
typedef min_allocator<char> A;
|
||||||
typedef std::basic_string<char, std::char_traits<char>, A> S;
|
|
||||||
|
|
||||||
test("");
|
test("");
|
||||||
test("", A());
|
test("", A());
|
||||||
|
|
|
@ -53,7 +53,6 @@ int main()
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
typedef test_allocator<char> A;
|
typedef test_allocator<char> A;
|
||||||
typedef std::basic_string<char, std::char_traits<char>, A> S;
|
|
||||||
|
|
||||||
test("", 0);
|
test("", 0);
|
||||||
test("", 0, A(2));
|
test("", 0, A(2));
|
||||||
|
@ -70,7 +69,6 @@ int main()
|
||||||
#if TEST_STD_VER >= 11
|
#if TEST_STD_VER >= 11
|
||||||
{
|
{
|
||||||
typedef min_allocator<char> A;
|
typedef min_allocator<char> A;
|
||||||
typedef std::basic_string<char, std::char_traits<char>, A> S;
|
|
||||||
|
|
||||||
test("", 0);
|
test("", 0);
|
||||||
test("", 0, A());
|
test("", 0, A());
|
||||||
|
|
|
@ -26,7 +26,6 @@ void
|
||||||
test(unsigned n, charT c)
|
test(unsigned n, charT c)
|
||||||
{
|
{
|
||||||
typedef std::basic_string<charT, std::char_traits<charT>, test_allocator<charT> > S;
|
typedef std::basic_string<charT, std::char_traits<charT>, test_allocator<charT> > S;
|
||||||
typedef typename S::traits_type T;
|
|
||||||
typedef typename S::allocator_type A;
|
typedef typename S::allocator_type A;
|
||||||
S s2(n, c);
|
S s2(n, c);
|
||||||
LIBCPP_ASSERT(s2.__invariants());
|
LIBCPP_ASSERT(s2.__invariants());
|
||||||
|
@ -42,7 +41,6 @@ void
|
||||||
test(unsigned n, charT c, const A& a)
|
test(unsigned n, charT c, const A& a)
|
||||||
{
|
{
|
||||||
typedef std::basic_string<charT, std::char_traits<charT>, A> S;
|
typedef std::basic_string<charT, std::char_traits<charT>, A> S;
|
||||||
typedef typename S::traits_type T;
|
|
||||||
S s2(n, c, a);
|
S s2(n, c, a);
|
||||||
LIBCPP_ASSERT(s2.__invariants());
|
LIBCPP_ASSERT(s2.__invariants());
|
||||||
assert(s2.size() == n);
|
assert(s2.size() == n);
|
||||||
|
@ -58,7 +56,6 @@ test(Tp n, Tp c)
|
||||||
{
|
{
|
||||||
typedef char charT;
|
typedef char charT;
|
||||||
typedef std::basic_string<charT, std::char_traits<charT>, test_allocator<charT> > S;
|
typedef std::basic_string<charT, std::char_traits<charT>, test_allocator<charT> > S;
|
||||||
typedef typename S::traits_type T;
|
|
||||||
typedef typename S::allocator_type A;
|
typedef typename S::allocator_type A;
|
||||||
S s2(n, c);
|
S s2(n, c);
|
||||||
LIBCPP_ASSERT(s2.__invariants());
|
LIBCPP_ASSERT(s2.__invariants());
|
||||||
|
@ -75,7 +72,6 @@ test(Tp n, Tp c, const A& a)
|
||||||
{
|
{
|
||||||
typedef char charT;
|
typedef char charT;
|
||||||
typedef std::basic_string<charT, std::char_traits<charT>, A> S;
|
typedef std::basic_string<charT, std::char_traits<charT>, A> S;
|
||||||
typedef typename S::traits_type T;
|
|
||||||
S s2(n, c, a);
|
S s2(n, c, a);
|
||||||
LIBCPP_ASSERT(s2.__invariants());
|
LIBCPP_ASSERT(s2.__invariants());
|
||||||
assert(s2.size() == static_cast<std::size_t>(n));
|
assert(s2.size() == static_cast<std::size_t>(n));
|
||||||
|
@ -89,7 +85,6 @@ int main()
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
typedef test_allocator<char> A;
|
typedef test_allocator<char> A;
|
||||||
typedef std::basic_string<char, std::char_traits<char>, A> S;
|
|
||||||
|
|
||||||
test(0, 'a');
|
test(0, 'a');
|
||||||
test(0, 'a', A(2));
|
test(0, 'a', A(2));
|
||||||
|
@ -109,7 +104,6 @@ int main()
|
||||||
#if TEST_STD_VER >= 11
|
#if TEST_STD_VER >= 11
|
||||||
{
|
{
|
||||||
typedef min_allocator<char> A;
|
typedef min_allocator<char> A;
|
||||||
typedef std::basic_string<char, std::char_traits<char>, A> S;
|
|
||||||
|
|
||||||
test(0, 'a');
|
test(0, 'a');
|
||||||
test(0, 'a', A());
|
test(0, 'a', A());
|
||||||
|
|
|
@ -98,7 +98,6 @@ void
|
||||||
test(S str, unsigned pos, unsigned n, const typename S::allocator_type& a)
|
test(S str, unsigned pos, unsigned n, const typename S::allocator_type& a)
|
||||||
{
|
{
|
||||||
typedef typename S::traits_type T;
|
typedef typename S::traits_type T;
|
||||||
typedef typename S::allocator_type A;
|
|
||||||
|
|
||||||
if (pos <= str.size())
|
if (pos <= str.size())
|
||||||
{
|
{
|
||||||
|
|
|
@ -87,7 +87,6 @@ void test_no_inner_alloc()
|
||||||
|
|
||||||
void test_with_inner_alloc()
|
void test_with_inner_alloc()
|
||||||
{
|
{
|
||||||
using VoidAlloc1 = CountingAllocator<void, 1>;
|
|
||||||
using VoidAlloc2 = CountingAllocator<void, 2>;
|
using VoidAlloc2 = CountingAllocator<void, 2>;
|
||||||
|
|
||||||
AllocController POuter;
|
AllocController POuter;
|
||||||
|
|
|
@ -88,7 +88,6 @@ void test_no_inner_alloc()
|
||||||
|
|
||||||
void test_with_inner_alloc()
|
void test_with_inner_alloc()
|
||||||
{
|
{
|
||||||
using VoidAlloc1 = CountingAllocator<void, 1>;
|
|
||||||
using VoidAlloc2 = CountingAllocator<void, 2>;
|
using VoidAlloc2 = CountingAllocator<void, 2>;
|
||||||
|
|
||||||
AllocController POuter;
|
AllocController POuter;
|
||||||
|
|
|
@ -87,7 +87,6 @@ void test_no_inner_alloc()
|
||||||
|
|
||||||
void test_with_inner_alloc()
|
void test_with_inner_alloc()
|
||||||
{
|
{
|
||||||
using VoidAlloc1 = CountingAllocator<void, 1>;
|
|
||||||
using VoidAlloc2 = CountingAllocator<void, 2>;
|
using VoidAlloc2 = CountingAllocator<void, 2>;
|
||||||
|
|
||||||
AllocController POuter;
|
AllocController POuter;
|
||||||
|
|
|
@ -83,7 +83,6 @@ void test_no_inner_alloc()
|
||||||
|
|
||||||
void test_with_inner_alloc()
|
void test_with_inner_alloc()
|
||||||
{
|
{
|
||||||
using VoidAlloc1 = CountingAllocator<void, 1>;
|
|
||||||
using VoidAlloc2 = CountingAllocator<void, 2>;
|
using VoidAlloc2 = CountingAllocator<void, 2>;
|
||||||
|
|
||||||
AllocController POuter;
|
AllocController POuter;
|
||||||
|
|
|
@ -31,7 +31,6 @@
|
||||||
// OUTERMOST_ALLOC_TRAITS(*this)::construct(
|
// OUTERMOST_ALLOC_TRAITS(*this)::construct(
|
||||||
// OUTERMOST (*this), p, std::forward<Args>(args)...).
|
// OUTERMOST (*this), p, std::forward<Args>(args)...).
|
||||||
void test_bullet_one() {
|
void test_bullet_one() {
|
||||||
using VoidAlloc1 = CountingAllocator<void, 1>;
|
|
||||||
using VoidAlloc2 = CountingAllocator<void, 2>;
|
using VoidAlloc2 = CountingAllocator<void, 2>;
|
||||||
|
|
||||||
AllocController POuter;
|
AllocController POuter;
|
||||||
|
@ -41,7 +40,6 @@ void test_bullet_one() {
|
||||||
using Outer = CountingAllocator<T, 1>;
|
using Outer = CountingAllocator<T, 1>;
|
||||||
using Inner = CountingAllocator<T, 2>;
|
using Inner = CountingAllocator<T, 2>;
|
||||||
using SA = std::scoped_allocator_adaptor<Outer, Inner>;
|
using SA = std::scoped_allocator_adaptor<Outer, Inner>;
|
||||||
using SAInner = std::scoped_allocator_adaptor<Inner>;
|
|
||||||
static_assert(!std::uses_allocator<T, Outer>::value, "");
|
static_assert(!std::uses_allocator<T, Outer>::value, "");
|
||||||
static_assert(!std::uses_allocator<T, Inner>::value, "");
|
static_assert(!std::uses_allocator<T, Inner>::value, "");
|
||||||
T* ptr = (T*)::operator new(sizeof(T));
|
T* ptr = (T*)::operator new(sizeof(T));
|
||||||
|
@ -66,7 +64,6 @@ void test_bullet_one() {
|
||||||
// true, calls OUTERMOST_ALLOC_TRAITS(*this)::construct(OUTERMOST (*this), p,
|
// true, calls OUTERMOST_ALLOC_TRAITS(*this)::construct(OUTERMOST (*this), p,
|
||||||
// allocator_arg, inner_allocator(), std::forward<Args>(args)...).
|
// allocator_arg, inner_allocator(), std::forward<Args>(args)...).
|
||||||
void test_bullet_two() {
|
void test_bullet_two() {
|
||||||
using VoidAlloc1 = CountingAllocator<void, 1>;
|
|
||||||
using VoidAlloc2 = CountingAllocator<void, 2>;
|
using VoidAlloc2 = CountingAllocator<void, 2>;
|
||||||
|
|
||||||
AllocController POuter;
|
AllocController POuter;
|
||||||
|
@ -76,7 +73,6 @@ void test_bullet_two() {
|
||||||
using Outer = CountingAllocator<T, 1>;
|
using Outer = CountingAllocator<T, 1>;
|
||||||
using Inner = CountingAllocator<T, 2>;
|
using Inner = CountingAllocator<T, 2>;
|
||||||
using SA = std::scoped_allocator_adaptor<Outer, Inner>;
|
using SA = std::scoped_allocator_adaptor<Outer, Inner>;
|
||||||
using SAInner = std::scoped_allocator_adaptor<Inner>;
|
|
||||||
static_assert(!std::uses_allocator<T, Outer>::value, "");
|
static_assert(!std::uses_allocator<T, Outer>::value, "");
|
||||||
static_assert(std::uses_allocator<T, Inner>::value, "");
|
static_assert(std::uses_allocator<T, Inner>::value, "");
|
||||||
T* ptr = (T*)::operator new(sizeof(T));
|
T* ptr = (T*)::operator new(sizeof(T));
|
||||||
|
@ -101,7 +97,6 @@ void test_bullet_two() {
|
||||||
// OUTERMOST_ALLOC_TRAITS(*this)::construct(OUTERMOST (*this), p,
|
// OUTERMOST_ALLOC_TRAITS(*this)::construct(OUTERMOST (*this), p,
|
||||||
// std::forward<Args>(args)..., inner_allocator()).
|
// std::forward<Args>(args)..., inner_allocator()).
|
||||||
void test_bullet_three() {
|
void test_bullet_three() {
|
||||||
using VoidAlloc1 = CountingAllocator<void, 1>;
|
|
||||||
using VoidAlloc2 = CountingAllocator<void, 2>;
|
using VoidAlloc2 = CountingAllocator<void, 2>;
|
||||||
|
|
||||||
AllocController POuter;
|
AllocController POuter;
|
||||||
|
@ -111,7 +106,6 @@ void test_bullet_three() {
|
||||||
using Outer = CountingAllocator<T, 1>;
|
using Outer = CountingAllocator<T, 1>;
|
||||||
using Inner = CountingAllocator<T, 2>;
|
using Inner = CountingAllocator<T, 2>;
|
||||||
using SA = std::scoped_allocator_adaptor<Outer, Inner>;
|
using SA = std::scoped_allocator_adaptor<Outer, Inner>;
|
||||||
using SAInner = std::scoped_allocator_adaptor<Inner>;
|
|
||||||
static_assert(!std::uses_allocator<T, Outer>::value, "");
|
static_assert(!std::uses_allocator<T, Outer>::value, "");
|
||||||
static_assert(std::uses_allocator<T, Inner>::value, "");
|
static_assert(std::uses_allocator<T, Inner>::value, "");
|
||||||
T* ptr = (T*)::operator new(sizeof(T));
|
T* ptr = (T*)::operator new(sizeof(T));
|
||||||
|
|
|
@ -61,11 +61,9 @@ constexpr bool explicit_conversion(Input&& in, const Expect& v)
|
||||||
void test_implicit()
|
void test_implicit()
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
using T = long long;
|
|
||||||
static_assert(implicit_conversion<long long>(42, 42), "");
|
static_assert(implicit_conversion<long long>(42, 42), "");
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
using T = long double;
|
|
||||||
static_assert(implicit_conversion<long double>(3.14, 3.14), "");
|
static_assert(implicit_conversion<long double>(3.14, 3.14), "");
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
|
@ -97,18 +95,15 @@ void test_implicit()
|
||||||
void test_explicit() {
|
void test_explicit() {
|
||||||
{
|
{
|
||||||
using T = ExplicitTrivialTestTypes::TestType;
|
using T = ExplicitTrivialTestTypes::TestType;
|
||||||
using O = optional<T>;
|
|
||||||
static_assert(explicit_conversion<T>(42, 42), "");
|
static_assert(explicit_conversion<T>(42, 42), "");
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
using T = ExplicitConstexprTestTypes::TestType;
|
using T = ExplicitConstexprTestTypes::TestType;
|
||||||
using O = optional<T>;
|
|
||||||
static_assert(explicit_conversion<T>(42, 42), "");
|
static_assert(explicit_conversion<T>(42, 42), "");
|
||||||
static_assert(!std::is_convertible<int, T>::value, "");
|
static_assert(!std::is_convertible<int, T>::value, "");
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
using T = ExplicitTestTypes::TestType;
|
using T = ExplicitTestTypes::TestType;
|
||||||
using O = optional<T>;
|
|
||||||
T::reset();
|
T::reset();
|
||||||
{
|
{
|
||||||
assert(explicit_conversion<T>(42, 42));
|
assert(explicit_conversion<T>(42, 42));
|
||||||
|
|
Loading…
Reference in New Issue