|
Boost : |
From: Ed Brey (brey_at_[hidden])
Date: 2002-08-13 10:39:50
"William E. Kempf" <williamkempf_at_[hidden]> wrote in message news:OE20r7NoUDry420OPbg0001058d_at_hotmail.com...
> I've found an interesting problem with the VC6 compiler/libraries. The
> terminate() and related functions don't seem to be placed in the "std"
> namespace. The work around I've employed is to use a local "using namespace
> std;", but I'm wondering if this is something that's already in, or should
> be added, to Boost.Config?
This general issue is handled in the config via BOOST_NO_STDC_NAMESPACE. The solution is to "fix" the standard library implementation by declaring names in std that it forgot to. Suffix.hpp performs this fix for the most commonly used standard names that are left out of std: ptrdiff_t and size_t. Individual libraries are expected to provide the "fix" for uncommon names themselves.
Hence, you'll want to put the following in the beginning of your file that uses terminate:
#ifdef BOOST_NO_STDC_NAMESPACE
namespace std { using ::terminate; }
#endif
This system that config uses assumes that any library that puts size_t in the wrong namespace also puts the other functions, like terminate, in the wrong namespace. I don't know of any implementations where this doesn't hold true.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk