Commit 7807ddae authored by Max Kellermann's avatar Max Kellermann

config/Param: allow moving the value

parent 566af682
...@@ -47,9 +47,10 @@ struct ConfigParam { ...@@ -47,9 +47,10 @@ struct ConfigParam {
explicit ConfigParam(int _line=-1) explicit ConfigParam(int _line=-1)
:line(_line) {} :line(_line) {}
template<typename V>
gcc_nonnull_all gcc_nonnull_all
explicit ConfigParam(const char *_value, int _line=-1) noexcept explicit ConfigParam(V &&_value, int _line=-1) noexcept
:value(_value), line(_line) {} :value(std::forward<V>(_value)), line(_line) {}
ConfigParam(const ConfigParam &) = delete; ConfigParam(const ConfigParam &) = delete;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment