Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2005-03-14 15:12:05


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.


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