Boost logo

Boost :

From: Jonathan Wakely (cow_at_[hidden])
Date: 2004-09-22 08:52:59

On Wed, Sep 22, 2004 at 02:34:58PM +0100, Ben Hutchings wrote:

> > > I could make it work on g++ (and hence most Linux
> > > configurations) by using libstdc++'s atomic primitives? I
> >
> > No. This is not portable enough.
> > The problem is that libstdc++'s atomic ops come with libstdc++ which
> > precludes you from using other standard library implementations.
> Perhaps I could put #define BOOST_STDLIB_LIBSTDCPP3 in
> <boost/config/stdlib/libstdcpp3.hpp> and then guard any use of
> <bits/atomicity.h> with #ifdef BOOST_STDLIB_LIBSTDCPP3.

That macro would be a good idea anyway, since otherwise detecting
libstdc++-v3 requires:

#if defined(__GLIBCPP__) || defined (__GLIBCXX__)

There are already places that don't detect GCC 3.4's libstdc++ because
they haven't been updated to check for __GLIBCXX__ as well as
__GLIBCPP__. Your suggested macro would make it easier to get right.


"Yield to temptation, it may not pass your way again."
	- Robert Heinlein

Boost list run by bdawes at, gregod at, cpdaniel at, john at