intel / systemc-compiler

This tool translates synthesizable SystemC code to synthesizable SystemVerilog.
Other
244 stars 35 forks source link

Ambiguous operator << #54

Closed isv75 closed 1 year ago

isv75 commented 1 year ago

Streaming SValue to DiagnosticBuilder is ambiguous between the two functions:

// Diagnostic.h line 1295 template const DiagnosticBuilder & DiagnosticBuilder::operator<<(const T &V) const

// SValue.h line 242 template friend OsT & SValue::operator << (OsT &os, const SValue &val)

Depending on which compiler I use, there is an error to this ambiguity. I have yet to learn if it is the C++ standard or other flags that makes the difference.

My workaround is to patch all code to call SValue::asString() when they stream to the DiagnosticBuilder.

mikhailmoiseev commented 1 year ago

Fixed in ScDiag::reportScDiag operator << for SValue used with asString(). Please check that works for you.

isv75 commented 1 year ago

The issue is solved. Thanks.