Re: [protobuf] Can protobuf work with C++ templates?

2015-01-21 Thread Ji Wan
Got a new skill :P Thanks very much! --- Original Message --- From: Stephen Tu tu.steph...@gmail.com Sent: January 22, 2015 1:28 AM To: Ji Wan wa...@live.com Cc: protobuf@googlegroups.com Subject: Re: [protobuf] Can protobuf work with C++ templates? This is not really a protobuf question

[protobuf] Can protobuf work with C++ templates?

2015-01-20 Thread Ji Wan
Suppose I have two message types `DoubleMatrix` and `FloatMatrix`, and a template class `Matrix`: message DoubleMatrix { required uint32 rows = 1; required uint32 cols = 2; repeated double data = 3 [packed=true]; } message FloatMatrix { required uint32 rows = 1; required uint32