Hey all,
So my current codebase contains both functions that have normal return values as well as out parameters. However, I recently had a difficult to find bug because I treated a function with a return value as an out parameter function and so I never stored the return value. I also find it difficult to know, just by looking at some code, which function parameters are being modified within a function and which aren't. So I want to convert things so that most if not all of functions return a value (or values with C++17 structured bindings) instead of having out parameters. While I'm making the transition however, I was wondering if there was a compiler warning that I can set to specifically check to see if a function's return value was captured or not, since old habits die hard lol. If not, then what are you preferred methods for dealing with the described issues above (if you had issues like I do now)?