[Development] Suggested addition to wiki.qt.io/Coding_Conventions

Marc Mutz marc.mutz at kdab.com
Thu May 14 02:15:54 CEST 2015


On Wednesday 13 May 2015 23:36:29 Olivier Goffart wrote:
> On Thursday 14. May 2015 05:57:54 Thiago Macieira wrote:
> > You cannot compare the addresses [of inline methods]
> > This is intentional and if you rely on that, your code is flawed by
> > design.
> 
> Why not?
> The C++ standards does not forbid it. It defines that it works. I see no
> exceptions for inline functions in ยง5.10 (C++14).
> 
> We rely on this when connecting using function pointers to inline slot with
> Qt::UniqueConnection
> 
> So if the two connect statements are in different library that might
> fails...

The standard doesn't talk about DLLs and SOs. Semantics of those constructs is 
supplied by the platform ABI, not std-C++.

Thanks,
Marc

-- 
Marc Mutz <marc.mutz at kdab.com> | Senior Software Engineer
KDAB (Deutschland) GmbH & Co.KG, a KDAB Group Company
Tel: +49-30-521325470
KDAB - The Qt Experts



More information about the Development mailing list