path: root/src/corelib/doc/snippets/code/src_corelib_text_qutf8stringview.cpp
diff options
authorMårten Nordheim <>2020-09-14 15:26:49 +0200
committerMårten Nordheim <>2020-09-18 23:34:49 +0200
commitbbe7570ddcc6fcce707a355b76d2d0024c44ea38 (patch)
tree0a9d0413c4b0154e80ecb26233ab36a3b462ecd3 /src/corelib/doc/snippets/code/src_corelib_text_qutf8stringview.cpp
parent7a5e0c5712cbdeb9edb83dfd47d63277346537a9 (diff)
QByteArrayView: move array size deduction feature to fromArray
1. Make the ctor unable to construct a QByteArrayView from array literals other than 'char'. With the new behavior it would either be (very likely) unintended to pass e.g. a std::byte array to the ctor. And it would be confusing because you would get different sizes based on signed-ness. 2. Introduce fromArray Only supports array literals. Constructs a view of the full size. Explicit so it shouldn't be surprising. Change-Id: Ifdb55eb21057dfe7053b2561bd81e2c9825e9bc6 Reviewed-by: Andrei Golubev <> Reviewed-by: Sona Kurazyan <> Reviewed-by: Edward Welbourne <>
Diffstat (limited to 'src/corelib/doc/snippets/code/src_corelib_text_qutf8stringview.cpp')
0 files changed, 0 insertions, 0 deletions