base/include: use C++20 function template syntax

Issue #5227
This commit is contained in:
Norman Feske
2024-05-22 16:35:38 +02:00
committed by Christian Helmuth
parent 48d6f0220c
commit 5e862b2cd3
38 changed files with 173 additions and 254 deletions

View File

@ -771,12 +771,12 @@ class Genode::String
* may fit perfectly into the buffer or may have been truncated.
* In general, it would be safe to assume the latter.
*/
template <typename T, typename... TAIL>
String(T const &arg, TAIL &&... args)
template <typename T>
String(T const &head, auto &&... tail)
{
/* initialize string content */
Local_output output(_buf);
Genode::print(output, arg, args...);
Genode::print(output, head, tail...);
/* add terminating null */
_buf[output.num_chars()] = 0;