From 20b19d9cfe2fbb8cd9acabd4f51d91372a59aac7 Mon Sep 17 00:00:00 2001 From: Roland Conybeare Date: Fri, 22 Sep 2023 12:15:43 -0400 Subject: [PATCH] tidy: forward instead of move in tag_impl --- include/indentlog/print/tag.hpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/include/indentlog/print/tag.hpp b/include/indentlog/print/tag.hpp index 6c7eafbb..7d4a0abc 100644 --- a/include/indentlog/print/tag.hpp +++ b/include/indentlog/print/tag.hpp @@ -29,7 +29,7 @@ namespace xo { tag_impl(Name const & n, Value const & v) : name_{n}, value_{v} {} tag_impl(Name && n, Value && v) - : name_{std::move(n)}, value_{std::move(v)} {} + : name_{std::forward(n)}, value_{std::forward(v)} {} Name const & name() const { return name_; } Value const & value() const { return value_; } @@ -72,6 +72,8 @@ namespace xo { return tag_impl(n, ""); } /*xtag_pre*/ + // ----- tag ----- + template tag_impl tag(Name && n, Value && v) @@ -86,6 +88,8 @@ namespace xo { return tag_impl(n, v); } /*tag*/ + // ----- operator<< on tag_impl ----- + template inline std::ostream & operator<<(std::ostream &s,