gcc/libstdc++-v3/testsuite
Jonathan Wakely 92750002ef PR libstdc++/90220 Fix std::any_cast for array types
Although the std::any constructors use decay_t to determine the type of
the contained value, std::any_cast should use the un-decayed type (and
so always fail for function and array types that decay to pointers).

Using remove_cv_t is correct, because the condition for std::any_cast
to return non-null is operand.type() == typeid(T) and typeid ignores
top-level cv-qualifiers.

	PR libstdc++/90220
	* include/std/any (__any_caster): Use remove_cv_t instead of decay_t.
	Avoid a runtime check for types that can never be stored in std::any.
	* testsuite/20_util/any/misc/any_cast.cc: Test std::any_cast with
	array types.

From-SVN: r270547
2019-04-24 16:17:43 +01:00
..
17_intro libstdc++-v3 Skip tests on Darwin8-10. 2019-04-21 08:14:47 +00:00
18_support P0482R5 char8_t: Updates to existing standard library tests 2019-02-22 01:16:08 +00:00
19_diagnostics Update copyright years. 2019-01-01 13:31:55 +01:00
20_util PR libstdc++/90220 Fix std::any_cast for array types 2019-04-24 16:17:43 +01:00
21_strings Define std::hash specializations for C++17 PMR strings 2019-04-03 10:47:47 +01:00
22_locale P0482R5 char8_t: Updates to existing standard library tests 2019-02-22 01:16:08 +00:00
23_containers PR c++/90047 - ICE with enable_if alias template. 2019-04-17 23:32:24 -04:00
24_iterators Update copyright years. 2019-01-01 13:31:55 +01:00
25_algorithms Integrate C++17 parallel algorithms 2019-03-21 23:48:49 +00:00
26_numerics Integrate C++17 parallel algorithms 2019-03-21 23:48:49 +00:00
27_io [testsuite,libstdc++-v3] Fix 27_io/filesystem/iterators/caching.cc 2019-04-08 09:17:30 +02:00
28_regex PR libstdc++/89023 fix test that fails when <omp.h> not available 2019-02-11 12:56:59 +00:00
29_atomics Change test to use const variables instead of macros 2019-03-11 13:46:09 +00:00
30_threads Fix tests that fail in C++2a mode 2019-01-29 00:47:32 +00:00
abi Update copyright years. 2019-01-01 13:31:55 +01:00
backward Update copyright years. 2019-01-01 13:31:55 +01:00
config Update copyright years. 2019-01-01 13:31:55 +01:00
data
decimal Update copyright years. 2019-01-01 13:31:55 +01:00
experimental PR c++/90047 - ICE with enable_if alias template. 2019-04-17 23:32:24 -04:00
ext P0482R5 char8_t: New standard library tests 2019-02-19 02:55:05 +00:00
lib Fix typo in effective-target check 2019-04-10 15:46:03 +01:00
libstdc++-abi Update copyright years. 2019-01-01 13:31:55 +01:00
libstdc++-dg Update copyright years. 2019-01-01 13:31:55 +01:00
libstdc++-prettyprinters Fix failing prettyprinter test 2019-01-09 10:46:52 +00:00
libstdc++-xmethods Update copyright years. 2019-01-01 13:31:55 +01:00
performance Update copyright years. 2019-01-01 13:31:55 +01:00
special_functions PR libstdc++/86655 - std::assoc_legendre should not constrain 2019-03-06 13:38:32 +00:00
tr1 PR libstdc++/86655 - std::assoc_legendre should not constrain 2019-03-06 13:38:32 +00:00
tr2 Update copyright years. 2019-01-01 13:31:55 +01:00
util Share all recursive_directory_iterator state [LWG 2708] 2019-04-05 17:56:23 +01:00
Makefile.am Update copyright years. 2019-01-01 13:31:55 +01:00
Makefile.in PR libstdc++/89466 avoid slow xsltproc command in configure 2019-02-27 11:25:44 +00:00