|
Boost : |
From: Howard Hinnant (hinnant_at_[hidden])
Date: 1999-11-26 20:42:01
This looks very good. But I couldn't find the relational operators (!=,
>, etc.). I know you have them because you use them, but they didn't make it.
After I added them to your appropriate classes things ran fine.
Dietmar are you listening? :-) Just took a first look at your array.hpp.
I like it, but it doesn't compile with CodeWarrior. size_t is undefined
outside of std. Given the current state of things, an elegant solution
is probably not forthcoming.
Here's what I do: I define the following two macros:
#define _STD ::std
#define _CSTD ::std
I use _STD to prefix C++ objects when necessary and _CSTD to prefix C
objects when necessary. If the C objects aren't within std, then a
configuration header defines _CSTD as:
#define _CSTD
So array.hpp might look like:
template <typename T, _CSTD::size_t sz>
...
In a configuration file up above _CSTD will be defined to either nothing
or to ::std depending upon where the C library sits.
Maybe these should be BOOST_STD and BOOST_CSTD so they don't conflict
with vendor macros.
-Howard
jsiek_at_[hidden] wrote on 11/26/99 6:58 PM
>
>I've attached my implementation of the iterator ops idea. It uses
>friend functions for almost all the operators (including postfix
>inc/dec), and uses static casts for the two member functions, op-> and
>op[]).
>
>I've compiled with g++ and it should work with SGI CC as well.
>
>I've also attached a short test program.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk