Fix yet another missed -Wunused warning. Hopefully this is the last one
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@290476 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -28,6 +28,9 @@ void check_allocator(unsigned n, Allocator const &alloc = Allocator())
|
||||
C d(n, alloc);
|
||||
assert(d.get_allocator() == alloc);
|
||||
assert(static_cast<std::size_t>(std::distance(d.begin(), d.end())) == n);
|
||||
#else
|
||||
((void)n);
|
||||
((void)alloc);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -39,12 +42,14 @@ int main()
|
||||
unsigned N = 10;
|
||||
C c(N);
|
||||
unsigned n = 0;
|
||||
for (C::const_iterator i = c.begin(), e = c.end(); i != e; ++i, ++n)
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
for (C::const_iterator i = c.begin(), e = c.end(); i != e; ++i, ++n) {
|
||||
#if TEST_STD_VER >= 11
|
||||
assert(*i == T());
|
||||
#else
|
||||
;
|
||||
((void)0);
|
||||
#endif
|
||||
}
|
||||
assert(n == N);
|
||||
}
|
||||
#if TEST_STD_VER >= 11
|
||||
@@ -55,11 +60,7 @@ int main()
|
||||
C c(N);
|
||||
unsigned n = 0;
|
||||
for (C::const_iterator i = c.begin(), e = c.end(); i != e; ++i, ++n)
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
assert(*i == T());
|
||||
#else
|
||||
;
|
||||
#endif
|
||||
assert(n == N);
|
||||
check_allocator<T, min_allocator<T>> ( 0 );
|
||||
check_allocator<T, min_allocator<T>> ( 3 );
|
||||
|
||||
Reference in New Issue
Block a user