mirror of
https://github.com/ETLCPP/etl.git
synced 2026-06-30 06:18:50 +08:00
Modified etl::is_delegate to inherit from etl::bool_constant
This commit is contained in:
parent
71b691f7fe
commit
6461094830
@ -180,9 +180,8 @@ namespace etl
|
||||
/// is_delegate
|
||||
//***************************************************************************
|
||||
template <typename T>
|
||||
struct is_delegate
|
||||
struct is_delegate : etl::bool_constant<etl::is_base_of<delegate_tag, T>::value>
|
||||
{
|
||||
static const bool value = etl::is_base_of<delegate_tag, T>::value;
|
||||
};
|
||||
|
||||
//*************************************************************************
|
||||
@ -192,7 +191,8 @@ namespace etl
|
||||
class delegate;
|
||||
|
||||
template <typename TReturn, typename TParam>
|
||||
class delegate<TReturn(TParam)> : public private_delegate::call_if_impl<delegate<TReturn(TParam)>, TReturn, TParam>, public delegate_tag
|
||||
class delegate<TReturn(TParam)> : public private_delegate::call_if_impl<delegate<TReturn(TParam)>, TReturn, TParam>,
|
||||
public delegate_tag
|
||||
{
|
||||
private:
|
||||
|
||||
|
||||
@ -95,16 +95,13 @@ namespace etl
|
||||
/// is_delegate
|
||||
//***************************************************************************
|
||||
template <typename T>
|
||||
struct is_delegate
|
||||
struct is_delegate : etl::bool_constant<etl::is_base_of<delegate_tag, T>::value>
|
||||
{
|
||||
static constexpr bool value = etl::is_base_of<delegate_tag, T>::value;
|
||||
};
|
||||
|
||||
#if ETL_USING_CPP17
|
||||
|
||||
template <typename T>
|
||||
inline constexpr bool is_delegate_v = is_delegate<T>::value;
|
||||
|
||||
#endif
|
||||
|
||||
//*************************************************************************
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user