[fpc-devel] constref in Windows

Joost van der Sluis joost at cnoc.nl
Fri Nov 19 14:33:12 CET 2010

On Fri, 2010-11-19 at 13:34 +0100, Marco van de Voort wrote:
> In our previous episode, Joost van der Sluis said:
> > 1: Change the behavior of const-parameters. That can lead to
> > unpredictable problems which are not noticed by the compiler. It could
> > be an option to use some setting to define the behavior of 'const', but
> > in that case that setting have to be set for all units that do a call to
> > QueryInterface. (ie: all code using interfaces, so it means this setting
> > has to be set everywhere where COM code is used)
> Only code that actually overrides those methods, not all interface code.

No, also the places where QueryInterface is called. Because the caller
need to know that it has to pass the GUID by reference, not value. So
the caller need to know that 'const' actually means 'constref' in this


More information about the fpc-devel mailing list