[libcxx-commits] [libcxx] [libc++] Simplify the implementation of iostream.cpp (PR #124103)

via libcxx-commits libcxx-commits at lists.llvm.org
Wed Feb 12 09:19:19 PST 2025


eaeltsin wrote:

It looks like this fires on the code that uses cin/cout/cerr streams in constructors of global objects, which should be legit:

> These objects are guaranteed to be initialized during or before the first time an object of type [std::ios_base::Init](https://en.cppreference.com/w/cpp/io/ios_base/Init) is constructed and are available for use in the constructors and destructors of static objects with [ordered initialization](https://en.cppreference.com/w/cpp/language/initialization#Non-local_variables) (as long as <iostream> is included before the object is defined).

Still need to double-check.


https://github.com/llvm/llvm-project/pull/124103


More information about the libcxx-commits mailing list