2 // { dg-additional-options "-Wno-return-type" }
5 typedef __SIZE_TYPE__ size_t;
7 inline void* operator new(std::size_t, void* __p) throw() {
10 template <typename T> class QTypeInfo {
12 enum { Q_COMPLEX_TYPE = 0, Q_PRIMITIVE_TYPE = 0x1, Q_STATIC_TYPE = 0, Q_MOVABLE_TYPE = 0x2, Q_DUMMY_TYPE = 0x4 };
13 template<typename Enum> class QFlags {
15 inline QFlags(Enum f) : i(f) { }
17 class __attribute__((visibility("default"))) QSize {
20 friend inline bool operator==(const QSize &, const QSize &);
24 template<> class QTypeInfo<QSize > {
27 isComplex = (((Q_MOVABLE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_MOVABLE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(QSize)>sizeof(void*)), isPointer = false, isDummy = (((Q_MOVABLE_TYPE) & Q_DUMMY_TYPE) != 0) };
29 class __attribute__((visibility("default"))) QBasicAtomicInt {
31 inline bool operator!=(int value) const { }
33 struct __attribute__((visibility("default"))) QListData {
39 template <typename T> class QList {
48 void append(const T &t);
49 inline void push_back(const T &t) {
52 void node_construct(Node *n, const T &t);
53 void node_destruct(Node *n);
55 template <typename T> inline void QList<T>::node_construct(Node *n, const T &t) {
56 if (QTypeInfo<T>::isLarge || QTypeInfo<T>::isStatic) n->v = new T(t);
57 else if (QTypeInfo<T>::isComplex) new (n) T(t);
59 template <typename T> inline void QList<T>::node_destruct(Node *n) {
61 template <typename T> void QList<T>::append(const T &t) {
67 if (QTypeInfo<T>::isLarge || QTypeInfo<T>::isStatic) {
71 node_construct(©, t);
72 try { n = reinterpret_cast<Node *>(p.append());; }
73 catch (...) { node_destruct(©); throw; }
78 void virtual_hook(QSize sz, QList<QSize> &arg)