diff options
author | Alexey Rusakov <Kitsune-Ral@users.sf.net> | 2022-09-07 09:25:27 +0200 |
---|---|---|
committer | Alexey Rusakov <Kitsune-Ral@users.sf.net> | 2022-09-09 18:17:26 +0200 |
commit | d863324d07ffafc2afcd65ab1655f1d1d01d1abc (patch) | |
tree | a53623dfcadecd90caa6b46ac3c63cfe7be14d89 /lib | |
parent | a3ab7dc4bc7cd538d922ea69d2dad158e7bc9770 (diff) | |
download | libquotient-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.h | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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; } }; } |