相关疑难解决方法(0)

模板和std :: numeric_limits

我有一个名为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).

有没有办法做到这一点?

c++ templates numeric-limits

3
推荐指数
1
解决办法
446
查看次数

标签 统计

c++ ×1

numeric-limits ×1

templates ×1