Status: New
Owner: [email protected]
Labels: Type-Defect Priority-Medium

New issue 382 by [email protected]: improving GOOGLE_ARRAYSIZE
http://code.google.com/p/protobuf/issues/detail?id=382

Current implementation is not good enough.

Use the following one:

template <class T, int Size>
char (& lengthof_impl(T (&)[Size]))[Size];

#define lengthof(a) sizeof(lengthof_impl(a))


--
You received this message because you are subscribed to the Google Groups "Protocol 
Buffers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/protobuf?hl=en.

Reply via email to