QVariant::Pointer Class

template <typename Pointed> class QVariant ::Pointer

QVariant::Pointer is a template class that emulates a non-const pointer to QVariant . 更多...

This class was introduced in Qt 6.11.

公共函数

Pointer (Pointed && pointed )
Pointer (const Pointed & pointed )
QVariant::Reference<Pointed> operator* () const

详细描述

QVariant::Pointer wraps pointed-to value and returns a QVariant::Reference to it from its operator*(). This makes it suitable as replacement for an actual pointer. We cannot return an actual pointer from generic iterators as the iterators don't hold an actual QVariant .

成员函数文档编制

[explicit noexcept(...)] Pointer:: Pointer ( Pointed && pointed )

构造 QVariant::Pointer from the value pointed to.

注意: This function is noexcept when std::is_nothrow_move_constructible_v<Pointed> is true .

[explicit noexcept(...)] Pointer:: Pointer (const Pointed & pointed )

构造 QVariant::Pointer from the value pointed to.

注意: This function is noexcept when std::is_nothrow_copy_constructible_v<Pointed> is true .

[noexcept(...)] QVariant::Reference < Pointed > Pointer:: operator* () const

解引用 QVariant::Pointer QVariant::Reference .

注意: This function is noexcept when std::is_nothrow_copy_constructible_v<Pointed> is true .