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
q20functional.h
Go to the documentation of this file.
1// Copyright (C) 2021 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 LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3#ifndef Q20FUNCTIONAL_H
4#define Q20FUNCTIONAL_H
5
6#include <QtCore/qglobal.h>
7
8#include <functional>
9
10//
11// W A R N I N G
12// -------------
13//
14// This file is not part of the Qt API. Types and functions defined in this
15// file can reliably be replaced by their std counterparts, once available.
16// You may use these definitions in your own code, but be aware that we
17// will remove them once Qt depends on the C++ version that supports
18// them in namespace std. There will be NO deprecation warning, the
19// definitions will JUST go away.
20//
21// If you can't agree to these terms, don't use these definitions!
22//
23// We mean it.
24//
25
26#include <functional>
27
29
30namespace q20 {
31// like std::identity
32#ifdef __cpp_lib_ranges
33using std::identity;
34#else
36{
37 struct is_transparent {};
38 template <typename T>
39 constexpr T &&operator()(T&& t) const noexcept { return std::forward<T>(t); }
40};
41#endif // __cpp_lib_ranges
42} // namespace q20
43
45
46#endif /* Q20FUNCTIONAL_H */
Combined button and popup list for selecting options.
GLdouble GLdouble t
Definition qopenglext.h:243
constexpr T && operator()(T &&t) const noexcept