I make the assumption that no-one is likely to have used the previous IsNotDerivedFromReporter in Reporter.h... To guard against it being used in future, I've followed the practice these days of putting it in to a Detail namespace.
Thanks to the godbolt link in Mika's earlier comment, I was able to confirm with non-compiling code that the std::decay really was needed - and I added a test case that shows two cases that do compile correctly, and some commented out code that doesn't compile, if activated, to at least show my working...
This captures what I learned from this really helpful comment by @mika-fischer
https://github.com/approvals/ApprovalTests.cpp/issues/33#issuecomment-542548813
I make the assumption that no-one is likely to have used the previous IsNotDerivedFromReporter in Reporter.h... To guard against it being used in future, I've followed the practice these days of putting it in to a Detail namespace.
Thanks to the godbolt link in Mika's earlier comment, I was able to confirm with non-compiling code that the
std::decay
really was needed - and I added a test case that shows two cases that do compile correctly, and some commented out code that doesn't compile, if activated, to at least show my working...