38 void pairOfReferences();
39 void structuredBindings();
41 void testConversions();
42 void taskQTBUG_48780_pairContainingCArray();
43 void testDeductionRules();
96 void tst_QPair::pairOfReferences()
125 void tst_QPair::structuredBindings()
131 PV pv = {42,
"Hello"};
132 PR pr = {pv.first, pv.second};
152 PV pv = {42,
"Hello"};
153 PR pr = {pv.first, pv.second};
175 void tst_QPair::testConstexpr()
182 constexpr
bool equal = pDD2 == pDD;
189 void tst_QPair::testConversions()
219 #define rhs qMakePair(42, 4.5)
232 #define rhs qMakePair(42, 4.5)
246 void tst_QPair::taskQTBUG_48780_pairContainingCArray()
256 void tst_QPair::testDeductionRules()
258 #if defined(__cpp_deduction_guides) && __cpp_deduction_guides >= 201907L
260 static_assert(std::is_same<decltype(
p1)::first_type, decltype(1)>::
value);
261 static_assert(std::is_same<decltype(
p1)::second_type, decltype(2)>::
value);
266 static_assert(std::is_same<decltype(
p2)::first_type,
QString>::
value);
267 static_assert(std::is_same<decltype(
p2)::second_type, decltype(2)>::
value);
272 static_assert(std::is_same<decltype(p3)::first_type, decltype(
p2)::first_type>::
value);
273 static_assert(std::is_same<decltype(p3)::second_type, decltype(
p2)::second_type>::
value);
277 QSKIP(
"Unsupported (requires C++20's CTAD for aliases)");
282 #include "tst_qpair.moc"
small capitals from c petite p scientific i
[1]
The QLatin1String class provides a thin wrapper around an US-ASCII/Latin-1 encoded string literal.
The QObject class is the base class of all Qt objects.
The QSize class defines the size of a two-dimensional object using integer point precision.
The QString class provides a Unicode character string.
#define Q_DECL_UNUSED_MEMBER
std::pair< T1, T2 > QPair
EGLOutputLayerEXT EGLint EGLAttrib value
GLdouble GLdouble GLdouble GLdouble q
constexpr decltype(auto) qMakePair(T1 &&value1, T2 &&value2) noexcept(noexcept(std::make_pair(std::forward< T1 >(value1), std::forward< T2 >(value2))))
#define QTEST_APPLESS_MAIN(TestObject)
#define QSKIP(statement,...)
#define QVERIFY(statement)
QT_BEGIN_NAMESPACE Q_DECLARE_TYPEINFO(M, Q_RELOCATABLE_TYPE)
QT_END_NAMESPACE typedef QPair< C, C > QPairCC