Boost logo

Boost :

From: Jonathan Wakely (cow_at_[hidden])
Date: 2004-08-12 06:50:38

On Thu, Aug 12, 2004 at 01:12:34PM +0200, Markus Sch?pflin wrote:

> >If Boost doesn't work with pure <cxxx> headers then Boost is broken.
> But it would require much effort to fix it. I know this is a pragmatic
> point of view, but I'm not sure if it's really worth the effort.

Since it would be effort to make Boost work for a highly-conforming
compiler I'd say this particular work would be well worth it. The effort
would pay off for other compilers in the future if they cleaned up their
C headers. Easy for me to say though, I wouldn't be doing the work.

> >On the other hand, requiring users to compile in less-than-conforming
> >mode would mean that some people using strict_ansi mode and writing
> >perfectly conforming code cannot use Boost.
> Ideally, boost should adapt to whatever mode the compiler is in. In
> theory, this should be possible as every switch defines some compiler macro:
> -pthread => _REENTRANT
> -pure_cname => __PURE_CNAME
> -using_std => __IMPLICIT_USING_STD
> -std ansi => __STD_ANSI
> -std strict_ansi => __STD_STRICT_ANSI, also sets __PURE_CNAME
> For thread support this is already done by boost.

Nice - it would be relatively* easy to use those macros to
define/undefine the corresponding Boost macros.

* relative to a very hard thing ;)

> >As I understand it, whatever flags are used by Boost must match the
> >flags a user uses (maybe this only applies to compiled libs, not
> >header-only ones), so one view would be that Boost should use the most
> >commonly used set of flags. This might be the default - but then that
> >uses nonstandard streams and implicit using directive for namespace std
> >- eurgh! And in any case, "noone knows what most C++ programmers do".
> Compiled libs would end up with yet more build variants. Header only
> libs could be made to adapt automatically, if one is willing to put
> enough effort into it. Which returns us to the question if it's really
> worth it.

Agreed, but that would mean users who don't use BJam would have to know
which compiled lib corresponds to their set of flags - eurgh again.


"Democracy is the theory that the common people know what they want, and 
 deserve to get it good and hard."
	- H.L. Mencken

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