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

Issue #5227
This commit is contained in:
Norman Feske
2024-05-22 17:22:53 +02:00
committed by Christian Helmuth
parent 5e862b2cd3
commit cfd013a01a
32 changed files with 183 additions and 293 deletions

View File

@ -39,14 +39,13 @@ struct File_system::Connection : Genode::Connection<Session>, Session_client
*
* \noapi
*/
template <typename FUNC>
auto _retry(FUNC func) -> decltype(func())
auto _retry(auto const &fn) -> decltype(fn())
{
enum { UPGRADE_ATTEMPTS = ~0U };
return Genode::retry<Out_of_ram>(
[&] () {
return Genode::retry<Out_of_caps>(
[&] () { return func(); },
[&] () { return fn(); },
[&] () { File_system::Connection::upgrade_caps(2); },
UPGRADE_ATTEMPTS);
},