[[nodiscard]] is new, but returning structs worked before of course (at least since C99).
You can even integrate the struct declaration right into the return type:
https://www.godbolt.org/z/GGraK61M6
(which tbf though has limited usability)
You can even integrate the struct declaration right into the return type:
https://www.godbolt.org/z/GGraK61M6
(which tbf though has limited usability)
No comments yet.