ApprovalTests.v.8.3.0.hpp(2385): warning C26444: Avoid unnamed objects with custom construction and destruction (es.84).
Looking at the results of Visual Studio code analysis on my project using the default Microsoft Native Recommended Rules with the latest ApprovalTests header I see this warning:
ApprovalTests.v.8.3.0.hpp(2385): warning C26444: Avoid unnamed objects with custom construction and destruction (es.84).
explicit CIBuildOnlyReporter(std::shared_ptr<Reporter> reporter = std::make_shared<QuietReporter>())
: m_reporter(reporter)
{
}

Thanks Alastair. I've read the help... https://docs.microsoft.com/en-us/visualstudio/code-quality/c26444?view=vs-2019
I'm not spotting what the unnamed - discarded - thing is... Can you see it?
I also can't load the screenshot image - I get:
Secure Connection Failed
An error occurred during a connection to user-images.githubusercontent.com. Cannot communicate securely with peer: no common encryption algorithm(s).
Error code: SSL_ERROR_NO_CYPHER_OVERLAP
I've been seeing this more and more in GitHub issues recently - did the image contain anything that wasn't in the text body of the report?
It was just a screenshot of where VS is putting the green squiggles. Basically it's under this:
explicit CIBuildOnlyReporter(std::shared_ptr<Reporter> reporter =
I am not sure I understand the issue it's flagging up but as it's the only code analysis warning I am seeing in my project i thought I would flag it up before disabling it with a pragma in my codebase.
I see the warning in VS2019 - and changing the code like this makes it go away, i.e. passing the argument as a const reference...
public:
- explicit CIBuildOnlyReporter(std::shared_ptr<Reporter> reporter =
+ explicit CIBuildOnlyReporter(const std::shared_ptr<Reporter>& reporter =
std::make_shared<QuietReporter>())
: m_reporter(reporter)
{
I assume/speculate that it's something to do with the internals of std::shared_ptr...
We are placing this on hold until we see it on a windows machine.