aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAlexey Rusakov <Kitsune-Ral@users.sf.net>2022-09-07 09:25:27 +0200
committerAlexey Rusakov <Kitsune-Ral@users.sf.net>2022-09-09 18:17:26 +0200
commitd863324d07ffafc2afcd65ab1655f1d1d01d1abc (patch)
treea53623dfcadecd90caa6b46ac3c63cfe7be14d89 /lib
parenta3ab7dc4bc7cd538d922ea69d2dad158e7bc9770 (diff)
downloadlibquotient-d863324d07ffafc2afcd65ab1655f1d1d01d1abc.tar.gz
libquotient-d863324d07ffafc2afcd65ab1655f1d1d01d1abc.zip
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.
Diffstat (limited to 'lib')
-rw-r--r--lib/util.h2
1 files changed, 1 insertions, 1 deletions
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 <typename ImplType, typename TypeToDelete = ImplType, typename... ArgTs
inline ImplPtr<ImplType, TypeToDelete> makeImpl(ArgTs&&... args)
{
return ImplPtr<ImplType, TypeToDelete> {
- new ImplType(std::forward<ArgTs>(args)...),
+ new ImplType{std::forward<ArgTs>(args)...},
[](TypeToDelete* impl) { delete impl; }
};
}