diff --git a/src/kaleidoscope/MatrixAddr.h b/src/kaleidoscope/MatrixAddr.h index a7a5cbbf..8e13ddbe 100644 --- a/src/kaleidoscope/MatrixAddr.h +++ b/src/kaleidoscope/MatrixAddr.h @@ -47,7 +47,7 @@ class MatrixAddr { constexpr MatrixAddr(uint8_t row, uint8_t col) : offset_(row * cols + col) {} - constexpr MatrixAddr(uint8_t offset) + explicit constexpr MatrixAddr(uint8_t offset) : offset_(offset) {} // Rely on the default copy and move constructor. diff --git a/src/kaleidoscope/bitfields.h b/src/kaleidoscope/bitfields.h index 3a59c854..52621143 100644 --- a/src/kaleidoscope/bitfields.h +++ b/src/kaleidoscope/bitfields.h @@ -113,7 +113,7 @@ class Bitfield : public internal::_BaseBitfield { static constexpr size_t n_bytes_ = nBytesForBits(BitCount__); template - constexpr Bitfield(Bits__...bits) : bits_(bits...) { + explicit constexpr Bitfield(Bits__...bits) : bits_(bits...) { static_assert(sizeof...(Bits__) == n_bits_, "Invalid number of bits supplied to Bitfield constructor. \n" "Compare the number of bits supplied with the provided template \n"