Opened 12 years ago
Closed 12 years ago
#5197 closed Bugs (fixed)
Forward declarations from std:: not allowed in libc++
Reported by: | Chris Jefferson | Owned by: | Ion Gaztañaga |
---|---|---|---|
Milestone: | To Be Determined | Component: | interprocess |
Version: | Boost 1.45.0 | Severity: | Problem |
Keywords: | Cc: |
Description
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.
Attachments (1)
Change History (5)
by , 12 years ago
Attachment: | interprocess.patch added |
---|
comment:1 by , 12 years ago
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 by , 12 years ago
ping.
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 by , 12 years ago
Patch applied to trunk. After a few cycles, it will be merged to release branch
Simple patch to get libc++ working