我刚刚看到 C++ 23计划弃用std::aligned_storageandstd::aligned_storage_t以及std::aligned_union。std::aligned_union_t
std::aligned_storage
std::aligned_storage_t
std::aligned_union
std::aligned_union_t
据我所知,在对齐存储中放置新对象并不是特别constexpr友好,但这似乎不是完全丢弃该类型的好理由。这让我假设使用std::aligned_storage和朋友还存在一些我不知道的其他基本问题。那会是什么?
constexpr
是否有建议替代这些类型?
c++ memory-alignment deprecated c++23
c++ ×1
c++23 ×1
deprecated ×1
memory-alignment ×1