29 Mar
2015
29 Mar
'15
12:11 p.m.
On 03/27/2015 05:49 PM, Robert Ramey wrote:
In this case the problem is different. A parameter value placed on the stack cannot be passed by "const T & t". This syntax assumes and enforces
Why not?
Now one could add yet one more layer of TMP code to distinguish between tracked and untracked types and handle them differently. But that would introduce another layer of complexity and hide even more what is going on. I would be reluctant to do this.
Making a special case for primitive types is not too bad. See the attached patch.
I'm presuming that this is not a common case.
I encounter it all the time in unit tests, and occasionally in other code.