Added static assert for number of pins on virtual port

This commit is contained in:
BlackMark 2020-02-01 22:13:27 +01:00
parent cde4f9beda
commit a30b78fb81

2
io.hpp
View File

@ -489,6 +489,8 @@ struct readCaller {
template <P... pins>
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;