blob: de13950dca0a9c05328c149a10571f921cc7b8b5 [file] [log] [blame]
// { dg-do compile }
struct QScopedPointerDeleter {
static void cleanup(int *);
};
class QScopedPointer {
typedef int *QScopedPointer::*RestrictedBool;
public:
operator RestrictedBool() { return d ? nullptr : &QScopedPointer::d; }
void reset() {
if (d)
QScopedPointerDeleter::cleanup(d);
}
int *d;
};
class DOpenGLPaintDevicePrivate {
public:
QScopedPointer fbo;
} DOpenGLPaintDeviceresize_d;
void DOpenGLPaintDeviceresize() {
if (DOpenGLPaintDeviceresize_d.fbo)
DOpenGLPaintDeviceresize_d.fbo.reset();
}