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

Thiago Macieira thiago.macieira at intel.com
Wed May 13 09:30:05 CEST 2015

On Wednesday 13 May 2015 10:25:57 Marc Mutz wrote:
> * it exports symbols that don't need exporting:
> ** private methods never called from user code
> ** methods of private nested structs and classes
> ** inline methods
> * exporting inline methods makes MSVC call the library implementation in
> debug  builds
> ** a copy of the function is placed in the library even though the library 
> itself may never use it
> ** exported inline functions can no longer be removed
> Thus, exporting the whole class should be the exception, when the implicit 
> vtable and the typeinfo objects need to be exported, too. Non-polymorphic 
> classes don't have any of these, so exporting the whole class is a case of 
> Premature Pessimization.

The drawbacks only appear in debug builds, so is this worth the uglification?
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center

More information about the Development mailing list