[poppler] C++11 in poppler: adding override
adam.reichold at t-online.de
Thu Feb 23 17:48:27 UTC 2017
Am 22.02.2017 um 23:48 schrieb Albert Astals Cid:
> El dimecres, 22 de febrer de 2017, a les 18:37:16 CET, Carlos Garcia Campos va
> What classes/methods we have that we know for sure final and should never be
Marking something final could also be understood as "I do not think that
anyone overrides this one. Compiler, please go and check that for me."
instead of "This one should never, under any circumstances be
overriden.". In that case, the answer would be that everything with a
vtable should be final (in the internal code base at least) until
someone finds a need to override it.
This way, final will become a local hint to the global structure of the
code instead of the deliberate design choice to seal a type or method
implementation for good. I guess it is a question of style preferences
as to which interpretation is chosen.
Best regards, Adam.
> If noone disagrees strongly on March 8 i'll commit a patch adding override
> to the functions that override to make sure we don't forget something
> when changing one of the lots of virtual functions we have around.
I am not sure if it is worth the hassle, but since all of this is about
catching things at compile time and has little value at runtime, one
could create a define POPPLER_OVERRIDE that becomes empty on older
compilers not supporting C++11, so that this would not decrease compiler
coverage at all.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 473 bytes
Desc: OpenPGP digital signature
More information about the poppler