A
Amal
Guest
I did a quick search and browsed through the SystemVerilog LRM, but I
could not find anything about this.
How does one create a type conversion (type of overloading) for a
class? Something like this is C++:
class String
{
public:
String( char* cp ); // Constructor
operator const char*() const; // Conversion operator to
const char*
};
operator const char*() const converts objects of type String to char *
Is there an equivalent in SystemVerilog? Can someone show me a small
example please?
-- Amal
could not find anything about this.
How does one create a type conversion (type of overloading) for a
class? Something like this is C++:
class String
{
public:
String( char* cp ); // Constructor
operator const char*() const; // Conversion operator to
const char*
};
operator const char*() const converts objects of type String to char *
Is there an equivalent in SystemVerilog? Can someone show me a small
example please?
-- Amal