gcc/libstdc++-v3/include
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
..
backward PR libstdc++/88066 Use <> for includes not "" 2019-03-21 12:07:10 +00:00
bits Fix std::variant regression caused by never-valueless optimization 2019-04-23 10:55:33 +01:00
c
c_compatibility In C++17 <math.h> should not put special functions in global namespace 2019-03-21 14:03:56 +00:00
c_global Define midpoint and lerp functions for C++20 (P0811R3) 2019-03-05 18:37:24 +00:00
c_std
debug PR libstdc++/87431 re-adjust never-valueless optimizations 2019-04-05 17:56:09 +01:00
decimal
experimental PR libstdc++/89460 Fix Networking TS test failures on HP-UX 2019-03-11 16:28:11 +00:00
ext Disambiguate __gnu_cxx::append_ partial specialization 2019-02-22 01:15:58 +00:00
parallel
precompiled
profile
pstl Cleanup algorithm implementations 2019-04-20 22:45:58 +00:00
std PR libstdc++/90220 Fix std::any_cast for array types 2019-04-24 16:17:43 +01:00
tr1 PR libstdc++/88066 Use <> for includes not "" 2019-03-21 12:07:10 +00:00
tr2
Makefile.am Integrate C++17 parallel algorithms 2019-03-21 23:48:49 +00:00
Makefile.in Integrate C++17 parallel algorithms 2019-03-21 23:48:49 +00:00