Moving template implementation to .tpp #65
Labels
No Label
API Change
Breaking API Change
bug
build
cosmetics
Documentation
duplicate
feature
help wanted
hotfix
invalid
question
Refactor
Tests
wontfix
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: fsfw/fsfw#65
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
When writing template classes, function have to be implemented directly in the header.
However, it is still possible to separate the interface (declarations) from the implementation by using a neat trick. I made use of this to make the interface to separate the local pool declarations from the implementation.
Trick taken from: https://stackoverflow.com/questions/495021/why-can-templates-only-be-implemented-in-the-header-file
If using eclipse, this is useful: https://blog.roland-speith.de/?p=1066
IMPORTANT: *.tpp is chosen for a reason, its not a source file. naming it to *.cpp might lead to the build system doing things it should not do
This is not a regular source file. The file is simply included at the end of the header and is still a part of the header. It's just a nice trick to separate interface from implementation.
muellerr referenced this issue2020-05-04 17:11:48 +02:00
I like the idea of separating those in two files but I don't see this as a bug.
Was implemented for some storagemanager clases now