approvals / ApprovalTests.cpp

Native ApprovalTests for C++ on Linux, Mac and Windows
https://approvaltestscpp.readthedocs.io/en/latest/
Apache License 2.0
318 stars 51 forks source link

Remove need to supply template type to Approvals::verify() #24

Closed claremacrae closed 5 years ago

claremacrae commented 5 years ago

Feedback on the docs:

Tutorial page, the syntax for passing an output stream overload lambda to the verify call requires you to explicitly pass in the template type Approvals::verify(stuff); is that also a place where you're aiming to not need to pass the template type explicitly?

I now know how to fix this, using the same SFINAE fix that I used for the Combinations tests.

Based on my initial checks, users won't need to update their code, though they could simplify it if they want.

I'd really like to do this - it will simplify slides talks, and the tutorial too.

claremacrae commented 5 years ago

Attached file is my implementation of this, shelved in CLion - I'm saving it here as a way to transport it to a different machine.

F_Simplify_template_calls_to_Approvals__verify()_template_overloads.patch.txt