
23 Jul
2008
23 Jul
'08
1:08 p.m.
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