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 , 7 years ago
comment:2 by , 7 years ago
Visual studio doesn't support it see https://blogs.msdn.microsoft.com/vcblog/2013/12/02/c1114-core-language-features-in-vs-2013-and-the-nov-2013-ctp/
Attributes line
Same for 2015 https://blogs.msdn.microsoft.com/vcblog/2014/11/17/c111417-features-in-vs-2015-preview/
comment:3 by , 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.
comment:5 by , 5 years ago
Component: | UI & Simulation → Core engine |
---|
Move tickets to their correct component.
Is it supported by GCC 4.6 and VS2013? Also it'd good to have
override
anddefault/delete
instead of= 0;
.