On Tuesday, 2 September 2014 at 15:41:17 UTC, monarch_dodra wrote:
Unless we allow defining "enum-member functions", AFAIK, it is impossible to override the printing behavior for enums...
... If your enum actually represents strings, then you could:
enum CxxRefQualifier : string
{
none = "",
normalRef = "&",
rvalueRef = "&&",
}
That in itself is not enough, but you *can* cast your enum to
string, and then print that, or pass that.
See also: https://issues.dlang.org/show_bug.cgi?id=11571
