Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c++ > #119522

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

From Richard Damon <richard@damon-family.org>
Newsgroups comp.lang.c, comp.lang.c++
Subject Re: Can you please verify that the analysis of these C functions is correct?
Date 2024-06-23 07:38 -0400
Organization i2pn2 (i2pn.org)
Message-ID <v591g1$rmf0$5@i2pn2.org> (permalink)
References (6 earlier) <v56uij$3rako$1@dont-email.me> <v57155$onl3$10@i2pn2.org> <v573g3$3s8q3$2@raubtier-asyl.eternal-september.org> <v576d0$onl3$13@i2pn2.org> <v58gmi$7p22$1@raubtier-asyl.eternal-september.org>

Cross-posted to 2 groups.

Show all headers | View raw


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.

Back to comp.lang.c++ | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Can you please verify that the analysis of these C functions is correct? olcott <polcott333@gmail.com> - 2024-06-16 22:47 -0500
  Re: Can you please verify that the analysis of these C functions is correct? Bonita Montero <Bonita.Montero@gmail.com> - 2024-06-17 16:11 +0200
    Re: Can you please verify that the analysis of these C functions is correct? olcott <polcott333@gmail.com> - 2024-06-17 09:26 -0500
    Re: Can you please verify that the analysis of these C functions is correct? olcott <polcott333@gmail.com> - 2024-06-19 11:03 -0500
    Re: Can you please verify that the analysis of these C functions is correct? olcott <polcott333@gmail.com> - 2024-06-21 16:41 -0500
      Re: Can you please verify that the analysis of these C functions is correct? Richard Harnden <richard.nospam@gmail.invalid> - 2024-06-22 11:13 +0100
        Re: Can you please verify that the analysis of these C functions is correct? olcott <polcott333@gmail.com> - 2024-06-22 07:42 -0500
          Re: Can you please verify that the analysis of these C functions is correct? Richard Damon <richard@damon-family.org> - 2024-06-22 09:58 -0400
            Re: Can you please verify that the analysis of these C functions is correct? olcott <polcott333@gmail.com> - 2024-06-22 11:36 -0500
              Re: Can you please verify that the analysis of these C functions is correct? Richard Damon <richard@damon-family.org> - 2024-06-22 13:20 -0400
                Re: Can you please verify that the analysis of these C functions is correct? Bonita Montero <Bonita.Montero@gmail.com> - 2024-06-22 20:00 +0200
                Re: Can you please verify that the analysis of these C functions is correct? Richard Damon <richard@damon-family.org> - 2024-06-22 14:50 -0400
                Re: Can you please verify that the analysis of these C functions is correct? Bonita Montero <Bonita.Montero@gmail.com> - 2024-06-23 08:52 +0200
                Re: Can you please verify that the analysis of these C functions is correct? Richard Damon <richard@damon-family.org> - 2024-06-23 07:38 -0400
                Re: Can you please verify that the analysis of these C functions is correct? David Brown <david.brown@hesbynett.no> - 2024-06-23 14:38 +0200
              Re: Can you please verify that the analysis of these C functions is correct? Bonita Montero <Bonita.Montero@gmail.com> - 2024-06-22 19:58 +0200
                Re: Can you please verify that the analysis of these C functions is correct? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2024-06-22 12:17 -0700
                Re: Can you please verify that the analysis of these C functions is correct? Richard Damon <richard@damon-family.org> - 2024-06-22 16:15 -0400
                Re: Can you please verify that the analysis of these C functions is correct? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2024-06-22 13:20 -0700
                Re: Can you please verify that the analysis of these C functions is correct? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2024-06-22 13:26 -0700
                Re: Can you please verify that the analysis of these C functions is correct? James Kuyper <jameskuyper@alumni.caltech.edu> - 2024-06-22 17:49 -0400
                Re: Can you please verify that the analysis of these C functions is correct? David Brown <david.brown@hesbynett.no> - 2024-06-23 14:43 +0200
              Re: Can you please verify that the analysis of these C functions is correct? David Brown <david.brown@hesbynett.no> - 2024-06-23 14:30 +0200
      Re: Can you please verify that the analysis of these C functions is correct? Bonita Montero <Bonita.Montero@gmail.com> - 2024-06-26 18:32 +0200
        Re: Can you please verify that the analysis of these C functions is correct? DFS <nospam@dfs.com> - 2024-06-26 13:09 -0400
          Re: Can you please verify that the analysis of these C functions is correct? Bonita Montero <Bonita.Montero@gmail.com> - 2024-06-26 19:42 +0200
            Re: Can you please verify that the analysis of these C functions is correct? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2024-06-26 11:54 -0700
            Re: Can you please verify that the analysis of these C functions is correct? DFS <nospam@dfs.com> - 2024-06-27 08:51 -0400
              Re: Can you please verify that the analysis of these C functions is correct? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2024-06-27 13:51 -0700
  Re: Can you please verify that the analysis of these C functions is correct? olcott <polcott333@gmail.com> - 2024-06-22 20:22 -0500

csiph-web