why there is no TBase in thrift for dlang?

zhmt via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Jan 27 22:29:42 PST 2015


I resovled it by Generic programming :

	private const (ubyte)[] serialObj(T) (T obj)
	{
		TMemoryBuffer trans = new TMemoryBuffer();
		auto prot = new TCompactProtocol!TMemoryBuffer(trans);
		obj.write(prot);
		return trans.getContents();
	}


More information about the Digitalmars-d-learn mailing list