Add additional overloads to disambiguate
Signed-off-by: Pawel Kojma <pkojma@internships.antmicro.com>
This commit is contained in:
parent
964474837f
commit
73fa2f025d
|
|
@ -24,6 +24,7 @@
|
||||||
#ifndef VERILATOR_VERILATED_TYPES_H_
|
#ifndef VERILATOR_VERILATED_TYPES_H_
|
||||||
#define VERILATOR_VERILATED_TYPES_H_
|
#define VERILATOR_VERILATED_TYPES_H_
|
||||||
|
|
||||||
|
#include "verilatedos.h"
|
||||||
#ifndef VERILATOR_VERILATED_H_INTERNAL_
|
#ifndef VERILATOR_VERILATED_H_INTERNAL_
|
||||||
#error "verilated_types.h should only be included by verilated.h"
|
#error "verilated_types.h should only be included by verilated.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -2069,8 +2070,15 @@ struct VlNull final {
|
||||||
operator T*() const {
|
operator T*() const {
|
||||||
return nullptr;
|
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
|
// Verilog class reference container
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue