Boost C++ Libraries: Ticket #7696: Conflict mutex.hpp together with move.hpp https://svn.boost.org/trac10/ticket/7696 <p> When trying to compile the following code: </p> <pre class="wiki">#ifndef FRAME_DATA_QUEUE_H #define FRAME_DATA_QUEUE_H #include &lt;queue&gt; //#include &lt;boost/thread/locks.hpp&gt; #include &lt;boost/thread/mutex.hpp&gt; //#include &lt;IPStream/Decoder/FrameData.h&gt; typedef int PFrameData; class CFrameDataQueue { public: void PushData(PFrameData pData); PFrameData PopData(); bool IsQueueEmpty(); int GetSize(); void Lock(); void Unlock(); void Clean(); private: typedef std::queue&lt;PFrameData&gt; TFrameDataQueue; TFrameDataQueue m_FrameDataQueue; boost::mutex m_FrameDataQueueMutex; //boost::unique_lock&lt;boost::mutex&gt; m_Lock; }; typedef boost::shared_ptr&lt;CFrameDataQueue&gt; PFrameDataQueue; #endif // FRAME_DATA_QUEUE_H </pre><p> I got the error (MS Visual Studio 2010 SP1): </p> <pre class="wiki">1&gt;------ Build started: Project: LibIPStream, Configuration: Debug x64 ------ 1&gt;Build started 15.11.2012 16:45:47. 1&gt;InitializeBuildStatus: 1&gt; Touching "x64\Debug\LibIPStream.unsuccessfulbuild". 1&gt;ClCompile: 1&gt; FrameDataServerMediaSubsession.cpp 1&gt; FrameDataSignalSource.cpp 1&gt;D:\SDK_64\boost_1_52_0\boost/move/move.hpp(142): error C2062: type 'bool' unexpected 1&gt; D:\SDK_64\boost_1_52_0\boost/move/move.hpp(143) : see reference to class template instantiation 'boost::move_detail::not_&lt;__formal&gt;' being compiled 1&gt;D:\SDK_64\boost_1_52_0\boost/move/move.hpp(143): error C2143: syntax error : missing ';' before '{' 1&gt;D:\SDK_64\boost_1_52_0\boost/move/move.hpp(143): fatal error C1004: unexpected end-of-file found 1&gt;D:\SDK_64\boost_1_52_0\boost/move/move.hpp(142): error C2062: type 'bool' unexpected 1&gt; D:\SDK_64\boost_1_52_0\boost/move/move.hpp(143) : see reference to class template instantiation 'boost::move_detail::not_&lt;__formal&gt;' being compiled 1&gt;D:\SDK_64\boost_1_52_0\boost/move/move.hpp(143): error C2143: syntax error : missing ';' before '{' 1&gt;D:\SDK_64\boost_1_52_0\boost/move/move.hpp(143): fatal error C1004: unexpected end-of-file found 1&gt; 1&gt;Build FAILED. 1&gt; 1&gt;Time Elapsed 00:00:02.60 ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== </pre><p> Commenting struct "not_" from move.hpp does the trick: </p> <pre class="wiki"> //template &lt;typename Boolean&gt; // struct not_ // : public integral_constant&lt;bool, !Boolean::value&gt; //{}; </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/7696 Trac 1.4.3 viboes Thu, 15 Nov 2012 18:12:37 GMT owner, component changed https://svn.boost.org/trac10/ticket/7696#comment:1 https://svn.boost.org/trac10/ticket/7696#comment:1 <ul> <li><strong>owner</strong> changed from <span class="trac-author">Anthony Williams</span> to <span class="trac-author">Ion Gaztañaga</span> </li> <li><strong>component</strong> <span class="trac-field-old">thread</span> → <span class="trac-field-new">move</span> </li> </ul> Ticket Ion Gaztañaga Thu, 15 Nov 2012 22:59:05 GMT <link>https://svn.boost.org/trac10/ticket/7696#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7696#comment:2</guid> <description> <p> The example compiles fine in my Visual 2010 installation with Boost 1.52 (adding a main(){} line in the end of the example). </p> <p> However, reviewing Thread code I see that it uses non-public Boost.Thread internal classes and defines (like BOOST_MOVE_BOOST_NS, rv&lt;&gt; or has_move_emulation_enabled) not detailed in the documentation. I think that can be source of future incompatibility problems between Thread and Move, as Boost.Thread tries to support multiple move emulations. Much of those internals will change in future versions. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Ion Gaztañaga</dc:creator> <pubDate>Wed, 29 May 2013 10:11:00 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/7696#comment:3 https://svn.boost.org/trac10/ticket/7696#comment:3 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> This bug was already fixed in Boost 1.53. Thanks for the report. </p> Ticket