catch3
Progmasoft Catch3: an independently maintained C++17 test framework with a parallel runner, property checks, snapshots and structured results.
Clonegit clone https://git.progmasoft.com/catch3
Use make_unique when registering an exception translator
- Commit
0a8516aeeac9e3e683a0638b2cdae2fb0c126bfa- Author
- Martin Hořeňovský ·
- Parents
928ecbaccf7f
Changes
src/catch2/catch_translate_exception.hpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/catch2/catch_translate_exception.hpp b/src/catch2/catch_translate_exception.hpp index 6053a10b..dfd95cd6 100644 --- a/src/catch2/catch_translate_exception.hpp +++ b/src/catch2/catch_translate_exception.hpp @@ -49,9 +49,7 @@ namespace Catch { template<typename T> ExceptionTranslatorRegistrar( std::string(*translateFunction)( T const& ) ) { getMutableRegistryHub().registerTranslator( - Detail::unique_ptr<IExceptionTranslator>( - new ExceptionTranslator<T>( translateFunction ) - ) + Detail::make_unique<ExceptionTranslator<T>>(translateFunction) ); } };