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

Liste des GroupesRevenir à l c 
Sujet : Re: Can you please verify that the analysis of these C functions is correct?
De : david.brown (at) *nospam* hesbynett.no (David Brown)
Groupes : comp.lang.c comp.lang.c++
Date : 23. Jun 2024, 14:38:06
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <v594ve$ban8$2@dont-email.me>
References : 1 2 3 4 5 6 7 8 9 10 11
User-Agent : Mozilla Thunderbird
On 23/06/2024 08:52, 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.
Both the left part and the right part need to be evaluated before the operator between them can be evaluated - but the two parts can be evaluated in either order (or even interleaved in their evaluation). Associativity is irrelevant.
Before C++17 (which added the rules for sequencing for shifts, and made a few other changes), if you had:
foo() << bar()
then the compiler could evaluate bar() then foo(), or foo() then bar(). It can still happily arrange them as it wants for "foo() + bar()".
<https://en.cppreference.com/w/cpp/language/eval_order>

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