C++ (Qt)Variant v;v = 10;if (v.isType<int>()) cout << v.value<int>() << endl;
C++ (Qt)Variant a, b, c;..Variant result = (a > 0) ? b : c;
C++ (Qt)template <typename T> bool isType() const { return std::dynamic_pointer_cast<Holder<T>>(holder_) != 0; }
C++ (Qt)template <typename T> const T& value() const throw (std::bad_cast) { if (!isType<T>()) throw std::bad_cast(); return std::static_pointer_cast<Holder<T>>(holder_)->value; }
C++ (Qt)template <typename Type>struct HasEqualOperator{typedef char yes[1];typedef char no[2];template <std::size_t N>struct SFINAE {};template <typename T>static yes& isEqualComparable(SFINAE<sizeof(*static_cast<T*>(0) == *static_cast<T*>(0))>* = 0);