[英]Atomics WITHOUT C++11 support?
For backwards compatibility reasons, we need to support versions of C++ prior to C++11, so we cannot use std::atomic<...>
.出于向后兼容性的原因,我们需要支持 C++11 之前的 C++ 版本,因此我们不能使用std::atomic<...>
。 However, we still need atomics.但是,我们仍然需要原子。
Is there an alternative to std::atomic<...>
that's possible in previous versions of C++?是否有替代std::atomic<...>
,这在以前版本的 C++ 中是可能的?
Preferably without including any new dependencies, but I realize this might be impossible.最好不包含任何新的依赖项,但我意识到这可能是不可能的。
EDIT: we need this specifically for Unix and Xbox360.编辑:我们专门为 Unix 和 Xbox360 需要这个。 We have considered Boost but don't want such a large depeundency for one platform that we will upgrade to C++11 in a few years.我们已经考虑过 Boost,但不希望对一个平台有如此大的依赖,以至于我们将在几年内升级到 C++11。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.