Boost logo

Boost Users :

From: Duane Murphy (duanemurphy_at_[hidden])
Date: 2004-12-17 20:17:34


I am changing a code base that previously was using the no longer
supported array_traits. I use the begin() and end() functions in a lot of
places with arrays of integers.

I have converted everything to using boost::range::begin() and end().
However, there is a severe collision. begin() and more importantly end()
are overloaded for wchar_t. Turns out on Mac OS X, wchar_t is the same as
an int. This causes end() to look for a null terminator instead of just
using the array length template function.

Is there a way I can make range::end() work for real array's of int
rather than wchar_t?

Thanks for any tips,

 ...Duane


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net