Boost logo

Boost :

From: John Maddock (jz.maddock_at_[hidden])
Date: 2022-12-23 18:33:45


>> Is someone willing to explain to me why we have Predef and Config?
> There are probably a couple of people who can explain. I might even be
> one of them. And this would be easier to explain if the Config
> documentation was better. Specifically in the area of stating its
> goal, what it's meant to do, its domain of operation, its reason for
> existence. Perhaps we are supposed to know everything just from its
> name? Do we dare ask for someone to volunteer such information be
> communicated in the documentation? Or do we all just know?

Perhaps we do (or not!)

I see the two libraries as orthogonal: Config answers the question "does
the current compiler/platform/std lib have feature X?" without the user
needing to know anything about what the current compiler/platform/stdlib
actually is.  Where as predef provides a unified way to figure out what
the current compiler/platform etc really is, and what version it is. 
This is obviously a brilliant fallback for situations when Config
doesn't have a necessary feature test macro ;)

I should also state, that Config was never really intended to be a
library for the end user (though I'm aware that some do use it), indeed
we rather discouraged end-user usage.  Rather it was a bunch of shared
configuration code, dating back to the heady days when there were only a
handful of Boost libraries and everyone round here knew everything that
was going on in each of them! Arguably it should be long dead by now,
though I have to admit that I'm rather pleased it still mostly just
plain works, and even the C++20 feature test macros are rather tedious
to use in comparison (even though I was rather hoping they would
eventually replace it).

So they could be merged, or not.  I'm not sure how much it matters
either way ;)

John.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk