On Sat, Nov 27, 2004 at 14:02:48 +0100, Kresimir Culin wrote: > What is wrong with: > > Glib::Value<int> vb; > vb.set(10); I believe you have to call init() method before. > btw I need some kind a variant class. > is Glib::Value good choice? It's a bit problematic. It does not have constructors from argument (ie. the above would be nice written as Glib::Value<int> vb = 10, but that does not work) nor cast operators (int val = vb won't work either). The template nature makes it hard to construct Glib::Value from GValue. Glib::ValueBase could be probably used as a base class, but you will likely need some goodies on top of that. (I am thinking of doing something similar sooner or later.) ------------------------------------------------------------------------------- Jan 'Bulb' Hudec <bulb ucw cz>
Attachment:
signature.asc
Description: Digital signature