From 6461094830c68392318ededbf9c8ebfb296483d1 Mon Sep 17 00:00:00 2001 From: John Wellbelove Date: Mon, 21 Oct 2024 09:10:13 +0100 Subject: [PATCH] Modified etl::is_delegate to inherit from etl::bool_constant --- include/etl/private/delegate_cpp03.h | 6 +++--- include/etl/private/delegate_cpp11.h | 5 +---- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/include/etl/private/delegate_cpp03.h b/include/etl/private/delegate_cpp03.h index 5a1798cb..9e6ca70a 100644 --- a/include/etl/private/delegate_cpp03.h +++ b/include/etl/private/delegate_cpp03.h @@ -180,9 +180,8 @@ namespace etl /// is_delegate //*************************************************************************** template - struct is_delegate + struct is_delegate : etl::bool_constant::value> { - static const bool value = etl::is_base_of::value; }; //************************************************************************* @@ -192,7 +191,8 @@ namespace etl class delegate; template - class delegate : public private_delegate::call_if_impl, TReturn, TParam>, public delegate_tag + class delegate : public private_delegate::call_if_impl, TReturn, TParam>, + public delegate_tag { private: diff --git a/include/etl/private/delegate_cpp11.h b/include/etl/private/delegate_cpp11.h index 1a276bb3..9c566c36 100644 --- a/include/etl/private/delegate_cpp11.h +++ b/include/etl/private/delegate_cpp11.h @@ -95,16 +95,13 @@ namespace etl /// is_delegate //*************************************************************************** template - struct is_delegate + struct is_delegate : etl::bool_constant::value> { - static constexpr bool value = etl::is_base_of::value; }; #if ETL_USING_CPP17 - template inline constexpr bool is_delegate_v = is_delegate::value; - #endif //*************************************************************************