Re: Possible extensions to OUString class

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 31/01/2019 08:10, Kaganski Mike wrote:
Is there a C++ magic to automatically select a getToken variant
returning string_view vs returning OUString based on if the original
OUString object is a temporary?

Declare overloads discriminating on whether the OUString is lvalue (&) or rvalue (&&).

(Which, alas, is no panacea if forming a string_view over the temporary OUString would be fine because the string_view temporary doesn't outlive the full expression either. That is, you would like

  getSomeOUString().getToken(...).toInt32()

to use the string_view variant after all.)
_______________________________________________
LibreOffice mailing list
LibreOffice@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/libreoffice




[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux