Fix tests that fail in C++2a mode
authorJonathan Wakely <jwakely@redhat.com>
Tue, 29 Jan 2019 00:47:32 +0000 (00:47 +0000)
committerJonathan Wakely <redi@gcc.gnu.org>
Tue, 29 Jan 2019 00:47:32 +0000 (00:47 +0000)
commit2104ca71da1120a7b2b35e3178624b04d30bdfde
tree38094898f4fce66deb06503640463d2a6c24854c
parent1f48525ded40b968792c4dfd9a7614c3e88129a4
Fix tests that fail in C++2a mode

The nested typedefs in std::reference_wrapper are no longer present in
C++2a mode, so skip the tests that check for them.

The addition of the [[nodiscard]] attribute to a few functions causes
some failures in tests that intentionally ignore the return value.
Casting the result to void suppresses the new warnings.

* testsuite/20_util/reference_wrapper/result_type.cc: Disable for
C++2a.
* testsuite/20_util/reference_wrapper/typedefs-2.cc: Likewise.
* testsuite/20_util/reference_wrapper/typedefs-3.cc: Likewise.
* testsuite/20_util/reference_wrapper/typedefs.cc: Likewise.
* testsuite/30_threads/async/54297.cc: Suppress nodiscard warning.
* testsuite/ext/array_allocator/26875.cc: Likewise.
* testsuite/ext/pool_allocator/allocate_chunk.cc: Likewise.
* testsuite/util/replacement_memory_operators.h: Likewise.
* testsuite/util/testsuite_allocator.h: Likewise.

From-SVN: r268355
libstdc++-v3/ChangeLog
libstdc++-v3/testsuite/20_util/reference_wrapper/result_type.cc
libstdc++-v3/testsuite/20_util/reference_wrapper/typedefs-2.cc
libstdc++-v3/testsuite/20_util/reference_wrapper/typedefs-3.cc
libstdc++-v3/testsuite/20_util/reference_wrapper/typedefs.cc
libstdc++-v3/testsuite/30_threads/async/54297.cc
libstdc++-v3/testsuite/ext/array_allocator/26875.cc
libstdc++-v3/testsuite/ext/pool_allocator/allocate_chunk.cc
libstdc++-v3/testsuite/util/replacement_memory_operators.h
libstdc++-v3/testsuite/util/testsuite_allocator.h