Tie iostream Options to Stream Lifetime with xalloc and RAII
Summary Embedding formatting options directly into an output stream is a common desire for clean, expressive code. The typical pattern of storing options in a global std::map<std::size_t, tostr_options> keyed by the stream address works, but it leaks when streams are destroyed and can mis‑associate options if a new stream re‑uses an old address. The fix … Read more