Re: Same code and different result, Why?
- From: sdiverdi <stephen.diverdi@xxxxxxxxx>
- Date: Fri, 7 Nov 2008 15:01:26 -0800 (PST)
On Nov 7, 2:29 pm, "Igor Tandetnik" <itandet...@xxxxxxxx> wrote:
Right, that makes sense (er, as much as any of this does ;-) ) - so
Perhaps a better example might be something like this:
int& set(int& x, int y) { x = y; return x; }
int x = 1, y = 2;
x = x++ + y++; // undefined
set(x, x++ + y++); // well-defined
why is the built-in assignment operator not a sequence point, but the
assignment operator for a class is?
-stephen diverdi
-stephen.diverdi@xxxxxxxxx
.
- Follow-Ups:
- Re: Same code and different result, Why?
- From: Bo Persson
- Re: Same code and different result, Why?
- References:
- Same code and different result, Why?
- From: Lorry Astra
- Re: Same code and different result, Why?
- From: Alex Blekhman
- Re: Same code and different result, Why?
- From: Tommy
- Re: Same code and different result, Why?
- From: Ulrich Eckhardt
- Re: Same code and different result, Why?
- From: sdiverdi
- Re: Same code and different result, Why?
- From: Igor Tandetnik
- Same code and different result, Why?
- Prev by Date: Re: Same code and different result, Why?
- Next by Date: Re: using const & in function prototypes
- Previous by thread: Re: Same code and different result, Why?
- Next by thread: Re: Same code and different result, Why?
- Index(es):
Relevant Pages
|