Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c++ > #118888
| From | Tim Rentsch <tr.17687@z991.linuxsc.com> |
|---|---|
| Newsgroups | comp.lang.c++ |
| Subject | Re: Q: how to make an object that throws |
| Date | 2024-04-25 14:08 -0700 |
| Organization | A noiseless patient Spider |
| Message-ID | <86bk5xw3o5.fsf@linuxsc.com> (permalink) |
| References | <n6Ocnf_tkL8shbr7nZ2dnZfqn_qdnZ2d@giganews.com> <87wmoon5d3.fsf@fuzy.me> <object-20240424202505@ram.dialup.fu-berlin.de> |
ram@zedat.fu-berlin.de (Stefan Ram) writes: > Zhengyi Fu <i@fuzy.me> wrote or quoted: > >> int *object = NULL; > > This seems to be what's helping the OP, but when you consider > that the subject line is "how to make an object that throws", > you'd actually have to say that the thrower here is not an > object, but rather the /absence of an object/. > > This of course has to do with how objects are specified. > > In C++, an expression can stand directly for an object, so > an assignment copies that object. In other languages, In some other languages. Certainly not all other languages. > objects > are always implicitly specified by references/pointers, and > an assignment copies that reference/pointer. Some languages that use pointer semantics rather than using "objects" directly don't have a way to do assignment, so the question of what is copied is moot.
Back to comp.lang.c++ | Previous | Next — Previous in thread | Find similar | Unroll thread
Q: how to make an object that throws Ross Finlayson <ross.a.finlayson@gmail.com> - 2024-04-22 19:11 -0700
Re: Q: how to make an object that throws Sam <sam@email-scan.com> - 2024-04-22 22:32 -0400
Re: Q: how to make an object that throws Ross Finlayson <ross.a.finlayson@gmail.com> - 2024-04-22 21:51 -0700
Re: Q: how to make an object that throws Sam <sam@email-scan.com> - 2024-04-23 07:26 -0400
Re: Q: how to make an object that throws Ross Finlayson <ross.a.finlayson@gmail.com> - 2024-04-23 08:39 -0700
Re: Q: how to make an object that throws Sam <sam@email-scan.com> - 2024-04-23 22:08 -0400
Re: Q: how to make an object that throws Ross Finlayson <ross.a.finlayson@gmail.com> - 2024-04-23 20:07 -0700
Re: Q: how to make an object that throws Ross Finlayson <ross.a.finlayson@gmail.com> - 2024-04-23 22:10 -0700
Re: Q: how to make an object that throws Zhengyi Fu <i@fuzy.me> - 2024-04-23 11:08 +0800
Re: Q: how to make an object that throws Ross Finlayson <ross.a.finlayson@gmail.com> - 2024-04-22 21:52 -0700
Re: Q: how to make an object that throws wij <wyniijj5@gmail.com> - 2024-04-25 02:56 +0800
Re: Q: how to make an object that throws Ross Finlayson <ross.a.finlayson@gmail.com> - 2024-04-24 12:02 -0700
Re: Q: how to make an object that throws Ross Finlayson <ross.a.finlayson@gmail.com> - 2024-04-24 13:56 -0700
Re: Q: how to make an object that throws Ross Finlayson <ross.a.finlayson@gmail.com> - 2024-04-27 08:09 -0700
Re: Q: how to make an object that throws Tim Rentsch <tr.17687@z991.linuxsc.com> - 2024-04-25 14:08 -0700
csiph-web