> On 04/25/2013 10:35 AM, Noel Grandin wrote: > >I want to change things so that I can write: > > void bar() { > > Reference<B> b = .... > > methodThatTakesA( b ); > > } > Yeah. One of my older pet peeves...
Stephan Bergmann wrote: > This has been discussed before more than once, but I tend to forget > whether it has never gone past discussion stage because the > implementation would be slightly tricky (using SFNIAE to restrict > implicit conversions from Reference<B> to Reference<A> to cases > where B is derived from A) or because there was some fundamental > flaw with it. > Works by and large with the proof of concept from https://gerrit.libreoffice.org/#/c/3698/ , the only problem I recall, is a slight performance degradation, since IIRC then operator Reference<XInterface>& needs to go due to ambiguities (which avoids temporaries). Possibly offset nicely by needing much less queryInterfaces... Cheers, -- Thorsten
signature.asc
Description: Digital signature
_______________________________________________ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice