
Michael Marcin wrote:
Alex MDC wrote:
Have a look at the Call Traits library, in particular "param_type".
Never noticed that library. Thanks I'll have a look.
The documentation makes no mention of allowing extension for user defined types. It in fact has a table which clearly states that param_type is a const reference for all user defined types. In a specific case I was working on a 3d renderer that we used for a mobile project where we used a templated fixed point class. There were some low level functions that worked on a typename Real which used pass by const reference because cheap copy was not a requirement of our Real concept. This project happened to only be using this fixed point type which was a wrapper over int. We branched the code and changed the functions to pass by value. This resulted in a measurable performance increase. I would like to take classes like this and specialized param_type for them but the documentation for this library doesn't seem to allow for that. Thanks, Micahel Marcin