PoolEntry: Allowing new std::initializer_list in constructor #71
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#71
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
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?
The new std::initializer_list is very useful
for initializations of variable length data like
found in the global datapool. It's the perfect addition for
the global datapool.
An additional constructor would allow using
0 initialization in the global pool like shown:
I also added boolean as a possible pool entry.
Problem is: if someone tries to make a boolean datapool entry
(which can very likely happen), there are weird errors that don't really
tell where the mistake is coming from. In my opinion, enforcing the non-usage of booleans should be policy-based.
PoolEntry: Allowing new std::initialize_list in constructorto PoolEntry: Allowing new std::initializer_list in constructorThe issue with boolean Pool Entries was part of the old implementation as well. I have to check how we get the compiler to tell us the error before the linker will throw a more difficult-to-understand error at us. But a linker error is still better than a run-time error.
compile time check now included, using type_traits.
We still need a better message / explanation though :-)