3

有没有办法确定某些类型在编译期间是不可复制的?我需要以下内容:

template<typename T, unsigned long long MaxSize>
struct circular_buffer : boost::noncopyable {
    static_assert(typeof(T) ?????, "T must be noncopyable!");
};
4

1 回答 1

11

C++11 具有is_copy_assignableis_copy_constructible类型特征。断言两者都是错误的。

于 2014-02-04T16:47:22.543 回答