From 5dda4084df996ea48f606c5ecccc164cbf3f1230 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Mon, 2 Oct 2023 21:23:45 +0200 Subject: [PATCH] util/BindMethod: use `using` instead of `typedef` --- src/util/BindMethod.hxx | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/util/BindMethod.hxx b/src/util/BindMethod.hxx index 3dc761ba9..1ec985280 100644 --- a/src/util/BindMethod.hxx +++ b/src/util/BindMethod.hxx @@ -20,7 +20,7 @@ template class BoundMethod { - typedef R (*function_pointer)(void *instance, Args... args) noexcept(NoExcept); + using function_pointer = R (*)(void *, Args...) noexcept(NoExcept); void *instance_; function_pointer function; @@ -68,24 +68,22 @@ struct SignatureHelper { /** * The class which contains the given method (signature). */ - typedef T class_type; + using class_type = T; /** * A function type which describes the "plain" function * signature. */ - typedef R plain_signature(Args...) noexcept(NoExcept); + using plain_signature = R (Args...) noexcept(NoExcept); - typedef R (*function_pointer)(void *instance, - Args...) noexcept(NoExcept); + using function_pointer = R (*)(void *, Args...) noexcept(NoExcept); }; template struct SignatureHelper { - typedef R plain_signature(Args...) noexcept(NoExcept); + using plain_signature = R (Args...) noexcept(NoExcept); - typedef R (*function_pointer)(void *instance, - Args...) noexcept(NoExcept); + using function_pointer = R (*)(void *, Args...) noexcept(NoExcept); }; /**