diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2019-05-23 14:39:06 +0100 |
---|---|---|
committer | Jonathan Wakely <redi@gcc.gnu.org> | 2019-05-23 14:39:06 +0100 |
commit | 7dbab5dc84e3782fe6f366a985e507e2ea2726d2 (patch) | |
tree | 379706dbe804d09b85f9a9d365338c25b800ec30 /gcc/config.gcc | |
parent | 56a4e074ee8bcf4c3627fb595c31bd833d5a6532 (diff) | |
download | gcc-7dbab5dc84e3782fe6f366a985e507e2ea2726d2.zip gcc-7dbab5dc84e3782fe6f366a985e507e2ea2726d2.tar.gz gcc-7dbab5dc84e3782fe6f366a985e507e2ea2726d2.tar.bz2 |
PR libstdc++/90220 fix experimental::any_cast for non-object types
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
Diffstat (limited to 'gcc/config.gcc')
0 files changed, 0 insertions, 0 deletions