Created on 2001-12-02.00:00:00 last changed 172 months ago
Rationale:
The LWG feels this is two issues, as indicated above. The first is a defect---std::basic_fstream is unimplementable without these additional requirements---and the proposed resolution fixes it. The second is questionable; who would use that typedef? The class template fpos is used only in a very few places, all of which know the state type already. Unless motivation is provided, the second should be considered NAD.
Proposed resolution:
Modify 21.1.2, p4 from
Requires: state_type shall meet the requirements of CopyConstructible types (20.1.3).
Requires: state_type shall meet the requirements of Assignable (23.1, p4), CopyConstructible (20.1.3), and DefaultConstructible (20.1.4) types.
(1) There are no requirements on the stateT template parameter of fpos listed in 27.4.3. The interface appears to require that the type be at least Assignable and CopyConstructible (27.4.3.1, p1), and I think also DefaultConstructible (to implement the operations in Table 88).
21.1.2, p3, however, only requires that char_traits<charT>::state_type meet the requirements of CopyConstructible types.
(2) Additionally, the stateT template argument has no corresponding typedef in fpos which might make it difficult to use in generic code.
History | |||
---|---|---|---|
Date | User | Action | Args |
2010-10-21 18:28:33 | admin | set | messages: + msg2324 |
2010-10-21 18:28:33 | admin | set | messages: + msg2323 |
2001-12-02 00:00:00 | admin | create |