On Wed, May 28, 2014 at 12:45 PM, Robert Ramey < robertmacleranramey@gmail.com> wrote:
The whole existence of boost predef was a huge surprise to me.
It was reviewed and accepted ;-)
Looking at the dates it seems its been in boost for a while. I perused the documentation. I'm still not getting how this doesn't overlap with config..hpp. I thought that config.hpp was designed to address the issue of portability between platforms.
Boost Config is indeed designed to address portability between platforms. As a requirement of that design it also has to deal with detecting the different platforms it's trying to define feature/defect macros for. Detecting the platform is not a requirement for Config to work. And you can run the Config configure program to generate a set of portability feature/defect definitions without knowing about the platform.
So I would expect that a facility such as
#include
#include would depend upon config.hpp rather than the other way around.
And since config.hpp is designed to determine the platform automatically, I'm very surpassed to see predef at all.
"config.hpp" has to partially determine the "platform" by need not by design.
Any additional information you want to submit would be interesting to see.
Predef's design is to *not* detect or define feature/defect macros. All it does is the detection of the platform (compiler, libraries, etc). With enough fine grained platform information one can use it to define know feature/defect macros. Predef defines a much larger superset of the Config platform defs http://tinyurl.com/o68ovjz in a consistent (and consistent to check) manner. Or more succinctly: * Predef detects the environment you are compiling in. * Config defines what is or isn't broken with that environment relative to the ideal/standard -conforming environment. HTH -- -- Rene Rivera -- Grafik - Don't Assume Anything -- Robot Dreams - http://robot-dreams.net -- rrivera/acm.org (msn) - grafikrobot/aim,yahoo,skype,efnet,gmail