Debian Codegraph @

gcc/testsuite/g++.dg/torture/pr100925.C

raw
1 // { dg-do compile }
2
3 struct QScopedPointerDeleter {
4 static void cleanup(int *);
5 };
6 class QScopedPointer {
7 typedef int *QScopedPointer::*RestrictedBool;
8
9 public:
10 operator RestrictedBool() { return d ? nullptr : &QScopedPointer::d; }
11 void reset() {
12 if (d)
13 QScopedPointerDeleter::cleanup(d);
14 }
15 int *d;
16 };
17 class DOpenGLPaintDevicePrivate {
18 public:
19 QScopedPointer fbo;
20 } DOpenGLPaintDeviceresize_d;
21 void DOpenGLPaintDeviceresize() {
22 if (DOpenGLPaintDeviceresize_d.fbo)
23 DOpenGLPaintDeviceresize_d.fbo.reset();
24 }