Boost logo

Boost :

From: Alan Griffiths (alan_at_[hidden])
Date: 1999-10-10 05:16:43


In message <199910092159.RAA20307_at_[hidden]>, Dave Abrahams
<abrahams_at_[hidden]> writes
>> The point is to make non-conforming C standard libraries behave as if they
>> were conforming - I guess an alternative would be something like:
>>
>> #include <cstdlib>
>>
>> namespace boost{
>>
>> #ifdef BOOST_NO_STDC_NAMESPACE
>> using ::size_t;
>> #else
>> using std::size_t;
>> #endif
>>
>> /* code goes here */
>>
>> } // namespace boost
>

An option I've been toying with is:

#include <cstdlib>

namespace boost {

#ifdef BOOST_NO_STDC_NAMESPACE
    namespace std {
        using ::size_t;
    }
#endif

    // Make use of std::size_t
}

This avoids "polluting" the boost namespace.

-- 
Alan Griffiths  (alan_at_[hidden])  http://www.octopull.demon.co.uk/
ACCU Chairman   (chair_at_[hidden])             http://www.accu.org/

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