On Wednesday, 4 December 2019 14:59:41 PST Giuseppe D'Angelo via Interest wrote: > Let me elaborate: the original claim was that QStringBuilder is > dangerous. It's not (*). The danger can only happen as a misuse of it > and it's not inherent to QStringBuilder itself, just like other > countless things in C++ (e.g. returning a reference to a local variable).
https://alexgaynor.net/2019/apr/21/modern-c++-wont-save-us/ An example: std::string s = "Hellooooooooooooooo "; std::string_view sv = s + "World\n"; std::cout << sv; Same issue (dangling pointer), no "auto" required. -- Thiago Macieira - thiago.macieira (AT) intel.com Software Architect - Intel System Software Products _______________________________________________ Interest mailing list Interest@qt-project.org https://lists.qt-project.org/listinfo/interest