Opened 7 years ago

Last modified 5 years ago

#4403 new task

Make component classes final

Reported by: wraitii Owned by:
Priority: Should Have Milestone: Backlog
Component: Core engine Keywords:
Cc: Patch:

Description

Rationale: read this and this this. Basically: our component classes cannot be inherited from (they are final). We should show this semantically. I'm not actually sure it'd help with devirtualization, but it probably can't hurt.

So we should add "final" to our C++ components.

If you feel very strongly against this, please speak now or forever hold your tongue.

Change History (5)

comment:1 by Vladislav Belov, 7 years ago

Is it supported by GCC 4.6 and VS2013? Also it'd good to have override and default/delete instead of = 0;.

comment:3 by echotangoecho, 7 years ago

IMO, we can increase the minimal requirement for the GCC version to GCC 4.8 without affecting much (if any) users, (Ubuntu 12 LTS, which has GCC 4.6 as latest GCC version, has a lifetime ending in a few months). For visual studio, final is supported starting from MSVC 11 (http://en.cppreference.com/w/cpp/compiler_support).

EDIT: Additional note: default/delete is already supported from all compilers we minimally require currently, as can be seen from the link I posted.

Last edited 7 years ago by echotangoecho (previous) (diff)

comment:4 by elexis, 7 years ago

Milestone: Alpha 22Backlog

Backlogging due to lack of progress

comment:5 by Imarok, 5 years ago

Component: UI & SimulationCore engine

Move tickets to their correct component.

Note: See TracTickets for help on using tickets.