In my database accessing code, I wish to write a method:
variant_t GetQueryRows (...)
I would like to call it:
const variant_t result = GetQueryRows (...)
Although I can do this, the copying of the variant_t shows rather high in my profiler results. So I need to ensure that the variant_t is not copied. There is no move constructor or move assign in variant_t, and I cannot modify the source of variant_t in order to add one.
Is there anything I can do in Visual Studio 2012 using C++, aside from the obvious thing of returning the 'result' via an out parameter?