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


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

Re: Q: how to make an object that throws

Path csiph.com!news.swapon.de!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From Tim Rentsch <tr.17687@z991.linuxsc.com>
Newsgroups comp.lang.c++
Subject Re: Q: how to make an object that throws
Date Thu, 25 Apr 2024 14:08:58 -0700
Organization A noiseless patient Spider
Lines 25
Message-ID <86bk5xw3o5.fsf@linuxsc.com> (permalink)
References <n6Ocnf_tkL8shbr7nZ2dnZfqn_qdnZ2d@giganews.com> <87wmoon5d3.fsf@fuzy.me> <object-20240424202505@ram.dialup.fu-berlin.de>
MIME-Version 1.0
Content-Type text/plain; charset=us-ascii
Injection-Date Thu, 25 Apr 2024 23:08:58 +0200 (CEST)
Injection-Info dont-email.me; posting-host="4d027413e75dd4b7b3c31e0f92925554"; logging-data="3382317"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/wFVGkzp8UpEVAwBb5Wlmj3hBevP5Ocqw="
User-Agent Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux)
Cancel-Lock sha1:JtsWcNXrNAan6IwOh4dffdfrQH0= sha1:JD8Pe2FK43tEWTOy5gra84An8Ls=
Xref csiph.com comp.lang.c++:118888

Show key headers only | View raw


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 | NextPrevious in thread | Find similar | Unroll thread


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