Is there a static_assert way to make the template argument unprepared?

Is there any way to determine that some type is not being copied at compile time? I need the following:

template<typename T, unsigned long long MaxSize>
struct circular_buffer : boost::noncopyable {
    static_assert(typeof(T) ?????, "T must be noncopyable!");
};
+3
source share
1 answer

C ++ 11 has features like is_copy_assignableand is_copy_constructible. Make sure both values ​​are false.

+11
source

All Articles