Placing [[nodisard]] at the end of a function instead of the beginning

Hello,

Simple question, how can I have ReSharper suggest moving [[nodiscard]] to the end of a function instead of the beginning? I hate how busy it makes the header files using it at the start of the function.

Thank you.

0
3 comments

Hello,

Could you please clarify what you mean by “end of a function”? Do you prefer int f [[nodiscard]] (); to [[nodiscard]] int f();?

0

Sorry, I'm getting back so late. Yes, the former over the latter.

int f [[nodiscard]] ();

0

I've filed RSCPP-36556 to track this, but I've never seen this style used in a code base.

0

Please sign in to leave a comment.