Add additional overloads to disambiguate

Signed-off-by: Pawel Kojma <pkojma@internships.antmicro.com>
This commit is contained in:
Pawel Kojma 2026-06-30 11:21:19 +02:00
parent 964474837f
commit 73fa2f025d
1 changed files with 9 additions and 1 deletions

View File

@ -24,6 +24,7 @@
#ifndef VERILATOR_VERILATED_TYPES_H_
#define VERILATOR_VERILATED_TYPES_H_
#include "verilatedos.h"
#ifndef VERILATOR_VERILATED_H_INTERNAL_
#error "verilated_types.h should only be included by verilated.h"
#endif
@ -2069,8 +2070,15 @@ struct VlNull final {
operator T*() const {
return nullptr;
}
template <class T>
VL_CONSTEXPR_CXX17 bool operator==(T* ptr) const {
return !ptr;
}
template <class T>
VL_CONSTEXPR_CXX17 bool operator==(const T* ptr) const {
return !ptr;
}
};
inline bool operator==(const void* ptr, VlNull) { return !ptr; }
//===================================================================
// Verilog class reference container