Modify

Ticket #3866 (closed Bugs: fixed)

Opened 4 years ago

Last modified 4 years ago

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

Reported by: Sylvain.Pion@… Owned by: danieljames
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

Change History

comment:1 Changed 4 years ago by danieljames

  • Owner set to danieljames
  • Status changed from new to assigned
  • Milestone changed from Boost 1.42.0 to Boost 1.43.0

comment:2 Changed 4 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 4 years ago by danieljames

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

(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 4 years ago by danieljames

(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 4 years ago by anonymous

View

Add a comment

Modify Ticket

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


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

 
Note: See TracTickets for help on using tickets.