C++ super FAQ里对static initialization order fiasco有比较清楚的说明,而且讨论了几种idiom的优劣。
std::cin、std::cout本身的实现用的计数那种idiom
https://isocpp.org/wiki/faq/ctors#static-init-order
https://modernescpp.com/index.php/c-20-static-initialization-order-fiasco
--
FROM 222.131.206.*