|
Boost : |
From: Angel Tsankov (fn42551_at_[hidden])
Date: 2008-07-23 09:08:22
viboes wrote:
> Angel Tsankov wrote:
>>
>> vicente.botet wrote:
>>>
>>> What is the expected calue of c? It is not 0?
>>> T t;
>>> UnnullablePtr<T> a(t);
>>> UnnullablePtr<T> b(t);
>>> UnnullablePtr<T> c(t);
>>>
>>> c=a-b;
>>>
>> This does not compile. More precisely,
>> int i = a-b; // i = 0;
>> c = i; // Error: int cannot be converted to UnnullablePtr<T> (neither
>> implicitly, nor explicitly)
>>
> My intent was to know how subtracting unnullable_ptr's works
>
Currently, subtracting unnullable_ptr's works by first calling 'operator
T*() const' on each of the unnullable pointers and then subtracting the
returned C pointers.
>
> Thanks for clarification.
>
You are welcome.
Regards,
Angel Tsankov
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk