我有一个名为Atomic的类,它基本上是一个_Atomic_word调用gcc原子内置函数的加法方法.
class Atomic{
mutable volatile _Atomic_word value_;
public:
Atomic(int value = 0): value_(value) {}
**** blah blah ****
};
Run Code Online (Sandbox Code Playgroud)
我想std::numeric_limits<Atomic>实例化std::numeric_limits<underlying integer type>(例如在我的系统_Atomic_word上只是int的typedef).
有没有办法做到这一点?