Ticket #5197 (closed Bugs: fixed)

Opened 6 years ago

Last modified 6 years ago

Forward declarations from std:: not allowed in libc++

Reported by: chrisj Owned by: igaztanaga
Milestone: To Be Determined Component: interprocess
Version: Boost 1.45.0 Severity: Problem
Keywords: Cc:


interprocess uses the forward declarations from std::

template <class T> class allocator;

template <class T> struct less;

template <class T1, class T2> struct pair;

template <class CharType?> struct char_traits;

libc++ does not support these. There are various possible fixes. These forward declarations could just be replaced by the headers:

#include <utility> #include <memory> #include <functional> #include <iosfwd>

or we could introduce a macro ( BOOST_ALLOWS_FWD_STD_DECLARATIONS ), or create a detail header for forward declarations.

I am happy to implement any of these, I am interested what the developers of interprocess think.


interprocess.patch (1.2 KB) - added by chrisj 6 years ago.
Simple patch to get libc++ working

Change History

Changed 6 years ago by chrisj

Simple patch to get libc++ working

comment:1 Changed 6 years ago by chrisj

The problem of forwarding headers seems to be causing lots of discussion and not a lot of conclusion.

This simple attached patch disables the forwarding for libc++, the only standard library at present that seems to have trouble with them. I would appreciate it if it could be committed.

comment:2 Changed 6 years ago by chrisj


Would it be possible to get just a libc++ fix submitted for the next version of boost? I would like to have a more complete fix, but I'm unsure of how to do that in a way that isn't going to require huge amounts of code (as interprocess picks classes out of various headers) and will be agreed on by everyone.

comment:3 Changed 6 years ago by igaztanaga

Patch applied to trunk. After a few cycles, it will be merged to release branch

comment:4 Changed 6 years ago by igaztanaga

  • Status changed from new to closed
  • Resolution set to fixed

Fixed for Boost 1.47


Add a comment

Modify Ticket

Change Properties
<Author field>
as closed
The resolution will be deleted. Next status will be 'reopened'

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.