I added the following type to a header file
boost::function<void()> voidFunction;
and I get the following error
Error 291 error C2220: warning treated as error - no 'object' file generated
Warning 2 warning C4251: ....: class 'boost::function<Signature>' needs to have dll-interface to be used by clients of class ...
My question is if there is a way to disable the warning for this type only programatically without making changes to the project configuration. I am using visual studio 2006.Currently I have the option enabled for "treat warning as errors". I wanted to know if I can keep that setting there and add something programatically in code to ignore the warning introduced by adding the statement.
boost::function<void()> voidFunction;