Construct tuple in in string builder directly
This commit is contained in:
parent
8744cf95ef
commit
bf8e0db87f
|
@ -241,11 +241,6 @@ constexpr void append(StringType &target, TupleType &&tuple, typename StringType
|
||||||
return TupleToString<StringType, TupleType, std::tuple_size_v<std::decay_t<TupleType>>>::append(std::forward<TupleType>(tuple), target);
|
return TupleToString<StringType, TupleType, std::tuple_size_v<std::decay_t<TupleType>>>::append(std::forward<TupleType>(tuple), target);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename... Elements> constexpr std::tuple<Elements &&...> makeTupleHoldingRefsToTemporaryObjects(Elements &&... args) noexcept
|
|
||||||
{
|
|
||||||
return std::tuple<Elements &&...>(std::forward<Elements>(args)...);
|
|
||||||
}
|
|
||||||
|
|
||||||
} // namespace Helper
|
} // namespace Helper
|
||||||
/// \endcond
|
/// \endcond
|
||||||
|
|
||||||
|
@ -262,7 +257,7 @@ template <class StringType = std::string, class... Args> inline StringType tuple
|
||||||
|
|
||||||
template <class StringType = std::string, class... Args> inline StringType argsToString(Args &&... args)
|
template <class StringType = std::string, class... Args> inline StringType argsToString(Args &&... args)
|
||||||
{
|
{
|
||||||
return tupleToString(Helper::makeTupleHoldingRefsToTemporaryObjects(std::forward<Args>(args)...));
|
return tupleToString(std::tuple<Args &&...>(std::forward<Args>(args)...));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
|
Loading…
Reference in New Issue