lundi 24 août 2015

Possible meaning of x > y > new T : syntax

I was reading this article about the most useful C++11 features and I bumped into this chunk of code in the last section:

 if(_size != copy._size)
 {
    _buffer = nullptr;
    _size = copy._size;
    _buffer = _size > 0 > new T[_size] : nullptr;
 }

I was used to consider the last line as (_size > 0) > other_Value but in this case the right operand is a new declaration. I really cannot understand the sense of it. Also, what does the : nullptr refer to? Is there something which is initialised to nullptr? If yes, what?

Aucun commentaire:

Enregistrer un commentaire