
On 4/3/2011 12:46 PM, Chad Nelson wrote:
On Sun, 03 Apr 2011 11:58:58 -0400 Edward Diener<eldiener@tropicsoft.com> wrote:
[...] My initial thought was to see if config could work with C compilers, but all investigation there has led me to believe that it would be too many unnecessary changes to config, would complicate config greatly, would need extensive testing against all compilers, and that since config is central to all of Boost such a potential massive change to it it is a bad idea. [...]
What about simply wrapping everything in config, except the varadic stuff, in an "#ifdef __cplusplus"?
That was the original thought. But it would mean testing each compiler/version to make sure that __cplusplus was actually being set when compiling a C++ program.
It would be an unobtrusive change, and that define is required by every C++ standard I've seen (note: I've only seen working drafts, not the final copies, though I don't expect that part has changed).
It might be unobtrusive but there are very many config header files in which one would have to do that. Even doing it just for each compiler's header file would mean that each compiler would have to be tested which config supports. I do not think we even have every compiler which config supports being tested regularly, but I may be wrong.
I know that even Borland's compilers (arguably the most problematic ones in common use today) have defined that since Turbo C++ 1.0 in the eighties.
There are other compilers "supported" by config which are even less common than Borland.