[vsipl++] [patch] Fix pointer comparison
Stefan Seefeld
stefan at codesourcery.com
Mon Jun 16 20:54:11 UTC 2008
Jules Bergmann wrote:
>
>> This patch fixes that by introducing an 'is_same_ptr' that can compare
>> pointers of different types.
>
> Revised to limit application to pointers only.
This patch looks good. Though I imagine that
template <typename T1, typename T2>
inline bool
is_same_ptr(T1 *ptr1, T2 *ptr2)
{
return Is_same_ptr<T1*, T2*>::compare(ptr1, ptr2);
}
would result in a simpler error message "no matching function for call
to 'is_same_ptr(non-pointer-type1, non-pointer-type2)'".
Thanks,
Stefan
--
Stefan Seefeld
CodeSourcery
stefan at codesourcery.com
(650) 331-3385 x718
More information about the vsipl++
mailing list