From 7807ddae57b31d0e22722d8a562784d543a61b8e Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 17 Jul 2018 20:23:27 +0200 Subject: [PATCH] config/Param: allow moving the value --- src/config/Param.hxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/config/Param.hxx b/src/config/Param.hxx index 29338dd69..2b03caf2f 100644 --- a/src/config/Param.hxx +++ b/src/config/Param.hxx @@ -47,9 +47,10 @@ struct ConfigParam { explicit ConfigParam(int _line=-1) :line(_line) {} + template gcc_nonnull_all - explicit ConfigParam(const char *_value, int _line=-1) noexcept - :value(_value), line(_line) {} + explicit ConfigParam(V &&_value, int _line=-1) noexcept + :value(std::forward(_value)), line(_line) {} ConfigParam(const ConfigParam &) = delete;