Boost logo

Boost :

Subject: [boost] [Boost.Config] Using <cstddef> instead of <utility> for std lib detection
From: David Deakins (ddeakins_at_[hidden])
Date: 2009-03-27 17:06:04


I am in the process of migrating our VeecoFTC regression tests from VC8
and STLport 5.1 to VC9 and STLport 5.2. While working on this, I have
experimented with turning on STLport's _STLP_USE_BOOST_SUPPORT macro.
When this macro is defined, STLport will pull in the Boost.TypeTraits
header files instead of its own type traits implementations. It also
suppliments a few of the standard headers (memory and functional) with
Boost-based TR1 functionality much like Boost.TR1 does. However,
similar to some of what Boost.TR1 had to deal with, some caution is
required to avoid circular dependencies in the headers. One area where
this tends to come up is in detecting the standard library in use in
Boost.Config. Currently config/select_stdlib_config.hpp and
config/stdlib/stlport.hpp include <utility> to determine what std
library is provided. However, <utility> can tend to pull in some code
that wants type traits and thus may circularly pull in Boost. One
convenient way to resolve this would be to use the much simpler
<cstddef> header instead of <utlity> to determine the std lib. Is this
a reasonable change to make or is there something special about using
<utility> in the select_stdlib_config code?

-Dave


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