#include
class Test
{
public:
Test(const Test &) = delete;
Test &operator=(const Test &) = delete;
};
void fn(Test &a,
May be a bit too late, but I have a workaround here: define another copy-and-move assignment operator, also as a deleted one. The compiler gives a warning, complaining about multiple copy operators (C4522), so you have to disable it for the class:
#pragma warning (disable: 4522)
class A
{
A& operator=(const A&) = delete;
A& operator=(A) = delete;
};
#pragma warning (default: 4522)
Now std::is_copy_assignable::value
is false
.