Skip to content

败犬日报 2025-03-27

1. std::any 依赖 RTTI

因为 https://zh.cppreference.com/w/cpp/utility/any/type 这个方法返回 std::type_info

2. c++ 局部变量的析构顺序

构造逆序 https://isocpp.org/wiki/faq/dtors#order-dtors-for-locals

例外:如果有 NRVO,变量就不会析构。