Closed RiscadoA closed 1 month ago
PR Preview Action v1.4.7
:---:
:rocket: Deployed preview to https://GameDevTecnico.github.io/cubos/preview/pr-1289/
on branch gh-pages
at 2024-08-02 08:03 UTC
Attention: Patch coverage is 69.23077%
with 12 lines
in your changes missing coverage. Please review.
Project coverage is 36.26%. Comparing base (
fedd0bf
) to head (9392e47
).
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Description
This change was necessary due to the previous system being highly error prone. Before, if reflect was called for a type T without defined reflection included, a placeholder definition would be used which returned an anonymous type. Sadly, due to the C++ One Definition Rule, this meant that other source files using reflect, could return an anonymous type, even if the type's reflection definition was included!
Basically, previously a simple mistake such as forgetting to include an external reflection header could lead to a random reflection failure in the core of the library, such as a missing trait error. Now, the users must define reflection for all types, as there is no longer a fallback. To simplify this for the previous 'anonymous types', a new CUBOS_ANONYMOUS_REFLECT macro was added.
Checklist
Write new samples.