Is a RETURN_ON_NULLPTR() macro bad code? (cpp:S960)

I have tried std//tl::expected now.
I have also worked with monadic methods, which does eliminates the if(error) return; duplication but brings other duplications (and_then(), lambda overhead: []{return}) which is subjectively worse.

I must say, that I prefer the “PRE” solution from above. This is less code and imho easier to comprehend. Especially for “traditional developers” that need to review or maintain the code.
Of course you need the correct structure for this to work (RAII cleanup of unneeded objects), but then using the PRE macro is the best compromise.

So I come to the conclusion, that minimal macros when deduplication error handling are not bad code and can be rightfully Accepted (or Won’t Fix or NOSONAR).