message_packet updates

This commit is contained in:
John Wellbelove 2021-12-20 19:45:56 +00:00
parent 5d91228b76
commit 4f16b06368
2 changed files with 147 additions and 124 deletions

View File

@ -395,6 +395,7 @@ namespace etl
/*[[[cog
import cog
################################################
def generate_accepts_return(n):
cog.out(" return")
for i in range(1, n + 1):
@ -406,6 +407,7 @@ namespace etl
cog.out(" ")
cog.outl(";")
################################################
def generate_accepts_return_compile_time(n):
cog.out(" return")
for i in range(1, n + 1):
@ -417,6 +419,7 @@ namespace etl
cog.out(" ")
cog.outl(";")
################################################
def generate_accepts_return_compile_time_TMessage(n):
cog.outl(" ETL_CONSTANT etl::message_id_t id = TMessage::ID;")
cog.outl("")
@ -430,6 +433,7 @@ namespace etl
cog.out(" ")
cog.outl(";")
################################################
def generate_static_assert_cpp03(n):
cog.outl(" // Not etl::message_packet, not etl::imessage and in typelist.")
cog.out(" static const bool Enabled = (!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::message_packet<")
@ -444,11 +448,18 @@ namespace etl
cog.outl("")
cog.outl(" ETL_STATIC_ASSERT(Enabled, \"Message not in packet type list\");")
def generate_static_assert_cpp11():
################################################
def generate_static_assert_cpp11(n):
cog.outl(" // Not etl::message_packet, not etl::imessage and in typelist.")
cog.outl(" constexpr bool Enabled = (!etl::is_same<etl::remove_reference_t<TMessage>, etl::message_packet<TMessageTypes...>>::value &&")
cog.outl(" !etl::is_same<etl::remove_reference_t<TMessage>, etl::imessage>::value &&")
cog.outl(" etl::is_one_of<etl::remove_reference_t<TMessage>, TMessageTypes...>::value);")
cog.out(" static constexpr bool Enabled = (!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::message_packet<")
for i in range(1, n):
cog.out("T%d, " % i)
cog.outl("T%s> >::value &&" % n)
cog.outl(" !etl::is_same<typename etl::remove_reference<TMessage>::type, etl::imessage>::value &&")
cog.out(" etl::is_one_of<typename etl::remove_reference<TMessage>::type,")
for i in range(1, n):
cog.out("T%d, " % i)
cog.outl("T%s>::value);" % n)
cog.outl("")
cog.outl(" ETL_STATIC_ASSERT(Enabled, \"Message not in packet type list\");")
@ -515,14 +526,20 @@ namespace etl
cog.outl("")
cog.outl("#if ETL_CPP11_SUPPORTED && !defined(ETL_MESSAGE_PACKET_FORCE_CPP03_IMPLEMENTATION)")
cog.outl(" //********************************************")
cog.outl(" template <typename TMessage, typename = typename etl::enable_if<!etl::is_same<etl::remove_reference_t<TMessage>, etl::message_packet<TMessageHandlers...>>::value &&")
cog.outl(" !etl::is_same<etl::remove_reference_t<TMessage>, etl::imessage>::value &&")
cog.outl(" !etl::is_one_of<etl::remove_reference_t<TMessage>, TMessageHandlers...>>::value, int>::type>")
cog.out(" template <typename TMessage, typename = typename etl::enable_if<!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::message_packet<")
for n in range(1, int(Handlers)):
cog.out("T%s, " % n)
cog.outl("T%s> >::value &&" % int(Handlers))
cog.outl(" !etl::is_same<typename etl::remove_reference<TMessage>::type, etl::imessage>::value &&")
cog.out(" !etl::is_one_of<typename etl::remove_reference<TMessage>::type, ")
for n in range(1, int(Handlers)):
cog.out("T%s, " % n)
cog.outl("T%s>::value, int>::type>" % int(Handlers))
cog.outl(" explicit message_packet(TMessage&& msg)")
cog.outl(" : data()")
cog.outl(" , valid(true)")
cog.outl(" {")
generate_static_assert_cpp11()
generate_static_assert_cpp11(int(Handlers))
cog.outl(" }")
cog.outl("#else")
cog.outl(" //********************************************")
@ -795,14 +812,20 @@ namespace etl
cog.outl("")
cog.outl("#if ETL_CPP11_SUPPORTED && !defined(ETL_MESSAGE_PACKET_FORCE_CPP03_IMPLEMENTATION)")
cog.outl(" //********************************************")
cog.outl(" template <typename TMessage, typename = typename etl::enable_if<!etl::is_same<etl::remove_reference_t<TMessage>, etl::message_packet<TMessageHandlers...>>::value &&")
cog.outl(" !etl::is_same<etl::remove_reference_t<TMessage>, etl::imessage>::value &&")
cog.outl(" !etl::is_one_of<etl::remove_reference_t<TMessage>::type, TMessageHandlers...>::value, int>::type>")
cog.outl(" explicit message_packet(TMessage&& msg)")
cog.out(" template <typename TMessage, typename = typename etl::enable_if<!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::message_packet<")
for t in range(1, n):
cog.out("T%s, " % t)
cog.outl("T%s> >::value &&" % n)
cog.outl(" !etl::is_same<typename etl::remove_reference<TMessage>::type, etl::imessage>::value &&")
cog.out(" !etl::is_one_of<typename etl::remove_reference<TMessage>::type, ")
for t in range(1, n):
cog.out("T%s, " % t)
cog.outl("T%s>::value, int>::type>" % n)
cog.outl(" explicit message_packet(etl::imessage&& msg)")
cog.outl(" : data()")
cog.outl(" , valid(true)")
cog.outl(" {")
generate_static_assert_cpp11()
generate_static_assert_cpp11(n)
cog.outl(" }")
cog.outl("#else")
cog.outl(" //********************************************")

View File

@ -436,17 +436,17 @@ namespace etl
#if ETL_CPP11_SUPPORTED && !defined(ETL_MESSAGE_PACKET_FORCE_CPP03_IMPLEMENTATION)
//********************************************
template <typename TMessage, typename = typename etl::enable_if<!etl::is_same<etl::remove_reference_t<TMessage>, etl::message_packet<TMessageHandlers...>>::value &&
!etl::is_same<etl::remove_reference_t<TMessage>, etl::imessage>::value &&
!etl::is_one_of<etl::remove_reference_t<TMessage>, TMessageHandlers...>>::value, int>::type>
template <typename TMessage, typename = typename etl::enable_if<!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::message_packet<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16> >::value &&
!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::imessage>::value &&
!etl::is_one_of<typename etl::remove_reference<TMessage>::type, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>::value, int>::type>
explicit message_packet(TMessage&& msg)
: data()
, valid(true)
{
// Not etl::message_packet, not etl::imessage and in typelist.
constexpr bool Enabled = (!etl::is_same<etl::remove_reference_t<TMessage>, etl::message_packet<TMessageTypes...>>::value &&
!etl::is_same<etl::remove_reference_t<TMessage>, etl::imessage>::value &&
etl::is_one_of<etl::remove_reference_t<TMessage>, TMessageTypes...>::value);
static constexpr bool Enabled = (!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::message_packet<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16> >::value &&
!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::imessage>::value &&
etl::is_one_of<typename etl::remove_reference<TMessage>::type,T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>::value);
ETL_STATIC_ASSERT(Enabled, "Message not in packet type list");
}
@ -745,17 +745,17 @@ namespace etl
#if ETL_CPP11_SUPPORTED && !defined(ETL_MESSAGE_PACKET_FORCE_CPP03_IMPLEMENTATION)
//********************************************
template <typename TMessage, typename = typename etl::enable_if<!etl::is_same<etl::remove_reference_t<TMessage>, etl::message_packet<TMessageHandlers...>>::value &&
!etl::is_same<etl::remove_reference_t<TMessage>, etl::imessage>::value &&
!etl::is_one_of<etl::remove_reference_t<TMessage>::type, TMessageHandlers...>::value, int>::type>
explicit message_packet(TMessage&& msg)
template <typename TMessage, typename = typename etl::enable_if<!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::message_packet<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> >::value &&
!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::imessage>::value &&
!etl::is_one_of<typename etl::remove_reference<TMessage>::type, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>::value, int>::type>
explicit message_packet(etl::imessage&& msg)
: data()
, valid(true)
{
// Not etl::message_packet, not etl::imessage and in typelist.
constexpr bool Enabled = (!etl::is_same<etl::remove_reference_t<TMessage>, etl::message_packet<TMessageTypes...>>::value &&
!etl::is_same<etl::remove_reference_t<TMessage>, etl::imessage>::value &&
etl::is_one_of<etl::remove_reference_t<TMessage>, TMessageTypes...>::value);
static constexpr bool Enabled = (!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::message_packet<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> >::value &&
!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::imessage>::value &&
etl::is_one_of<typename etl::remove_reference<TMessage>::type,T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>::value);
ETL_STATIC_ASSERT(Enabled, "Message not in packet type list");
}
@ -1052,17 +1052,17 @@ namespace etl
#if ETL_CPP11_SUPPORTED && !defined(ETL_MESSAGE_PACKET_FORCE_CPP03_IMPLEMENTATION)
//********************************************
template <typename TMessage, typename = typename etl::enable_if<!etl::is_same<etl::remove_reference_t<TMessage>, etl::message_packet<TMessageHandlers...>>::value &&
!etl::is_same<etl::remove_reference_t<TMessage>, etl::imessage>::value &&
!etl::is_one_of<etl::remove_reference_t<TMessage>::type, TMessageHandlers...>::value, int>::type>
explicit message_packet(TMessage&& msg)
template <typename TMessage, typename = typename etl::enable_if<!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::message_packet<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> >::value &&
!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::imessage>::value &&
!etl::is_one_of<typename etl::remove_reference<TMessage>::type, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>::value, int>::type>
explicit message_packet(etl::imessage&& msg)
: data()
, valid(true)
{
// Not etl::message_packet, not etl::imessage and in typelist.
constexpr bool Enabled = (!etl::is_same<etl::remove_reference_t<TMessage>, etl::message_packet<TMessageTypes...>>::value &&
!etl::is_same<etl::remove_reference_t<TMessage>, etl::imessage>::value &&
etl::is_one_of<etl::remove_reference_t<TMessage>, TMessageTypes...>::value);
static constexpr bool Enabled = (!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::message_packet<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> >::value &&
!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::imessage>::value &&
etl::is_one_of<typename etl::remove_reference<TMessage>::type,T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>::value);
ETL_STATIC_ASSERT(Enabled, "Message not in packet type list");
}
@ -1356,17 +1356,17 @@ namespace etl
#if ETL_CPP11_SUPPORTED && !defined(ETL_MESSAGE_PACKET_FORCE_CPP03_IMPLEMENTATION)
//********************************************
template <typename TMessage, typename = typename etl::enable_if<!etl::is_same<etl::remove_reference_t<TMessage>, etl::message_packet<TMessageHandlers...>>::value &&
!etl::is_same<etl::remove_reference_t<TMessage>, etl::imessage>::value &&
!etl::is_one_of<etl::remove_reference_t<TMessage>::type, TMessageHandlers...>::value, int>::type>
explicit message_packet(TMessage&& msg)
template <typename TMessage, typename = typename etl::enable_if<!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::message_packet<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> >::value &&
!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::imessage>::value &&
!etl::is_one_of<typename etl::remove_reference<TMessage>::type, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>::value, int>::type>
explicit message_packet(etl::imessage&& msg)
: data()
, valid(true)
{
// Not etl::message_packet, not etl::imessage and in typelist.
constexpr bool Enabled = (!etl::is_same<etl::remove_reference_t<TMessage>, etl::message_packet<TMessageTypes...>>::value &&
!etl::is_same<etl::remove_reference_t<TMessage>, etl::imessage>::value &&
etl::is_one_of<etl::remove_reference_t<TMessage>, TMessageTypes...>::value);
static constexpr bool Enabled = (!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::message_packet<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> >::value &&
!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::imessage>::value &&
etl::is_one_of<typename etl::remove_reference<TMessage>::type,T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>::value);
ETL_STATIC_ASSERT(Enabled, "Message not in packet type list");
}
@ -1656,17 +1656,17 @@ namespace etl
#if ETL_CPP11_SUPPORTED && !defined(ETL_MESSAGE_PACKET_FORCE_CPP03_IMPLEMENTATION)
//********************************************
template <typename TMessage, typename = typename etl::enable_if<!etl::is_same<etl::remove_reference_t<TMessage>, etl::message_packet<TMessageHandlers...>>::value &&
!etl::is_same<etl::remove_reference_t<TMessage>, etl::imessage>::value &&
!etl::is_one_of<etl::remove_reference_t<TMessage>::type, TMessageHandlers...>::value, int>::type>
explicit message_packet(TMessage&& msg)
template <typename TMessage, typename = typename etl::enable_if<!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::message_packet<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> >::value &&
!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::imessage>::value &&
!etl::is_one_of<typename etl::remove_reference<TMessage>::type, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>::value, int>::type>
explicit message_packet(etl::imessage&& msg)
: data()
, valid(true)
{
// Not etl::message_packet, not etl::imessage and in typelist.
constexpr bool Enabled = (!etl::is_same<etl::remove_reference_t<TMessage>, etl::message_packet<TMessageTypes...>>::value &&
!etl::is_same<etl::remove_reference_t<TMessage>, etl::imessage>::value &&
etl::is_one_of<etl::remove_reference_t<TMessage>, TMessageTypes...>::value);
static constexpr bool Enabled = (!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::message_packet<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> >::value &&
!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::imessage>::value &&
etl::is_one_of<typename etl::remove_reference<TMessage>::type,T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>::value);
ETL_STATIC_ASSERT(Enabled, "Message not in packet type list");
}
@ -1950,17 +1950,17 @@ namespace etl
#if ETL_CPP11_SUPPORTED && !defined(ETL_MESSAGE_PACKET_FORCE_CPP03_IMPLEMENTATION)
//********************************************
template <typename TMessage, typename = typename etl::enable_if<!etl::is_same<etl::remove_reference_t<TMessage>, etl::message_packet<TMessageHandlers...>>::value &&
!etl::is_same<etl::remove_reference_t<TMessage>, etl::imessage>::value &&
!etl::is_one_of<etl::remove_reference_t<TMessage>::type, TMessageHandlers...>::value, int>::type>
explicit message_packet(TMessage&& msg)
template <typename TMessage, typename = typename etl::enable_if<!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::message_packet<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> >::value &&
!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::imessage>::value &&
!etl::is_one_of<typename etl::remove_reference<TMessage>::type, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>::value, int>::type>
explicit message_packet(etl::imessage&& msg)
: data()
, valid(true)
{
// Not etl::message_packet, not etl::imessage and in typelist.
constexpr bool Enabled = (!etl::is_same<etl::remove_reference_t<TMessage>, etl::message_packet<TMessageTypes...>>::value &&
!etl::is_same<etl::remove_reference_t<TMessage>, etl::imessage>::value &&
etl::is_one_of<etl::remove_reference_t<TMessage>, TMessageTypes...>::value);
static constexpr bool Enabled = (!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::message_packet<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> >::value &&
!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::imessage>::value &&
etl::is_one_of<typename etl::remove_reference<TMessage>::type,T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>::value);
ETL_STATIC_ASSERT(Enabled, "Message not in packet type list");
}
@ -2241,17 +2241,17 @@ namespace etl
#if ETL_CPP11_SUPPORTED && !defined(ETL_MESSAGE_PACKET_FORCE_CPP03_IMPLEMENTATION)
//********************************************
template <typename TMessage, typename = typename etl::enable_if<!etl::is_same<etl::remove_reference_t<TMessage>, etl::message_packet<TMessageHandlers...>>::value &&
!etl::is_same<etl::remove_reference_t<TMessage>, etl::imessage>::value &&
!etl::is_one_of<etl::remove_reference_t<TMessage>::type, TMessageHandlers...>::value, int>::type>
explicit message_packet(TMessage&& msg)
template <typename TMessage, typename = typename etl::enable_if<!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::message_packet<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> >::value &&
!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::imessage>::value &&
!etl::is_one_of<typename etl::remove_reference<TMessage>::type, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>::value, int>::type>
explicit message_packet(etl::imessage&& msg)
: data()
, valid(true)
{
// Not etl::message_packet, not etl::imessage and in typelist.
constexpr bool Enabled = (!etl::is_same<etl::remove_reference_t<TMessage>, etl::message_packet<TMessageTypes...>>::value &&
!etl::is_same<etl::remove_reference_t<TMessage>, etl::imessage>::value &&
etl::is_one_of<etl::remove_reference_t<TMessage>, TMessageTypes...>::value);
static constexpr bool Enabled = (!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::message_packet<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> >::value &&
!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::imessage>::value &&
etl::is_one_of<typename etl::remove_reference<TMessage>::type,T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>::value);
ETL_STATIC_ASSERT(Enabled, "Message not in packet type list");
}
@ -2529,17 +2529,17 @@ namespace etl
#if ETL_CPP11_SUPPORTED && !defined(ETL_MESSAGE_PACKET_FORCE_CPP03_IMPLEMENTATION)
//********************************************
template <typename TMessage, typename = typename etl::enable_if<!etl::is_same<etl::remove_reference_t<TMessage>, etl::message_packet<TMessageHandlers...>>::value &&
!etl::is_same<etl::remove_reference_t<TMessage>, etl::imessage>::value &&
!etl::is_one_of<etl::remove_reference_t<TMessage>::type, TMessageHandlers...>::value, int>::type>
explicit message_packet(TMessage&& msg)
template <typename TMessage, typename = typename etl::enable_if<!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::message_packet<T1, T2, T3, T4, T5, T6, T7, T8, T9> >::value &&
!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::imessage>::value &&
!etl::is_one_of<typename etl::remove_reference<TMessage>::type, T1, T2, T3, T4, T5, T6, T7, T8, T9>::value, int>::type>
explicit message_packet(etl::imessage&& msg)
: data()
, valid(true)
{
// Not etl::message_packet, not etl::imessage and in typelist.
constexpr bool Enabled = (!etl::is_same<etl::remove_reference_t<TMessage>, etl::message_packet<TMessageTypes...>>::value &&
!etl::is_same<etl::remove_reference_t<TMessage>, etl::imessage>::value &&
etl::is_one_of<etl::remove_reference_t<TMessage>, TMessageTypes...>::value);
static constexpr bool Enabled = (!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::message_packet<T1, T2, T3, T4, T5, T6, T7, T8, T9> >::value &&
!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::imessage>::value &&
etl::is_one_of<typename etl::remove_reference<TMessage>::type,T1, T2, T3, T4, T5, T6, T7, T8, T9>::value);
ETL_STATIC_ASSERT(Enabled, "Message not in packet type list");
}
@ -2813,17 +2813,17 @@ namespace etl
#if ETL_CPP11_SUPPORTED && !defined(ETL_MESSAGE_PACKET_FORCE_CPP03_IMPLEMENTATION)
//********************************************
template <typename TMessage, typename = typename etl::enable_if<!etl::is_same<etl::remove_reference_t<TMessage>, etl::message_packet<TMessageHandlers...>>::value &&
!etl::is_same<etl::remove_reference_t<TMessage>, etl::imessage>::value &&
!etl::is_one_of<etl::remove_reference_t<TMessage>::type, TMessageHandlers...>::value, int>::type>
explicit message_packet(TMessage&& msg)
template <typename TMessage, typename = typename etl::enable_if<!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::message_packet<T1, T2, T3, T4, T5, T6, T7, T8> >::value &&
!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::imessage>::value &&
!etl::is_one_of<typename etl::remove_reference<TMessage>::type, T1, T2, T3, T4, T5, T6, T7, T8>::value, int>::type>
explicit message_packet(etl::imessage&& msg)
: data()
, valid(true)
{
// Not etl::message_packet, not etl::imessage and in typelist.
constexpr bool Enabled = (!etl::is_same<etl::remove_reference_t<TMessage>, etl::message_packet<TMessageTypes...>>::value &&
!etl::is_same<etl::remove_reference_t<TMessage>, etl::imessage>::value &&
etl::is_one_of<etl::remove_reference_t<TMessage>, TMessageTypes...>::value);
static constexpr bool Enabled = (!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::message_packet<T1, T2, T3, T4, T5, T6, T7, T8> >::value &&
!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::imessage>::value &&
etl::is_one_of<typename etl::remove_reference<TMessage>::type,T1, T2, T3, T4, T5, T6, T7, T8>::value);
ETL_STATIC_ASSERT(Enabled, "Message not in packet type list");
}
@ -3091,17 +3091,17 @@ namespace etl
#if ETL_CPP11_SUPPORTED && !defined(ETL_MESSAGE_PACKET_FORCE_CPP03_IMPLEMENTATION)
//********************************************
template <typename TMessage, typename = typename etl::enable_if<!etl::is_same<etl::remove_reference_t<TMessage>, etl::message_packet<TMessageHandlers...>>::value &&
!etl::is_same<etl::remove_reference_t<TMessage>, etl::imessage>::value &&
!etl::is_one_of<etl::remove_reference_t<TMessage>::type, TMessageHandlers...>::value, int>::type>
explicit message_packet(TMessage&& msg)
template <typename TMessage, typename = typename etl::enable_if<!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::message_packet<T1, T2, T3, T4, T5, T6, T7> >::value &&
!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::imessage>::value &&
!etl::is_one_of<typename etl::remove_reference<TMessage>::type, T1, T2, T3, T4, T5, T6, T7>::value, int>::type>
explicit message_packet(etl::imessage&& msg)
: data()
, valid(true)
{
// Not etl::message_packet, not etl::imessage and in typelist.
constexpr bool Enabled = (!etl::is_same<etl::remove_reference_t<TMessage>, etl::message_packet<TMessageTypes...>>::value &&
!etl::is_same<etl::remove_reference_t<TMessage>, etl::imessage>::value &&
etl::is_one_of<etl::remove_reference_t<TMessage>, TMessageTypes...>::value);
static constexpr bool Enabled = (!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::message_packet<T1, T2, T3, T4, T5, T6, T7> >::value &&
!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::imessage>::value &&
etl::is_one_of<typename etl::remove_reference<TMessage>::type,T1, T2, T3, T4, T5, T6, T7>::value);
ETL_STATIC_ASSERT(Enabled, "Message not in packet type list");
}
@ -3366,17 +3366,17 @@ namespace etl
#if ETL_CPP11_SUPPORTED && !defined(ETL_MESSAGE_PACKET_FORCE_CPP03_IMPLEMENTATION)
//********************************************
template <typename TMessage, typename = typename etl::enable_if<!etl::is_same<etl::remove_reference_t<TMessage>, etl::message_packet<TMessageHandlers...>>::value &&
!etl::is_same<etl::remove_reference_t<TMessage>, etl::imessage>::value &&
!etl::is_one_of<etl::remove_reference_t<TMessage>::type, TMessageHandlers...>::value, int>::type>
explicit message_packet(TMessage&& msg)
template <typename TMessage, typename = typename etl::enable_if<!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::message_packet<T1, T2, T3, T4, T5, T6> >::value &&
!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::imessage>::value &&
!etl::is_one_of<typename etl::remove_reference<TMessage>::type, T1, T2, T3, T4, T5, T6>::value, int>::type>
explicit message_packet(etl::imessage&& msg)
: data()
, valid(true)
{
// Not etl::message_packet, not etl::imessage and in typelist.
constexpr bool Enabled = (!etl::is_same<etl::remove_reference_t<TMessage>, etl::message_packet<TMessageTypes...>>::value &&
!etl::is_same<etl::remove_reference_t<TMessage>, etl::imessage>::value &&
etl::is_one_of<etl::remove_reference_t<TMessage>, TMessageTypes...>::value);
static constexpr bool Enabled = (!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::message_packet<T1, T2, T3, T4, T5, T6> >::value &&
!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::imessage>::value &&
etl::is_one_of<typename etl::remove_reference<TMessage>::type,T1, T2, T3, T4, T5, T6>::value);
ETL_STATIC_ASSERT(Enabled, "Message not in packet type list");
}
@ -3638,17 +3638,17 @@ namespace etl
#if ETL_CPP11_SUPPORTED && !defined(ETL_MESSAGE_PACKET_FORCE_CPP03_IMPLEMENTATION)
//********************************************
template <typename TMessage, typename = typename etl::enable_if<!etl::is_same<etl::remove_reference_t<TMessage>, etl::message_packet<TMessageHandlers...>>::value &&
!etl::is_same<etl::remove_reference_t<TMessage>, etl::imessage>::value &&
!etl::is_one_of<etl::remove_reference_t<TMessage>::type, TMessageHandlers...>::value, int>::type>
explicit message_packet(TMessage&& msg)
template <typename TMessage, typename = typename etl::enable_if<!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::message_packet<T1, T2, T3, T4, T5> >::value &&
!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::imessage>::value &&
!etl::is_one_of<typename etl::remove_reference<TMessage>::type, T1, T2, T3, T4, T5>::value, int>::type>
explicit message_packet(etl::imessage&& msg)
: data()
, valid(true)
{
// Not etl::message_packet, not etl::imessage and in typelist.
constexpr bool Enabled = (!etl::is_same<etl::remove_reference_t<TMessage>, etl::message_packet<TMessageTypes...>>::value &&
!etl::is_same<etl::remove_reference_t<TMessage>, etl::imessage>::value &&
etl::is_one_of<etl::remove_reference_t<TMessage>, TMessageTypes...>::value);
static constexpr bool Enabled = (!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::message_packet<T1, T2, T3, T4, T5> >::value &&
!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::imessage>::value &&
etl::is_one_of<typename etl::remove_reference<TMessage>::type,T1, T2, T3, T4, T5>::value);
ETL_STATIC_ASSERT(Enabled, "Message not in packet type list");
}
@ -3906,17 +3906,17 @@ namespace etl
#if ETL_CPP11_SUPPORTED && !defined(ETL_MESSAGE_PACKET_FORCE_CPP03_IMPLEMENTATION)
//********************************************
template <typename TMessage, typename = typename etl::enable_if<!etl::is_same<etl::remove_reference_t<TMessage>, etl::message_packet<TMessageHandlers...>>::value &&
!etl::is_same<etl::remove_reference_t<TMessage>, etl::imessage>::value &&
!etl::is_one_of<etl::remove_reference_t<TMessage>::type, TMessageHandlers...>::value, int>::type>
explicit message_packet(TMessage&& msg)
template <typename TMessage, typename = typename etl::enable_if<!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::message_packet<T1, T2, T3, T4> >::value &&
!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::imessage>::value &&
!etl::is_one_of<typename etl::remove_reference<TMessage>::type, T1, T2, T3, T4>::value, int>::type>
explicit message_packet(etl::imessage&& msg)
: data()
, valid(true)
{
// Not etl::message_packet, not etl::imessage and in typelist.
constexpr bool Enabled = (!etl::is_same<etl::remove_reference_t<TMessage>, etl::message_packet<TMessageTypes...>>::value &&
!etl::is_same<etl::remove_reference_t<TMessage>, etl::imessage>::value &&
etl::is_one_of<etl::remove_reference_t<TMessage>, TMessageTypes...>::value);
static constexpr bool Enabled = (!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::message_packet<T1, T2, T3, T4> >::value &&
!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::imessage>::value &&
etl::is_one_of<typename etl::remove_reference<TMessage>::type,T1, T2, T3, T4>::value);
ETL_STATIC_ASSERT(Enabled, "Message not in packet type list");
}
@ -4168,17 +4168,17 @@ namespace etl
#if ETL_CPP11_SUPPORTED && !defined(ETL_MESSAGE_PACKET_FORCE_CPP03_IMPLEMENTATION)
//********************************************
template <typename TMessage, typename = typename etl::enable_if<!etl::is_same<etl::remove_reference_t<TMessage>, etl::message_packet<TMessageHandlers...>>::value &&
!etl::is_same<etl::remove_reference_t<TMessage>, etl::imessage>::value &&
!etl::is_one_of<etl::remove_reference_t<TMessage>::type, TMessageHandlers...>::value, int>::type>
explicit message_packet(TMessage&& msg)
template <typename TMessage, typename = typename etl::enable_if<!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::message_packet<T1, T2, T3> >::value &&
!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::imessage>::value &&
!etl::is_one_of<typename etl::remove_reference<TMessage>::type, T1, T2, T3>::value, int>::type>
explicit message_packet(etl::imessage&& msg)
: data()
, valid(true)
{
// Not etl::message_packet, not etl::imessage and in typelist.
constexpr bool Enabled = (!etl::is_same<etl::remove_reference_t<TMessage>, etl::message_packet<TMessageTypes...>>::value &&
!etl::is_same<etl::remove_reference_t<TMessage>, etl::imessage>::value &&
etl::is_one_of<etl::remove_reference_t<TMessage>, TMessageTypes...>::value);
static constexpr bool Enabled = (!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::message_packet<T1, T2, T3> >::value &&
!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::imessage>::value &&
etl::is_one_of<typename etl::remove_reference<TMessage>::type,T1, T2, T3>::value);
ETL_STATIC_ASSERT(Enabled, "Message not in packet type list");
}
@ -4427,17 +4427,17 @@ namespace etl
#if ETL_CPP11_SUPPORTED && !defined(ETL_MESSAGE_PACKET_FORCE_CPP03_IMPLEMENTATION)
//********************************************
template <typename TMessage, typename = typename etl::enable_if<!etl::is_same<etl::remove_reference_t<TMessage>, etl::message_packet<TMessageHandlers...>>::value &&
!etl::is_same<etl::remove_reference_t<TMessage>, etl::imessage>::value &&
!etl::is_one_of<etl::remove_reference_t<TMessage>::type, TMessageHandlers...>::value, int>::type>
explicit message_packet(TMessage&& msg)
template <typename TMessage, typename = typename etl::enable_if<!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::message_packet<T1, T2> >::value &&
!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::imessage>::value &&
!etl::is_one_of<typename etl::remove_reference<TMessage>::type, T1, T2>::value, int>::type>
explicit message_packet(etl::imessage&& msg)
: data()
, valid(true)
{
// Not etl::message_packet, not etl::imessage and in typelist.
constexpr bool Enabled = (!etl::is_same<etl::remove_reference_t<TMessage>, etl::message_packet<TMessageTypes...>>::value &&
!etl::is_same<etl::remove_reference_t<TMessage>, etl::imessage>::value &&
etl::is_one_of<etl::remove_reference_t<TMessage>, TMessageTypes...>::value);
static constexpr bool Enabled = (!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::message_packet<T1, T2> >::value &&
!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::imessage>::value &&
etl::is_one_of<typename etl::remove_reference<TMessage>::type,T1, T2>::value);
ETL_STATIC_ASSERT(Enabled, "Message not in packet type list");
}
@ -4683,17 +4683,17 @@ namespace etl
#if ETL_CPP11_SUPPORTED && !defined(ETL_MESSAGE_PACKET_FORCE_CPP03_IMPLEMENTATION)
//********************************************
template <typename TMessage, typename = typename etl::enable_if<!etl::is_same<etl::remove_reference_t<TMessage>, etl::message_packet<TMessageHandlers...>>::value &&
!etl::is_same<etl::remove_reference_t<TMessage>, etl::imessage>::value &&
!etl::is_one_of<etl::remove_reference_t<TMessage>::type, TMessageHandlers...>::value, int>::type>
explicit message_packet(TMessage&& msg)
template <typename TMessage, typename = typename etl::enable_if<!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::message_packet<T1> >::value &&
!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::imessage>::value &&
!etl::is_one_of<typename etl::remove_reference<TMessage>::type, T1>::value, int>::type>
explicit message_packet(etl::imessage&& msg)
: data()
, valid(true)
{
// Not etl::message_packet, not etl::imessage and in typelist.
constexpr bool Enabled = (!etl::is_same<etl::remove_reference_t<TMessage>, etl::message_packet<TMessageTypes...>>::value &&
!etl::is_same<etl::remove_reference_t<TMessage>, etl::imessage>::value &&
etl::is_one_of<etl::remove_reference_t<TMessage>, TMessageTypes...>::value);
static constexpr bool Enabled = (!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::message_packet<T1> >::value &&
!etl::is_same<typename etl::remove_reference<TMessage>::type, etl::imessage>::value &&
etl::is_one_of<typename etl::remove_reference<TMessage>::type,T1>::value);
ETL_STATIC_ASSERT(Enabled, "Message not in packet type list");
}