Are volatile data members trivially copyable?
Posted
by
Lightness Races in Orbit
on Stack Overflow
See other posts from Stack Overflow
or by Lightness Races in Orbit
Published on 2012-11-15T22:57:42Z
Indexed on
2012/11/15
22:59 UTC
Read the original article
Hit count: 196
Whilst writing this answer I realised that I'm not as confident about my conclusions as I usually would ensure before hitting Post Your Answer.
I can find a couple of reasonably convincing citations for the argument that the trivial-copyability of volatile
data members is either implementation defined or flat-out false:
- https://groups.google.com/forum/?fromgroups=#!topic/comp.std.c++/5cWxmw71ktI
- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48118
- http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2010/n3159.html#496
But I haven't been able to back this up in the standard1 itself. Particularly "worrying" is that there's no sign of the proposed wording change from that n3159 issues list in the actual standard's final wording.
So, what gives? Are volatile
data members trivially copyable, or not?
1 C++11
© Stack Overflow or respective owner