QTaggedPointer: verify constexpr'ness of some ctors
Change-Id: I44196ba3a823ce04b7c82aacfb9da301cc0f1886 Reviewed-by: Lars Knoll <lars.knoll@qt.io>bb10
parent
1a5cc8d13d
commit
3df3bdcdb3
|
|
@ -34,6 +34,7 @@ class tst_QTaggedPointer : public QObject
|
|||
Q_OBJECT
|
||||
|
||||
private Q_SLOTS:
|
||||
void constExpr();
|
||||
void construction();
|
||||
void dereferenceOperator();
|
||||
void pointerOperator();
|
||||
|
|
@ -46,6 +47,38 @@ private Q_SLOTS:
|
|||
void taggedLinkedList();
|
||||
};
|
||||
|
||||
void tst_QTaggedPointer::constExpr()
|
||||
{
|
||||
{
|
||||
constexpr QTaggedPointer<int> p;
|
||||
Q_UNUSED(p);
|
||||
}
|
||||
{
|
||||
enum Foo : uint {};
|
||||
constexpr QTaggedPointer<int, Foo> p;
|
||||
Q_UNUSED(p);
|
||||
}
|
||||
{
|
||||
enum Foo : int {};
|
||||
constexpr QTaggedPointer<int, Foo> p;
|
||||
Q_UNUSED(p);
|
||||
}
|
||||
{
|
||||
constexpr QTaggedPointer<int> p = nullptr;
|
||||
Q_UNUSED(p);
|
||||
}
|
||||
{
|
||||
enum Foo : uint {};
|
||||
constexpr QTaggedPointer<int, Foo> p = nullptr;
|
||||
Q_UNUSED(p);
|
||||
}
|
||||
{
|
||||
enum Foo : int {};
|
||||
constexpr QTaggedPointer<int, Foo> p = nullptr;
|
||||
Q_UNUSED(p);
|
||||
}
|
||||
}
|
||||
|
||||
void tst_QTaggedPointer::construction()
|
||||
{
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue