1// Copyright (C) 2025 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QMULTIMEDIA_ASSUME_P_H
5#define QMULTIMEDIA_ASSUME_P_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18
19#if defined(__has_cpp_attribute) && __has_cpp_attribute(assume)
20# define QT_MM_ASSUME(assumption) \
21 Q_ASSERT(assumption); \
22 [[assume(assumption)]]; \
23 static_assert(true, "force semicolon")
24#else
25# define QT_MM_ASSUME(assumption) Q_ASSERT(assumption)
26#endif
27
28#endif // QMULTIMEDIA_ASSUME_P_H
29

source code of qtmultimedia/src/multimedia/qmultimedia_assume_p.h