Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
src_corelib_text_qanystringview.cpp
Go to the documentation of this file.
1
// Copyright (C) 2020 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Marc Mutz <marc.mutz@kdab.com>
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
3
5
void
myfun1
(
QAnyStringView
sv);
// preferred
6
void
myfun2
(
const
QAnyStringView
&sv);
// compiles and works, but slower
8
10
auto
sv1
=
QAnyStringView
{std::begin(
array
), std::end(
array
) - 1};
// using C++11 std::begin()/std::end()
11
auto
sv2
=
QAnyStringView
(
array
, std::size(
array
) - 1);
// using C++17 std::size()
QAnyStringView
\inmodule QtCore
Definition
qanystringview.h:33
array
GLenum array
Definition
qopenglext.h:7028
sv1
auto sv1
[0]
Definition
src_corelib_text_qanystringview.cpp:10
sv2
auto sv2
Definition
src_corelib_text_qanystringview.cpp:11
myfun1
void myfun1(QAnyStringView sv)
[0]
myfun2
void myfun2(const QAnyStringView &sv)
qtbase
src
corelib
doc
snippets
code
src_corelib_text_qanystringview.cpp
Generated by
1.10.0