diff --git a/test/std/containers/sequences/forwardlist/forwardlist.cons/size.pass.cpp b/test/std/containers/sequences/forwardlist/forwardlist.cons/size.pass.cpp index db40707a2..b536ccf49 100644 --- a/test/std/containers/sequences/forwardlist/forwardlist.cons/size.pass.cpp +++ b/test/std/containers/sequences/forwardlist/forwardlist.cons/size.pass.cpp @@ -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::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> ( 0 ); check_allocator> ( 3 );