Date
2025-01-12.00:00:00
Message id
14540

Content

[ios.base.cons] specifies that

Each `ios_base` member has an indeterminate value after construction.

However

  • If the `ios_base` object has static storage duration, the members would have been zero-initialized.

  • If the `ios_base` object has automatic storage duration, the members would have erroneous values.

In either case, the constructor cannot cause the members to have indeterminate values after construction.

A related problem is that [ios.base.locales] requires `ios_base::getloc` to return:

If no locale has been imbued, a copy of the global C++ locale, `locale()`, in effect at the time of construction.

However, according to [ios.base.cons], the corresponding member is not initialized until `basic_ios::init` is called.