I’ve created a template class that outputs values based on their data types i.e. long gets output as a signed integer (decimal), whereas RESULT gets output in hex format. I defined RESULT as:
typdef long RESULT.
This isn’t working correctly because RESULT is being treated like a long and RESULT‘s output routine never gets called (instead long‘s routine is called). Is there a workaround for this?
What you want will not work for the reasons given.
How about just adding a Function object that formats the output as you want.
A sample use case: