Boost logo

Boost :

From: Ed Brey (brey_at_[hidden])
Date: 2000-02-18 10:55:43


From: "Jens Maurer" <jmaurer_at_[hidden]>
>
> Can we please have a #define BOOST_STDINT_H_HAS_UINT64_T in
> <boost/config.hpp>?
> Note that, for 64bit machines, this may be different from
> "HAS_ULONGLONG".

It seems that it might be common for an application to want to know whether
there is an interger of size x at compile time. Rather than just throw in
the proposed macro into config.hpp, a better solution would be to provide
some generic mechanism for programs to determine what types are available.
This would be best put into stdint.h or cstding.hpp so as to provide
existing practice. Ideas on how best to do this?

> Btw, I've guarded "using std::xxx" declarations with
> #ifndef BOOST_NO_STDC_NAMESPACE.

As an alternative to sprinkling compiler workarounds throughout the code,
you can take a page from config.hpp's book and put one workaround at the
beginning of the header:

# ifdef BOOST_NO_STDC_NAMESPACE
    namespace std { using ::log; using ::sqrt; using ::sin; using ::cos; }
# endif

Then use std::log in the code, as if you were living in a perfect world.
Additionally, I think that this would obviate the need for the gcc_hack
code.


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