Created on 1998-10-07.00:00:00 last changed 172 months ago
Rationale:
The LWG believes that while the order of arguments is unfortunate, it does not constitute a defect in the standard. The LWG believes that the proposed solution will not work for valarray<size_t> and perhaps other cases.
Proposed resolution:
Inverting the arguments could silently break programs. Introduce the two signatures (const T&, size_t) and (size_t, const T&), but make the one we do not want private so errors result in a diagnosed access violation. This technique can also be applied to STL containers.
The order of the arguments is (elem, size) instead of the normal (size, elem) in the rest of the library. Since elem often has an integral or floating point type, both types are convertible to each other and reversing them leads to a well formed program.
History | |||
---|---|---|---|
Date | User | Action | Args |
2010-10-21 18:28:33 | admin | set | messages: + msg576 |
2010-10-21 18:28:33 | admin | set | messages: + msg575 |
1998-10-07 00:00:00 | admin | create |