Modify

Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#3866 closed Bugs (fixed)

detail/container_fwd.hpp lacks support for the parallel mode of GCC's STL

Reported by: Sylvain.Pion@… Owned by: Daniel James
Milestone: Boost 1.43.0 Component: None
Version: Boost 1.41.0 Severity: Problem
Keywords: Cc: Stephane.Tayeb@…

Description

GCC supports a parallel mode activated by _GLIBCXX_PARALLEL.

If you include <boost/bimap> under this parallel mode, you get compilation errors.

detail/container_fwd.hpp needs to be updated to support it, in a similar way as the debug mode. The following patch appears to fix it :

Index: detail/container_fwd.hpp =================================================================== --- detail/container_fwd.hpp (révision 59275) +++ detail/container_fwd.hpp (copie de travail) @@ -13,7 +13,7 @@

#include <boost/config.hpp> #include <boost/detail/workaround.hpp>

-#if ((defined(GLIBCPP) +#if ((defined(GLIBCPP)
defined(GLIBCXX)) && defined(_GLIBCXX_DEBUG)) \
defined(GLIBCXX)) && (defined(_GLIBCXX_DEBUG) defined(_GLIBCXX_PARALLEL)) \
BOOST_WORKAROUND(BORLANDC, > 0x551) \
BOOST_WORKAROUND(DMC, BOOST_TESTED_AT(0x842)) \
(defined(SGI_STL_PORT) defined(_STLPORT_VERSION))

(I have lost my SVN access rights so I can't commit it myself)

Attachments (0)

Change History (5)

comment:1 Changed 7 years ago by Daniel James

Milestone: Boost 1.42.0Boost 1.43.0
Owner: set to Daniel James
Status: newassigned

comment:2 Changed 7 years ago by anonymous

Another comment about this file, while at it.

What this file does is very fragile. It has the potential to break with any unforeseen configuration. Therefore, I would suggest to add a configuration macro for the user to be able to turn it off easily. If I understood it correctly, it is only a compile-time reduction feature, certainly not worth some big trouble.

The way we have to workaround this problem currently is to ship a fixed copy of this file, with some appropriate Boost version detection. This is not really nice.

comment:3 Changed 7 years ago by Daniel James

Resolution: fixed
Status: assignedclosed

(In [59282]) Don't foward declare containers when using gcc's parallel library and add a macro to disable forward declaration. Fixes #3866.

comment:4 Changed 7 years ago by Daniel James

(In [59679]) Merge some detail changes.

  • [53670] Avoid C style casts.
  • [55604] Fix #3346 boost/detail/scoped_enum_emulation.hpp enum_t conflict with Unix rpc/types.h
  • Don't foward declare containers when using gcc's parallel library and add a macro to disable forward declaration. Fixes #3866.

comment:5 Changed 7 years ago by anonymous

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Daniel James.
The resolution will be deleted.

Add Comment


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

 
Note: See TracTickets for help on using tickets.