Boost logo

Boost :

From: Beman Dawes (bdawes_at_[hidden])
Date: 2001-09-07 14:41:20


At 01:40 PM 9/7/2001, Gennadiy E. Rozental wrote:

>--- In boost_at_y..., Beman Dawes <bdawes_at_a...> wrote:
>> Beyond that, several of the proposed fixes seem to spread compiler
>> version checking out into individual library files. The whole point
>> of config.hpp (and the replacement config system just reviewed) is
>> to centralize configuration information in one easy to maintain
location.
>
>I agree with you. But Can you propose how to do this?

I'm not sure at what level you're asking that question.

A simplistic answer is just to look at the config docs and header. See
http://www.boost.org/libs/config/index.htm or config.htm in John Maddock's
newly accepted config system.

If you are asking at a somewhat deeper level how to deal with a compiler
which "sort of" supports a feature, then look at how config.hpp handles
VC++ member templates, for example:

# if _MSC_VER <= 1200 // 1200 == VC++ 6.0
...
// VC++ 6.0 has member templates but they have numerous problems
including
// cases of silent failure, so for safety we define:
# define BOOST_NO_MEMBER_TEMPLATES
// For VC++ experts wishing to attempt workarounds, we define:
# define BOOST_MSVC6_MEMBER_TEMPLATES

Then boost code which doesn't want to try to use the feature looks for
BOOST_NO_MEMBER_TEMPLATES, while code which wants to apply a compiler
specific workaround looks for BOOST_MSVC6_MEMBER_TEMPLATES.

Does that answer your question?

--Beman


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