[Boost-bugs] [Boost C++ Libraries] #9746: Modern Sun CC compiler detects error in intrusive library header

Subject: [Boost-bugs] [Boost C++ Libraries] #9746: Modern Sun CC compiler detects error in intrusive library header
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2014-03-06 07:14:45


#9746: Modern Sun CC compiler detects error in intrusive library header
-------------------------------------------------+------------------------
 Reporter: Maxim Kartashev <maxim.kartashev@…> | Owner: igaztanaga
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: intrusive
  Version: Boost 1.55.0 | Severity: Problem
 Keywords: |
-------------------------------------------------+------------------------
 The problem can be reproduced as follows:

 $ cat a.cc

 {{{
 #include <boost/interprocess/managed_mapped_file.hpp>

 typedef boost::interprocess::managed_mapped_file::segment_manager
 segment_manager_t;

 int main ()
 {
   return 0;
 }
 }}}



 {{{
 $ 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.
 ...
 }}}


 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.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/9746>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:15 UTC