Jakub Jelinek via Gcc-patches <gcc-patches@gcc.gnu.org> wrote:

On Mon, May 25, 2020 at 06:37:57PM +0200, Richard Biener wrote:
I thought of using std::tuple  but it requires c++11 support.
I am not sure we always build gcc with c++11?

https://gcc.gnu.org/install/prerequisites.html

We do for GCC 11 :-)  Since we pay the price for progress, let's reap
the
benefits as well :-)

Not sure if the benefit is enough to warrant an extra (complex?) standard header in almost every TU.

Yeah, especially when one can just define the 3 fields of the small struct
to be descriptive, rather than being first/second/third.
+1,
tuple (and pair) have the property that the use of the fields might be obvious to the code author, but probably will not be to the code reader. IMO most of the time as Jakub says something descriptive is better - and I don’t believe it’s a performance penalty.

Iain

Reply via email to