diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2022-03-14 00:59:17 +0000 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2022-03-14 00:59:17 +0000 |
commit | e0f8297e3e57512c423c571fb4dde5ced594e803 (patch) | |
tree | a83627887444d1d9a55acef48edf2e3acde86d63 /libadhocutil/plugins.h | |
parent | Don't take string_view by reference (diff) | |
download | libadhocutil-e0f8297e3e57512c423c571fb4dde5ced594e803.tar.bz2 libadhocutil-e0f8297e3e57512c423c571fb4dde5ced594e803.tar.xz libadhocutil-e0f8297e3e57512c423c571fb4dde5ced594e803.zip |
Lots of perfect forwarding over const refs
Diffstat (limited to 'libadhocutil/plugins.h')
-rw-r--r-- | libadhocutil/plugins.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libadhocutil/plugins.h b/libadhocutil/plugins.h index 7ae5bba..decb9ef 100644 --- a/libadhocutil/plugins.h +++ b/libadhocutil/plugins.h @@ -13,6 +13,7 @@ #include <string> #include <string_view> #include <typeinfo> +#include <utility> namespace std { DLL_PUBLIC @@ -146,9 +147,9 @@ namespace AdHoc { */ template<typename T, typename I, typename... Args> void - create(const std::string_view n, const std::string_view f, int l, const Args &... args) + create(const std::string_view n, const std::string_view f, int l, Args &&... args) { - add<T>(std::make_shared<I>(args...), n, f, l); + add<T>(std::make_shared<I>(std::forward<Args>(args)...), n, f, l); } /** |