Max Samukha wrote:
> 
> I think the following real-world code is a good argument against comma
> operators:
> 
> template <typename T>
> Q_INLINE_TEMPLATE void QList<T>::node_destruct(Node *from, Node *to)
> {
>     if (QTypeInfo<T>::isLarge || QTypeInfo<T>::isStatic)
>         while(from != to) --to, delete reinterpret_cast<T*>(to->v);
>     else if (QTypeInfo<T>::isComplex)
>         while (from != to) --to, reinterpret_cast<T*>(to)->~T();
> }

I have never used the comma operator in my own code, but in my opinion this 
particular piece of code is really easy and fluent to read. 
»Maintainability« is admittedly, however, a different topic.

Reply via email to