"Duane Murphy" wrote in message
news:20041218011734.1390@linux.murphyslogic.com...
|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.
I don't get it. wchar_t should be a distinct type, in particular *different*
from int.
What compiler are you using ?
| 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?
Its crappy, but boost::range_detail::array_end<int>( my_array )
will pick the index based computation.
-Thorsten
--
Thorsten Ottosen
----------------------------
Dezide Aps -- Intelligent Customer Support:
www.dezide.com
Aalborg University --- Decision Support Systems:
http://www.cs.aau.dk/index2.php?content=Research/bss
C++ Boost:
www.boost.org
C++ Standard:
http://www.open-std.org/JTC1/SC22/WG21/