Re: Can you please verify that the analysis of these C functions is correct?

Liste des GroupesRevenir à cl c  
Sujet : Re: Can you please verify that the analysis of these C functions is correct?
De : richard (at) *nospam* damon-family.org (Richard Damon)
Groupes : comp.lang.c comp.lang.c++
Date : 23. Jun 2024, 13:38:41
Autres entêtes
Organisation : i2pn2 (i2pn.org)
Message-ID : <v591g1$rmf0$5@i2pn2.org>
References : 1 2 3 4 5 6 7 8 9 10 11
User-Agent : Mozilla Thunderbird
On 6/23/24 2:52 AM, Bonita Montero wrote:
Am 22.06.2024 um 20:50 schrieb Richard Damon:
 
Prior to that, it was allowed to compute the order of the terms being output in any order, as the call to operator <<(ostream& strm, T& value) was allowd to compute value before resolving stream (as the value from the previous operator <<, which caught enough people off guard.
 With a left-associative operator the result of the left part has to be
calculated before it can be used with the right part.
But the right part can be calculated before the left part is.
so in the call sequence: statement a+b+c where a,b, and c are expressions of user defined types this becomes
operator+(operator+(a, b), c)
the expressions a, b and c can be evaluated in any order.
The change was that for operator<< the order of evalutation is DEFINED to be a, then b, then c. That order was NOT provided for +.
Yes, the outer call can't be done before the inner call returns, but unless there is a specific requirement in the Standard, no order of the sub-expressions is implied.

Date Sujet#  Auteur
17 Jun 24 * Can you please verify that the analysis of these C functions is correct?25olcott
17 Jun 24 +* Re: Can you please verify that the analysis of these C functions is correct?23Bonita Montero
17 Jun 24 i+- Re: Can you please verify that the analysis of these C functions is correct?1olcott
19 Jun 24 i+- Re: Can you please verify that the analysis of these C functions is correct?1olcott
21 Jun 24 i`* Re: Can you please verify that the analysis of these C functions is correct?20olcott
22 Jun 24 i +* Re: Can you please verify that the analysis of these C functions is correct?18Richard Harnden
22 Jun 24 i i`* Re: Can you please verify that the analysis of these C functions is correct?17olcott
22 Jun 24 i i `* Re: Can you please verify that the analysis of these C functions is correct?16Richard Damon
22 Jun 24 i i  `* Re: Can you please verify that the analysis of these C functions is correct?15olcott
22 Jun 24 i i   +* Re: Can you please verify that the analysis of these C functions is correct?6Richard Damon
22 Jun 24 i i   i`* Re: Can you please verify that the analysis of these C functions is correct?5Bonita Montero
22 Jun 24 i i   i `* Re: Can you please verify that the analysis of these C functions is correct?4Richard Damon
23 Jun 24 i i   i  `* Re: Can you please verify that the analysis of these C functions is correct?3Bonita Montero
23 Jun 24 i i   i   +- Re: Can you please verify that the analysis of these C functions is correct?1Richard Damon
23 Jun 24 i i   i   `- Re: Can you please verify that the analysis of these C functions is correct?1David Brown
22 Jun 24 i i   +* Re: Can you please verify that the analysis of these C functions is correct?7Bonita Montero
22 Jun 24 i i   i`* Re: Can you please verify that the analysis of these C functions is correct?6Chris M. Thomasson
22 Jun 24 i i   i +* Re: Can you please verify that the analysis of these C functions is correct?3Richard Damon
22 Jun 24 i i   i i+- Re: Can you please verify that the analysis of these C functions is correct?1Chris M. Thomasson
22 Jun 24 i i   i i`- Re: Can you please verify that the analysis of these C functions is correct?1Chris M. Thomasson
22 Jun 24 i i   i +- Re: Can you please verify that the analysis of these C functions is correct?1James Kuyper
23 Jun 24 i i   i `- Re: Can you please verify that the analysis of these C functions is correct?1David Brown
23 Jun 24 i i   `- Re: Can you please verify that the analysis of these C functions is correct?1David Brown
26 Jun 24 i `- Re: Can you please verify that the analysis of these C functions is correct?1Bonita Montero
23 Jun 24 `- Re: Can you please verify that the analysis of these C functions is correct?1olcott

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal