Some minor changes from code review

This commit is contained in:
A.J. Beamon 2022-07-20 15:29:34 -07:00
parent 37b7666262
commit 51204163df
2 changed files with 4 additions and 3 deletions

View File

@ -462,6 +462,7 @@ TEST_CASE("fdbclient/Tuple/makeTuple") {
ASSERT(t1.getType(5) == Tuple::UTF8); ASSERT(t1.getType(5) == Tuple::UTF8);
ASSERT(t1.getType(6) == Tuple::NULL_TYPE); ASSERT(t1.getType(6) == Tuple::NULL_TYPE);
ASSERT(t1.getType(7) == Tuple::VERSIONSTAMP); ASSERT(t1.getType(7) == Tuple::VERSIONSTAMP);
ASSERT(t1.size() == 8);
return Void(); return Void();
} }

View File

@ -30,7 +30,7 @@
struct Tuple { struct Tuple {
struct UnicodeStr { struct UnicodeStr {
StringRef str; StringRef str;
UnicodeStr(StringRef str) : str(str) {} explicit UnicodeStr(StringRef str) : str(str) {}
}; };
Tuple() {} Tuple() {}
@ -97,7 +97,7 @@ struct Tuple {
// Use a fold expression to append each argument using the << operator. // Use a fold expression to append each argument using the << operator.
// https://en.cppreference.com/w/cpp/language/fold // https://en.cppreference.com/w/cpp/language/fold
(t << ... << args); (t << ... << std::forward<Types>(args));
return t; return t;
} }