This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
#include <atomic> #include <stdio.h>
class andrew { public: int a; andrew(int i) noexcept {a = i; } andrew() noexcept { a = 0; } operator int() noexcept { return a; } };
int main() { andrew i(10); andrew w,z; m = i; w.a = 20; z = m.exchange (w.a); printf (" 20 20 10 : %d %d %d\n",(andrew)m, w, z); }
<beast:/home/amacleod>./a.out 20 20 10 : 20 20 10
Attachment:
lib.diff
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |