From d863324d07ffafc2afcd65ab1655f1d1d01d1abc Mon Sep 17 00:00:00 2001 From: Alexey Rusakov Date: Wed, 7 Sep 2022 09:25:27 +0200 Subject: makeImpl: add support for aggregate initialisation Since C++17, parentheses only work when a constructor is there, while braces allow both calling a constructor and aggregate initialisation. --- lib/util.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/util.h b/lib/util.h index 1cb1c0e1..9efda5d1 100644 --- a/lib/util.h +++ b/lib/util.h @@ -160,7 +160,7 @@ template makeImpl(ArgTs&&... args) { return ImplPtr { - new ImplType(std::forward(args)...), + new ImplType{std::forward(args)...}, [](TypeToDelete* impl) { delete impl; } }; } -- cgit v1.2.3