Opened 4 years ago

Closed 4 years ago

#9746 closed Bugs (fixed)

Modern Sun CC compiler detects error in intrusive library header

Reported by: Maxim Kartashev <maxim.kartashev@…> Owned by: Ion Gaztañaga
Milestone: To Be Determined Component: intrusive
Version: Boost 1.55.0 Severity: Problem
Keywords: Cc:


The problem can be reproduced as follows:

$ cat

#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 -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.

Attachments (1)

diffs (1.1 KB) - added by Maxim Kartashev <maxim.kartashev@…> 4 years ago.
Patch for boost/intrusive/detail/memory_util.hpp

Download all attachments as: .zip

Change History (2)

Changed 4 years ago by Maxim Kartashev <maxim.kartashev@…>

Attachment: diffs added

Patch for boost/intrusive/detail/memory_util.hpp

comment:1 Changed 4 years ago by Ion Gaztañaga

Resolution: fixed
Status: newclosed

Fixed in develop branch:SHA-1: 26acf03a9ba561ae033f353ac8212aa3c56fa6fd(Fixed #9746. Deleted workarounds for old SUN_CC compilers, those are now unsupported.)

Note: See TracTickets for help on using tickets.