
14 Mar
2005
14 Mar
'05
8:12 p.m.
Eric Niebler wrote:
Peter Dimov wrote:
Eric Niebler wrote:
+// Borland doesn't like casting an array reference to a char reference +// but thes overloads work around the problem. +# if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) +template<typename T,std::size_t N> +T (*addressof(T (&t)[N]))[N] +{ + return reinterpret_cast<T(*)[N]>(&t); +}
Why are you reinterpret_casting &t to itself? Is this a Borland problem as well?
Russell added the reinterpret_casts to my patch. Russell, can you comment?
It's not that important, I was just curious. What's more important is that we don't seem to have a test case for the functionality. addressof_test is pretty basic.