diff --git a/src/electronic-ids/TLV.hpp b/src/electronic-ids/TLV.hpp index d3cc124..e39a653 100644 --- a/src/electronic-ids/TLV.hpp +++ b/src/electronic-ids/TLV.hpp @@ -91,7 +91,7 @@ struct TLV } } - if (std::distance(begin, end) < length) { + if (std::distance(begin, end) < decltype(begin)::difference_type(length)) { THROW(std::invalid_argument, "Invalid TLV: Insufficient value data"); } }