Date: prev next · Thread: first prev next last
2013 Archives by date, by thread · List index


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

Attachment: signature.asc
Description: Digital signature


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.