QVariant::ConstPointer Class

template <typename Pointed> class QVariant ::ConstPointer

QVariant::ConstPointer is a template class that emulates a const pointer to QVariant . 更多...

This class was introduced in Qt 6.11.

公共函数

ConstPointer (Pointed && pointed )
ConstPointer (const Pointed & pointed )
QVariant::ConstReference<Pointed> operator* () const

详细描述

QVariant::ConstPointer wraps pointed-to value and returns a QVariant::ConstReference 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(...)] ConstPointer:: ConstPointer ( Pointed && pointed )

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

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

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

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

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

[noexcept(...)] QVariant::ConstReference < Pointed > ConstPointer:: operator* () const

解引用 QVariant::ConstPointer QVariant::ConstReference .

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