libstdc++: Simplify std::any to fix -Wdeprecated-declarations warning
We don't need to use std::aligned_storage in std::any. We just need a POD type of the right size. The void* union member already ensures the alignment will be correct. Avoiding std::aligned_storage means we don't need to suppress a -Wdeprecated-declarations warning. libstdc++-v3/ChangeLog: * include/experimental/any (experimental::any::_Storage): Use array of unsigned char instead of deprecated std::aligned_storage. * include/std/any (any::_Storage): Likewise. * testsuite/20_util/any/layout.cc: New test.
Showing
Loading
Please register or sign in to comment