Em seg 24 mar 2014, às 09:49:07, Bob Hood escreveu: > I actually use the "volatile" tag to tell the compiler that it cannot > optimize (i.e., make compile-time assumptions about) the variable that it > decorates. Does std::atomic have the same meaning for optimizations? I > can't get a clear picture of this by a (cursory) Google.
No, it doesn't. It tells the *processor* (not the compiler) that it needs to go fetch the value from memory. > If compilers still consider std::atomic in aggressive optimizing, then it > might be an either/or depending upon particular need. -- Thiago Macieira - thiago.macieira (AT) intel.com Software Architect - Intel Open Source Technology Center _______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest