This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of NAD status.

### 135. basic_iostream doubly initialized

Section: 31.7.5.7.2 [iostream.cons] Status: NAD Submitter: Howard Hinnant Opened: 1999-03-06 Last modified: 2016-01-28

Priority: Not Prioritized

View all issues with NAD status.

Discussion:

-1- Effects Constructs an object of class basic_iostream, assigning initial values to the base classes by calling basic_istream<charT,traits>(sb) (lib.istream) and basic_ostream<charT,traits>(sb) (lib.ostream)

The called for basic_istream and basic_ostream constructors call init(sb). This means that the basic_iostream's virtual base class is initialized twice.

Proposed resolution:

Change 27.6.1.5.1, paragraph 1 to:

-1- Effects Constructs an object of class basic_iostream, assigning initial values to the base classes by calling basic_istream<charT,traits>(sb) (lib.istream).

Rationale:

The LWG agreed that the `init()` function is called twice, but said that this is harmless and so not a defect in the standard.