[RFC] libstdc++: Allow function parameter reflections in annotations_of[_with_type]
Septicake
septicake056@gmail.com
Thu Apr 2 02:39:06 GMT 2026
It seems I simply cannot win in this fight, so I'm going to drop the
attempt at fancy formatting and simply copy and paste this time:
>
Hello all,
With P3795R2 suggesting the inclusion of function parameter reflections as
a valid input to the annotations_of family of meta functions, I've done my
own work implementing it and it seems to be a single line change in
eval_annotations_of.
I've done some personal testing, and it seems to work fine, but I'm now
working on writing testcases and I'm wondering what edge cases come to mind
for others. I've gotten simple ones down, such as checking that the
annotation count is the total of all function declarations, that the
correct annotations match between the reflection of the variable within the
function's scope and its equivalent parameter reflection, and that
annotations_of_with_type returns the correct annotation instance and count,
but I would like to know if there are any other possible edge cases that
I'm missing here.
Of course time is the best test and users will find anything I don't, but
I'd like to limit the amount of bugs that slip through the cracks before I
create a proper patch however possible and any help in that is greatly
appreciated.
Best regards,
October Reese
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://gcc.gnu.org/pipermail/libstdc++/attachments/20260401/8b357045/attachment.htm>
More information about the Libstdc++
mailing list