From a41d8bfc8749ae9fe26f778e161c863fe31343cc Mon Sep 17 00:00:00 2001 From: Kevin Matz Date: Thu, 18 May 2023 15:51:13 -0400 Subject: [PATCH] enforce base classes on header and data segments --- protocol/esta/acn/pdu.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/protocol/esta/acn/pdu.h b/protocol/esta/acn/pdu.h index 5e4effc..0f015da 100644 --- a/protocol/esta/acn/pdu.h +++ b/protocol/esta/acn/pdu.h @@ -186,6 +186,8 @@ public: template void createHeader() { + static_assert(std::is_base_of::value, + "type parameter of PDU::createHeader must derive from ACN::pdu_header"); if (!flags_.hasHeader) return; // doesn't get a header segment, inherits if (header_) @@ -200,6 +202,8 @@ public: template void createData() { + static_assert(std::is_base_of::value, + "type parameter of PDU::createData must derive from ACN::pdu_data"); if (!flags_.hasData) return; // doesn't get a data segment, inherits if (data_)