diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2024-06-18 16:59:52 +0100 |
---|---|---|
committer | Jonathan Wakely <jwakely@redhat.com> | 2024-06-21 10:19:35 +0100 |
commit | 466ee78e3e975627440992dac67973ee314a0551 (patch) | |
tree | 778479b8c610c9ad2c1e11d651cfd4fabc601ab8 /libcpp | |
parent | c3e237338eb7ffc90f3cc8d32a3971d17f6d0b31 (diff) | |
download | gcc-466ee78e3e975627440992dac67973ee314a0551.zip gcc-466ee78e3e975627440992dac67973ee314a0551.tar.gz gcc-466ee78e3e975627440992dac67973ee314a0551.tar.bz2 |
libstdc++: Make std::any_cast<void> ill-formed (LWG 3305)
LWG 3305 was approved earlier this year in Tokyo. We need to give an
error if using std::any_cast<void>, but std::any_cast<void()> is valid
(but always returns null).
libstdc++-v3/ChangeLog:
* include/std/any (any_cast(any*), any_cast(const any*)): Add
static assertion to reject void types, as per LWG 3305.
* testsuite/20_util/any/misc/lwg3305.cc: New test.
Diffstat (limited to 'libcpp')
0 files changed, 0 insertions, 0 deletions