Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
| From | James Kuyper <jameskuyper@verizon.net> |
|---|---|
| Newsgroups | comp.std.c++ |
| Subject | Re: What's a "side effect" |
| Date | 2012-10-07 07:43 -0700 |
| Organization | A noiseless patient Spider |
| Message-ID | <506F093C.1000505@verizon.net> (permalink) |
| References | <506de288$0$71204$742ec2ed@news.sonic.net> |
On 10/05/2012 04:35 AM, Andy Lutomirski wrote: > > I'm trying to userstand the memory model. [intro.multithread] mentions > lots of things like: > > A release sequence ... is a maximal contiguous sub-sequence of side effects > > I know what a /visible/ side effect is (see #13), but that doesn't tell > me what a side effect is in the first place. I assume that a "side > effect" is just a write (e.g. "a = b" has a side effect of modifying a), > but AFAICS the N3376 has no language to support that assumption. > > Am I right? Should I submit a defect report? You're right - the expression "a = b" does have a side effect, which is the modification of the object identified by "a" (unless a very peculiar operator overload applies). However, there are other kinds of side effects that don't fit your description: "Accessing an object designated by a volatile glvalue (3.10), modifying an object, calling a library I/O function, or calling a function that does any of those operations are all side effects, ..." (1.9p12) The phrase "side effects" is italicized in that sentence, which is an ISO convention for indicating that the sentence containing that phrase constitutes the definition of that phrase. -- [ comp.std.c++ is moderated. To submit articles, try posting with your ] [ newsreader. If that fails, use mailto:std-cpp-submit@vandevoorde.com ] [ --- Please see the FAQ before posting. --- ] [ FAQ: http://www.comeaucomputing.com/csc/faq.html ]
Back to comp.std.c++ | Previous | Next — Previous in thread | Next in thread | Find similar
What's a "side effect" Andy Lutomirski <luto@amacapital.net> - 2012-10-05 02:35 -0600 Re: What's a "side effect" James Kuyper <jameskuyper@verizon.net> - 2012-10-07 07:43 -0700 Re: What's a "side effect" =3D?ISO-8859-1?Q?Daniel_Kr=3DFCgler?=3D <daniel.kruegler@googlemail.c= om> - 2012-10-08 09:11 -0700
csiph-web