Fix warning and ambiguous typing in vtkSMSessionProxyManager::GetXMLState(std::set<vtkSMProxy *>)
The returned pointer is deleted unless it is assigned to a clunky auto. It was deleting my pointer even when I assigned it to vtkSmartPointer.
In the return statement of this method, Clang warns: "prior to the resolution of a defect report against ISO C++11. local variable would have been copied despite being returned by name, due to its not matching the function return type ('vtkSmartPointer' vs 'vtkNew'). Note call 'std::move' explicitly to avoid copying on older compilers". rootElement is declared as vtkNew.
I think we are what they mean by "older compilers". It can be fixed by return std::move(rootElement), but a cleaner style in keeping with VTK would be to declare and initialize rootElement with vtkSmartPointer<>::New(). This way no conversion is inferred by the compiler.