Qt 6.x
The Qt SDK
•All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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()
\inmodule QtCore
GLenum array
void myfun1(QAnyStringView sv)
[0]
void myfun2(const QAnyStringView &sv)