From the MSDN documentation
You can resolve the C4512 warning for your code in one of three ways:
- Explicitly define an assignment operator for the class.
- Remove const or the reference operator from the data item in the class.
- Use the
#pragma
warning statement to suppress the warning.
If inheriting from boost::noncopyable
(which would be the first option) does not work, and you cannot access the class source (second option) then you are left with the #pragma
warning
#pragma warning( disable : 4152 )
// your offending code
#pragma warning( pop )