Boost logo

Boost :

From: Igor Nazarenko (igor.n.nazarenko_at_[hidden])
Date: 2008-08-31 02:16:13

By default, severity is printed as integer. What's the easiest way to
print the corresponding string (e.g. "info" for severity 0, "warn" for
severity 1, and so on)?

I tried defining operator<< for my severity enum, but
attr<severity_level> doesn't work; that is, the output operator
doesn't get invoked (I assume because attribute "Severity" is
internally of type "int" and not of my enum type).

Thanks a lot!


Boost list run by bdawes at, gregod at, cpdaniel at, john at