Recently i wrote a C++ TEMPLATE Library that should pass the type info transparently from the referenced sources to the target. Then I found the rvalue-referenced object being copied from the source(incorrectly maybe) rather than referencing to the original one like doing to const lvalue references. The 'error' is exactly like this:If a source is a UDT object from struct/union/class, there is no such error at all;If a source is a NDT object like int/char/float, etc, thers is such limitation there.I don't think the micro-code optimization to CPU is an excuse for this error(sorry about the word, i just attempt to say that is logically-possible reason for) while to rvalue references or constant lvalue references.The sample code shows what i told, Assuming those were the instantiated templates.Regards
Visual Studio/Team Foundation Server/.NET Framework Tooling version
Steps to reproduce
Product Language
Operating System
Operating System Language
Actual results
Expected results
Please wait...