Top "Variant" questions

A variant data type is a tagged union that holds other data types.

boost::variant usage

I am developing GUI application via wxWidgets. It has 2 parts: GUI part and "Logic" part. I want to have Logic …

c++ variant boost-variant
VARIANT datatype of C++ into C#

What is equivalent of the VARIANT datatype of C++ in C#? I have code in C++ which uses the VARIANT …

c# c++ type-conversion variant
What's the difference between <h:head> and <head> in Java Facelets?

See this. When and why to use <h:head>, instead of <head>? I've seen Primefaces won't …

jsf facelets variant
How to build a SAFEARRAY of pointers to VARIANTs?

I'm trying to use a COM component with the following method: HRESULT _stdcall Run( [in] SAFEARRAY(BSTR) paramNames, [in] SAFEARRAY(…

c++ com variant safearray
visitor template for boost::variant

I would like to use a boost.variant<T0,T1,T2> as a parameter to a template 'Visitor' …

c++ templates boost variant boost-variant
boost::variant conversion to type

I have the following variant from the boost lib: typedef boost::variant<int, float, double, long, bool, std::string, …

c++ variant
How do I represent an Optional String in Go?

I wish to model a value which can have two possible forms: absent, or a string. The natural way to …

string go null optional variant
Function which returns an unknown type

class Test { public: SOMETHING DoIt(int a) { float FLOAT = 1.2; int INT = 2; char CHAR = 'a'; switch(a) { case 1: return INT; case 2: …

c++ visual-c++-2005 variant
What is the equivalent of boost::variant in the C++ standard library?

I am looking for an alternative to C-style union. boost::variant is one such option. Is there anything in std …

c++ boost unions variant boost-variant
check boost::variant<T> for null

I have a boost::variant in my program and I want to check if the variant itself is initialized and …

c++ boost null variant