diff --git a/src/core/model/simple-ref-count.h b/src/core/model/simple-ref-count.h index ed0d42488..ad2916a18 100644 --- a/src/core/model/simple-ref-count.h +++ b/src/core/model/simple-ref-count.h @@ -24,7 +24,9 @@ #include "empty.h" #include "default-deleter.h" +#include "assert.h" #include +#include namespace ns3 { @@ -79,6 +81,7 @@ public: */ inline void Ref (void) const { + NS_ASSERT (m_count < std::numeric_limits::max()); m_count++; } /**