I'm testing some code for some of my students who are taking an introductory course in C++. I'd like to test whether or not some of their methods accept arguments that aren't changed as const references but other than writing a script that would parse the text in their code I can't really think of any clever way to check this.
I thought of trying to pass an Rvalue to their method, if they only accept by reference the code won't compile but this doesn't stop them from receiving their arguments simply by value.
Thanks!