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
qatomic.cpp
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// Copyright (C) 2016 Intel Corporation.
3// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
4
5#include "qatomic.h"
6
410
414
432
437
454
459
476
481
1744// static checks
1745#ifndef Q_ATOMIC_INT8_IS_SUPPORTED
1746# error "Q_ATOMIC_INT8_IS_SUPPORTED must be defined"
1747#endif
1748#ifndef Q_ATOMIC_INT16_IS_SUPPORTED
1749# error "Q_ATOMIC_INT16_IS_SUPPORTED must be defined"
1750#endif
1751#ifndef Q_ATOMIC_INT32_IS_SUPPORTED
1752# error "Q_ATOMIC_INT32_IS_SUPPORTED must be defined"
1753#endif
1754#if !defined(Q_ATOMIC_INT64_IS_SUPPORTED) && QT_POINTER_SIZE == 8
1755// 64-bit platform
1756# error "Q_ATOMIC_INT64_IS_SUPPORTED must be defined on a 64-bit platform"
1757#endif
1758
1760
1761// The following specializations must always be defined
1762static_assert(sizeof(QAtomicInteger<unsigned>));
1763static_assert(sizeof(QAtomicInteger<long>));
1764static_assert(sizeof(QAtomicInteger<unsigned long>));
1765static_assert(sizeof(QAtomicInteger<quintptr>));
1766static_assert(sizeof(QAtomicInteger<qptrdiff>));
1767static_assert(sizeof(QAtomicInteger<char32_t>));
1768
1769static_assert(sizeof(QAtomicInteger<short>));
1770static_assert(sizeof(QAtomicInteger<unsigned short>));
1771static_assert(sizeof(QAtomicInteger<wchar_t>));
1772static_assert(sizeof(QAtomicInteger<char16_t>));
1773
1774static_assert(sizeof(QAtomicInteger<char>));
1775static_assert(sizeof(QAtomicInteger<unsigned char>));
1776static_assert(sizeof(QAtomicInteger<signed char>));
1777static_assert(sizeof(QAtomicInteger<bool>));
1778
1779#ifdef Q_ATOMIC_INT64_IS_SUPPORTED
1780static_assert(sizeof(QAtomicInteger<qint64>));
1781static_assert(sizeof(QAtomicInteger<quint64>));
1782#endif
1783
Combined button and popup list for selecting options.