Boost C++ Libraries: Ticket #5117: back/state_machine.hpp doesn`t compile with gcc 4.0.x version https://svn.boost.org/trac10/ticket/5117 <p> Here is small patch that resolve problem. </p> <p> Compilation errors look like following: </p> <p> /home/esuitebuild/boost_1_45_0/boost/msm/back/state_machine.hpp:2192: error: 'template&lt;class <a class="missing wiki">StateType</a>&gt; typename boost::enable_if&lt;typename boost::msm::back::is_no_message_queue&lt;<a class="missing wiki">StateType</a>&gt;:\ :type, void&gt;::type boost::msm::back::state_machine::process_message_queue(<a class="missing wiki">StateType</a>*) [with <a class="missing wiki">StateType</a> = <a class="missing wiki">StateType</a>, Derived = net2::proto::a2s::client::machine_fe_t::st_connected_, HistoryP\ olicy = boost::msm::back::<a class="missing wiki">NoHistory</a>, <a class="missing wiki">CompilePolicy</a> = boost::msm::back::favor_runtime_speed]' cannot be overloaded /home/esuitebuild/boost_1_45_0/boost/msm/back/state_machine.hpp:2181: error: with 'template&lt;class <a class="missing wiki">StateType</a>&gt; typename boost::disable_if&lt;typename boost::msm::back::is_no_message_queue&lt;State\ Type&gt;::type, void&gt;::type boost::msm::back::state_machine::process_message_queue(<a class="missing wiki">StateType</a>*) [with <a class="missing wiki">StateType</a> = <a class="missing wiki">StateType</a>, Derived = net2::proto::a2s::client::machine_fe_t::st_connected_, Hi\ storyPolicy = boost::msm::back::<a class="missing wiki">NoHistory</a>, <a class="missing wiki">CompilePolicy</a> = boost::msm::back::favor_runtime_speed]' /home/esuitebuild/boost_1_45_0/boost/msm/back/state_machine.hpp: In instantiation of 'boost::msm::back::state_machine&lt;net2::proto::a2s::client::machine_fe_t, boost::msm::back::<a class="missing wiki">NoHistory</a>, b\ oost::msm::back::favor_runtime_speed&gt;': /home/esuitebuild/boost_1_45_0/boost/msm/back/state_machine.hpp:2192: error: 'template&lt;class <a class="missing wiki">StateType</a>&gt; typename boost::enable_if&lt;typename boost::msm::back::is_no_message_queue&lt;<a class="missing wiki">StateType</a>&gt;:\ :type, void&gt;::type boost::msm::back::state_machine::process_message_queue(<a class="missing wiki">StateType</a>*) [with <a class="missing wiki">StateType</a> = <a class="missing wiki">StateType</a>, Derived = net2::proto::a2s::client::machine_fe_t, <a class="missing wiki">HistoryPolicy</a> = boost::\ msm::back::<a class="missing wiki">NoHistory</a>, <a class="missing wiki">CompilePolicy</a> = boost::msm::back::favor_runtime_speed]' cannot be overloaded /home/esuitebuild/boost_1_45_0/boost/msm/back/state_machine.hpp:2181: error: with 'template&lt;class <a class="missing wiki">StateType</a>&gt; typename boost::disable_if&lt;typename boost::msm::back::is_no_message_queue&lt;State\ Type&gt;::type, void&gt;::type boost::msm::back::state_machine::process_message_queue(<a class="missing wiki">StateType</a>*) [with <a class="missing wiki">StateType</a> = <a class="missing wiki">StateType</a>, Derived = net2::proto::a2s::client::machine_fe_t, <a class="missing wiki">HistoryPolicy</a> = b\ oost::msm::back::<a class="missing wiki">NoHistory</a>, <a class="missing wiki">CompilePolicy</a> = boost::msm::back::favor_runtime_speed]' </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/5117 Trac 1.4.3 Kozlov Taras Tue, 25 Jan 2011 11:15:23 GMT attachment set https://svn.boost.org/trac10/ticket/5117 https://svn.boost.org/trac10/ticket/5117 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">02-msm-gcc402-compile-fix.patch</span> </li> </ul> Ticket Kozlov Taras Tue, 25 Jan 2011 11:16:01 GMT attachment set https://svn.boost.org/trac10/ticket/5117 https://svn.boost.org/trac10/ticket/5117 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">02-msm-gcc402-compile-fix.2.patch</span> </li> </ul> Ticket anonymous Tue, 25 Jan 2011 11:17:54 GMT <link>https://svn.boost.org/trac10/ticket/5117#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/5117#comment:1</guid> <description> <p> I can`t attach patch file, may be some problems with traq. Post it here diff -rub boost_1_45_0_old/boost/msm/back/state_machine.hpp boost_1_45_0/boost/msm/back/state_machine.hpp --- boost_1_45_0_old/boost/msm/back/state_machine.hpp 2010-12-03 17:04:12.000000000 +0300 +++ boost_1_45_0/boost/msm/back/state_machine.hpp 2011-01-25 13:36:43.000000000 +0300 @@ -1775,7 +1775,7 @@ </p> <blockquote> <p> <em> the IBM compiler seems to have problems with nested classes </em> the same seems to apply to the Apple version of gcc 4.0.1 (just in case we do for &lt; 4.1) <em> and also to MS VC &lt; 8 </em></p> </blockquote> <table class="wiki"> <tr>-#if defined (<span class="underline">IBMCPP</span>) <td> (defined (<span class="underline">APPLE_CC</span>) &amp;&amp; (<span class="underline">GNUC</span> == 4 &amp;&amp; <span class="underline">GNUC_MINOR</span> &lt; 1)) </td><td> (defined(_MSC_VER) &amp;&amp; (_MSC_VER &lt; 1400)) </td></tr><tr>+#if defined (<span class="underline">IBMCPP</span>) <td> (<span class="underline">GNUC</span> == 4 &amp;&amp; <span class="underline">GNUC_MINOR</span> &lt; 1) </td><td> (defined(_MSC_VER) &amp;&amp; (_MSC_VER &lt; 1400)) </td></tr></table> <blockquote> <p> public: </p> </blockquote> <blockquote> <p> #endif </p> <blockquote> <p> template&lt;class ContainingSM&gt; </p> </blockquote> </blockquote> <p> @@ -1784,7 +1784,7 @@ </p> <blockquote> <p> m_is_included=true; ::boost::fusion::for_each(m_substate_list,add_state&lt;ContainingSM&gt;(this,sm)); </p> </blockquote> <blockquote> <p> } </p> </blockquote> <table class="wiki"> <tr>-#if defined (<span class="underline">IBMCPP</span>) <td> (defined (<span class="underline">APPLE_CC</span>) &amp;&amp; (<span class="underline">GNUC</span> == 4 &amp;&amp; <span class="underline">GNUC_MINOR</span> &lt; 1)) </td><td> (defined(_MSC_VER) &amp;&amp; (_MSC_VER &lt; 1400)) </td></tr><tr>+#if defined (<span class="underline">IBMCPP</span>) <td> (<span class="underline">GNUC</span> == 4 &amp;&amp; <span class="underline">GNUC_MINOR</span> &lt; 1) </td><td> (defined(_MSC_VER) &amp;&amp; (_MSC_VER &lt; 1400)) </td></tr></table> <blockquote> <p> private: </p> </blockquote> <blockquote> <p> #endif </p> <blockquote> <p> <em> A function object for use with mpl::for_each that stuffs </em></p> </blockquote> </blockquote> <p> @@ -2177,8 +2177,7 @@ </p> <blockquote> <p> } <em> removes one event from the message queue and processes it template &lt;class <a class="missing wiki">StateType</a>&gt; </em></p> </blockquote> <ul><li> typename ::boost::disable_if&lt;typename is_no_message_queue&lt;<a class="missing wiki">StateType</a>&gt;::type,void &gt;::type </li><li> process_message_queue(<a class="missing wiki">StateType</a>*) </li></ul><p> + void process_message_queue(<a class="missing wiki">StateType</a>*, typename ::boost::disable_if&lt;typename is_no_message_queue&lt;<a class="missing wiki">StateType</a>&gt;::type,void &gt;::type* = 0) </p> <blockquote> <p> { </p> <blockquote> <p> if (!m_events_queue.m_events_queue.empty()) { </p> </blockquote> </blockquote> <p> @@ -2188,8 +2187,7 @@ </p> <blockquote> <p> } </p> </blockquote> <blockquote> <p> } template &lt;class <a class="missing wiki">StateType</a>&gt; </p> </blockquote> <ul><li> typename ::boost::enable_if&lt;typename is_no_message_queue&lt;<a class="missing wiki">StateType</a>&gt;::type,void &gt;::type </li><li> process_message_queue(<a class="missing wiki">StateType</a>*) </li></ul><p> + void process_message_queue(<a class="missing wiki">StateType</a>*, typename ::boost::enable_if&lt;typename is_no_message_queue&lt;<a class="missing wiki">StateType</a>&gt;::type,void &gt;::type* = 0) </p> <blockquote> <p> { </p> <blockquote> <p> <em> nothing to process </em></p> </blockquote> <p> } </p> </blockquote> </description> <category>Ticket</category> </item> <item> <dc:creator>Christophe Henry</dc:creator> <pubDate>Fri, 28 Jan 2011 21:21:31 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/5117#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/5117#comment:2</guid> <description> <p> Ah, this is interesting. Here the link to the corresponding previous discussion: <a class="ext-link" href="http://lists.boost.org/Archives/boost/2010/09/171281.php"><span class="icon">​</span>http://lists.boost.org/Archives/boost/2010/09/171281.php</a> </p> <p> It seems that the problem is not limited to Apple. What OS are you using? </p> <p> Will be fixed for 1.47 (1.46 is closed). Fixed in trunk (rev 68535). </p> <p> Thanks, Christophe </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Christophe Henry</dc:creator> <pubDate>Fri, 28 Jan 2011 21:22:47 GMT</pubDate> <title>status, milestone changed; resolution set https://svn.boost.org/trac10/ticket/5117#comment:3 https://svn.boost.org/trac10/ticket/5117#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> <li><strong>milestone</strong> <span class="trac-field-old">To Be Determined</span> → <span class="trac-field-new">Boost 1.47.0</span> </li> </ul> Ticket