Boost logo

Boost :

Subject: Re: [boost] [config] Does it work with compilers in C mode ?
From: John Maddock (boost.regex_at_[hidden])
Date: 2011-03-25 05:05:15


>> Almost certainly :-(
>
> What in config is C++ specific as opposed to C as far as the actual header
> file code ?

Well some of the detection code needs to include C++ only headers... but I
guess we wouldn't need to configure the C++ std lib in C mode ?!

There are also a few C++ specific workarounds in suffix.hpp, but they could
be included in a #ifdef __cplusplus block.

>>> I am working on bringing my variadic macro data library into Boost PP,
>>> and I wanted to use the BOOST_NO_VARIADIC_MACROS in config, but Paul
>>> Mensonides was concerned that Boost PP should work with a C compiler
>>> and that config could have something that is C++ specific, and
>>> therefore be unusable for Boost PP. I would rather not reduplicate the
>>> logic of BOOST_NO_VARIADIC_MACROS in Boost PP, even though I was the
>>> one to add it to config, because it puts the same code in two
>>> different places.
>>
>> We could try and patch Boost.Config to make it C compatible I guess...
>> not sure how much work it would be though?
>
> I am not concerned about the tests themselves, but rather about the header
> files. If there are C++ specific things in the header files which could
> just as easily work with C, I would like to take a look at what they are.
> if it was reasonable work, I could try to convert it as long as it does
> not affect anything in C++ negatively and was not essentially a "hack" to
> fit C++ into C.

If you're willing to give it a go, then it's very much a case of add a
C-language test case, and see what breaks.

HTH, John.


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