[Development] RFC: Proposal for a semi-radical change in Qt APIs taking strings

Thiago Macieira thiago.macieira at intel.com
Fri Oct 16 19:31:50 CEST 2015


On Friday 16 October 2015 19:03:18 Marc Mutz wrote:
> The problem is that I feel we can't wait for string_view because we already 
> drown in QString equivalents. Plus, we'd get the usual replies if anyone
> suggested to use std::string_view as such a fundamental Qt type. Naturally,
> QStringView would trivially convert to and from std::u16string_view with no
> runtime overhead (unless compiler writers ruin the concept of string_view
> by implementing it as (T*, size_t) in one compiler and (T*, T*) in
> another....)

The conversion from one to the other is one instruction.
-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center




More information about the Development mailing list