From kfm-devel Thu Sep 26 20:52:59 2013 From: Frank Reininghaus Date: Thu, 26 Sep 2013 20:52:59 +0000 To: kfm-devel Subject: Re: UDSEntry compression ideas Message-Id: X-MARC-Message: https://marc.info/?l=kfm-devel&m=138022879919390 Hi, 2013/9/21 David Faure: >> 3. Right now the Field struct stores a QString and a long long. Certainly >> there must be a way to just use one type. I guess QVariant has too much >> overhead to be used, but something like that. > > That would be "union" instead of "struct", very simply. I'm not sure why we're > not using that, actually. Because it's impossible ;-) You cannot add types with non-trivial constructors or destructors to a union. The compiler wouldn't know what to do if such a union went into or out of scope. Regards, Frank