What is equivalent to QVariant in C ++?

I am trying to port a Qt application to C ++ using STL. What is equivalent QVariantin C ++? QVariantcan store any type of data - a container that contains heterogeneous - different types of objects. However, I need to port this application to C ++. What is equivalent QVariantin C ++?

+4
source share
2 answers

What is the equivalent of QVariant in C ++?

Equivalent in C ++ is called . QVariant

The half-fur coat aside, it is probably closest to the alliance, but QVariant is much more; meta types, CoW, etc.

, STL, , .

, QVariant, , QtCore.

:

QVariant Qt.

++ , , , Qt . QVariant QObject:: property() ..

, ++ 11 . : :

, Qt , ++ 11?

, , boost QtCore .

. , , .

Boost , QtCore - . Qt ( ) , , QtCore.

, STL , , .

+13

++ 17 std:: any ( ) std:: variant ( ). GCC 7, Clang 4.0 Visual ++ 2017.

(, ), , QVariant.

+2

Source: https://habr.com/ru/post/1568632/


All Articles