Status: New
Owner: ----

New issue 879 by [email protected]: Why does Handle<T>::operator*() return T* instead of T& ?
http://code.google.com/p/v8/issues/detail?id=879

On classes aiming to act like pointers, such as v8::Handle, operator->() usually returns T*, but doesn't operator*() usually return T&?

By returning T*, you have to do a double-dereference to get a reference to the actual type:

void foo(const String &arg) {}
//...
Handle<String> x = someFunction();
foo(**x); // unfortunate

Am I missing something obvious? :)

Of course, changing this probably breaks a bunch of code :(

Thanks.

--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to