I have created the struct
struct Event
{
int key;
boost::variant<int, float> value;
};
Is it possible to create Events like so:
Event e;
I have tried this but am getting compiler errors. Is this possible or do i HAVE to do:
Event e = new Event();
*EDIT: * This is the error im getting: error C2061: syntax error : identifier 'storage_' (in variant.hpp)
There are some comments here in variant.hpp but i cant make sense of them, as the "first-bound type is an int???
// NOTE TO USER : // Compile error from here indicates that the first bound // type is not default-constructible, and so variant cannot // support its own default-construction. //