[cairo] [cairomm] RefPtr<T>::operator*() ?
jonathon at quotidian.org
Wed Aug 20 06:49:59 PDT 2008
Ian Britten wrote:
> Hi all,
> Just a suggestion, but it might be nice if the cairomm RefPtr
> class had an operator*() (Or, a get(), or something).
> Otherwise, if func() is written to accept a "const T &", you
> have to write code like:
> Cairo::RefPtr<T> someObj; (Populated from somewhere)
> func( *someObj.operator->() );
> instead of the simpler/cleaner
> func( *someObj );
> cairo mailing list
> cairo at cairographics.org
If there is API in cairomm that accepts a 'const T&' where T is supposed
to be used via RefPtr, it is likely an API bug. Unfortunately I
discovered one of these just in the last couple days (the ScaledFont
constructor) and plan to fix it in a future release. If you find
further places where this is the case, please file a bug.
More information about the cairo