Boost C++ Libraries: Ticket #9746: Modern Sun CC compiler detects error in intrusive library header https://svn.boost.org/trac10/ticket/9746 <p> The problem can be reproduced as follows: </p> <p> $ cat a.cc </p> <pre class="wiki">#include &lt;boost/interprocess/managed_mapped_file.hpp&gt; typedef boost::interprocess::managed_mapped_file::segment_manager segment_manager_t; int main () { return 0; } </pre><p> </p> <pre class="wiki">$ CC -I .../boost_1_55_0 a.cc -library=stlport4 ... ".../boost_1_55_0/boost/intrusive/detail/memory_util.hpp", line 192: Error: Templates can only declare classes or functions. ".../boost_1_55_0/boost/intrusive/detail/memory_util.hpp", line 208: Error: Templates can only declare classes or functions. ... </pre><p> The reason is that modern Sun CC compiler can understand dependent templates (constructs like "T::template Q") and doesn't need workaround anymore in boost/intrusive/detail/memory_util.hpp. Attached patch fixes the problem. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/9746 Trac 1.4.3 Maxim Kartashev <maxim.kartashev@…> Thu, 06 Mar 2014 07:15:12 GMT attachment set https://svn.boost.org/trac10/ticket/9746 https://svn.boost.org/trac10/ticket/9746 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">diffs</span> </li> </ul> <p> Patch for boost/intrusive/detail/memory_util.hpp </p> Ticket Ion Gaztañaga Tue, 18 Mar 2014 16:33:24 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/9746#comment:1 https://svn.boost.org/trac10/ticket/9746#comment:1 <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> Fixed in develop branch:SHA-1: 26acf03a9ba561ae033f353ac8212aa3c56fa6fd(Fixed <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/9746" title="#9746: Bugs: Modern Sun CC compiler detects error in intrusive library header (closed: fixed)">#9746</a>. Deleted workarounds for old SUN_CC compilers, those are now unsupported.) </p> Ticket