Created on 2009-04-29.00:00:00 last changed 179 months ago
[Voted into WP at October, 2009 meeting.]
Proposed resolution (July, 2009):
Change 6.8 [basic.types] paragraph 3 as follows:
For any trivially copyable type T, if two pointers to T point to distinct T objects obj1 and obj2, where neither obj1 nor obj2 is a base-class subobject, if thevalue ofunderlying bytes (6.7.1 [intro.memory]) making up obj1isare copied into obj2, using the std::memcpy library function[Footnote: By using, for example, the library functions (16.4.2.3 [headers]) std::memcpy or std::memmove. —end footnote], obj2 shall subsequently hold the same value as obj1. [Example:...
The std::memcpy library function is singled out for special treatment in 6.8 [basic.types] paragraph 3:
For any trivially copyable type T, if two pointers to T point to distinct T objects obj1 and obj2, where neither obj1 nor obj2 is a base-class subobject, if the value of obj1 is copied into obj2, using the std::memcpy library function, obj2 shall subsequently hold the same value as obj1.
This specification should not be restricted to std::memcpy but should apply to any bytewise copying, including std::memmove (as is done in the footnote in the preceding paragraph, for example).
History | |||
---|---|---|---|
Date | User | Action | Args |
2010-03-29 00:00:00 | admin | set | status: dr -> cd2 |
2009-11-08 00:00:00 | admin | set | messages: + msg2428 |
2009-11-08 00:00:00 | admin | set | status: ready -> dr |
2009-08-03 00:00:00 | admin | set | messages: + msg2142 |
2009-08-03 00:00:00 | admin | set | status: open -> ready |
2009-04-29 00:00:00 | admin | create |