From a30b78fb81acf3d6bc198848b44765a64f820b0b Mon Sep 17 00:00:00 2001 From: BlackMark Date: Sat, 1 Feb 2020 22:13:27 +0100 Subject: [PATCH] Added static assert for number of pins on virtual port --- io.hpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/io.hpp b/io.hpp index 4cdc048..7918134 100644 --- a/io.hpp +++ b/io.hpp @@ -489,6 +489,8 @@ struct readCaller { template class VirtPort { public: + static_assert(sizeof...(pins) <= 8, "A virtual port cannot have more than 8 pins"); + // VirtPort objects cannot be moved or copied VirtPort(const VirtPort &) = delete; VirtPort(VirtPort &&) = delete;