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 : richard (at) *nospam* damon-family.org (Richard Damon)
Groupes : comp.lang.c comp.lang.c++
Date : 22. Jun 2024, 20:50:08
Autres entêtes
Organisation : i2pn2 (i2pn.org)
Message-ID : <v576d0$onl3$13@i2pn2.org>
References : 1 2 3 4 5 6 7 8 9
User-Agent : Mozilla Thunderbird
On 6/22/24 2:00 PM, Bonita Montero wrote:
Am 22.06.2024 um 19:20 schrieb Richard Damon:
 
C++ made a special rule for the << operator because the gain for its use as an output was high enough, and the cost as a normal shift operator was rarely high (and normally hidden by the "as if" rule) so it was done there.
 I guess C++ doesn't make a statement on that and the ordered behaviour
depens in the cascaded return of the stream-object.
My understanding is that the Standard made that a requirement so the cascaded operands would be computed in the right order.
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.
That was considered useful enough, and where << is used as the shift operator, the restriction is unlikely to cause a large impact, so they did it for that special case.

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