mirror of
https://gcc.gnu.org/git/gcc.git
synced 2024-12-22 10:35:22 +08:00
7dbab5dc84
This corresponds to the fixes done for std::any_cast, but has to be done without if-constexpr. The dummy specialization of _Manager_internal<_Op> is used to avoid instantiating the real _Manager_internal<T>::_S_manage function just to compare its address. PR libstdc++/90220 * include/experimental/any (__any_caster): Constrain to only be callable for object types. Use remove_cv_t instead of decay_t. If the type decays or isn't copy constructible, compare the manager function to a dummy specialization. (__any_caster): Add overload constrained for non-object types. (any::_Manager_internal<_Op>): Add dummy specialization. * testsuite/experimental/any/misc/any_cast.cc: Test function types and array types. From-SVN: r271556 |
||
---|---|---|
.. | ||
algorithm | ||
any | ||
array | ||
chrono | ||
deque | ||
filesystem | ||
forward_list | ||
functional | ||
iterator | ||
list | ||
map | ||
memory | ||
memory_resource | ||
net | ||
numeric | ||
optional | ||
polymorphic_allocator | ||
propagate_const | ||
random | ||
ratio | ||
set | ||
source_location | ||
string | ||
string_view | ||
system_error | ||
tuple | ||
type_erased_allocator | ||
type_traits | ||
unordered_map | ||
unordered_set | ||
vector | ||
feat-char8_t.cc | ||
feat-cxx14.cc | ||
feat-lib-fund.cc | ||
names.cc |