I'm having issues because I am using the Boost library, but another library I am using for this project is #define'ing the term 'thread' as well. And addressing the boost thread as boost::thread in my code doesn't help. Here is what the other library's definitino is:
#if defined(_MSC_VER)
# define thread __declspec( thread )
#else
# define thread
This leads to errors like the below:
13>c:\program files (x86)\boost\boost_1_44\boost\thread\detail\thread.hpp(111): warning C4038: ' __declspec(thread)' : illegal class modifier
13>c:\program files (x86)\boost\boost_1_44\boost\thread\detail\thread.hpp(113): error C2059: syntax error : '__declspec(thread)'
13>c:\program files (x86)\boost\boost_1_44\boost\thread\detail\thread.hpp(113): error C2238: unexpected token(s) preceding ';'
13>c:\program files (x86)\boost\boost_1_44\boost\thread\detail\thread.hpp(114): warning C4042: 'unnamed-parameter' : has bad storage class
13>c:\program files (x86)\boost\boost_1_44\boost\thread\detail\thread.hpp(114): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
Lines 110 to 114 in boost/thread.hpp are:
class BOOST_THREAD_DECL thread
{
private:
thread(thread&);
thread& operator=(thread&);
Any line with contains the term 'thread' in thread.hpp gives errors.
I am temporarily dealing with this error by changing all 'thread' terms in the other library to 'otherthread'. But I don't want to edit the source of the other library, because it would break or conflict with future updates/patches/extensions and such of this other library. Is there any other way I can deal with this conflict?