Hi G,
Yes I think a 'mess' of premature optimization and layer complexity has occurred here. What should really be done is just have the constructor take by const reference and avoid all these moves/copies. Then if this was a performance critical path a constructor overload taking by r-value reference could be added.
I have a change prepared that I'm running through review and testing that will make the parameters all be const reference. It will be fixed in the 2.4.0 release. This is the cleanest option and allows for better future improvement.
Thanks for pointing out,
Steve
Yes I think a 'mess' of premature optimization and layer complexity has occurred here. What should really be done is just have the constructor take by const reference and avoid all these moves/copies. Then if this was a performance critical path a constructor overload taking by r-value reference could be added.
I have a change prepared that I'm running through review and testing that will make the parameters all be const reference. It will be fixed in the 2.4.0 release. This is the cleanest option and allows for better future improvement.
Thanks for pointing out,
Steve