Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

Save gas, don't use the shell.


devel / comp.lang.c++ / Re: shared_ptr array range loop doesn't work

SubjectAuthor
* shared_ptr array range loop doesn't workMuttley
+* Re: shared_ptr array range loop doesn't workChris M. Thomasson
|`* Re: shared_ptr array range loop doesn't workMuttley
| `- Re: shared_ptr array range loop doesn't workChris M. Thomasson
+* Re: shared_ptr array range loop doesn't workBonita Montero
|`- Re: shared_ptr array range loop doesn't workMuttley
+* Re: shared_ptr array range loop doesn't workAlf P. Steinbach
|`* Re: shared_ptr array range loop doesn't workMuttley
| `* Re: shared_ptr array range loop doesn't workBonita Montero
|  `- Re: shared_ptr array range loop doesn't workMuttley
+* Re: shared_ptr array range loop doesn't workPavel
|+- Re: shared_ptr array range loop doesn't workMuttley
|`* Re: shared_ptr array range loop doesn't workAlf P. Steinbach
| +* Re: shared_ptr array range loop doesn't workChris M. Thomasson
| |`- Re: shared_ptr array range loop doesn't workMuttley
| `* Re: shared_ptr array range loop doesn't workPavel
|  +* Re: shared_ptr array range loop doesn't workMuttley
|  |+* Re: shared_ptr array range loop doesn't workBonita Montero
|  ||`* Re: shared_ptr array range loop doesn't workMuttley
|  || +* Re: shared_ptr array range loop doesn't workFred. Zwarts
|  || |`- Re: shared_ptr array range loop doesn't workMuttley
|  || `* Re: shared_ptr array range loop doesn't workBonita Montero
|  ||  `* Re: shared_ptr array range loop doesn't workMuttley
|  ||   `* Re: shared_ptr array range loop doesn't workBonita Montero
|  ||    `* Re: shared_ptr array range loop doesn't workMuttley
|  ||     +* Re: shared_ptr array range loop doesn't workBonita Montero
|  ||     |`* Re: shared_ptr array range loop doesn't workMuttley
|  ||     | `- Re: shared_ptr array range loop doesn't workBonita Montero
|  ||     `- Re: shared_ptr array range loop doesn't workPavel
|  |`* Re: shared_ptr array range loop doesn't workPavel
|  | `* Re: shared_ptr array range loop doesn't workÖö Tiib
|  |  `- Re: shared_ptr array range loop doesn't workPavel
|  `* Re: shared_ptr array range loop doesn't workAlf P. Steinbach
|   `* Re: shared_ptr array range loop doesn't workPavel
|    `- Re: shared_ptr array range loop doesn't workChris M. Thomasson
`* Re: shared_ptr array range loop doesn't workjames...@alumni.caltech.edu
 `* Re: shared_ptr array range loop doesn't workMuttley
  +- Re: shared_ptr array range loop doesn't workBonita Montero
  `* Re: shared_ptr array range loop doesn't workjames...@alumni.caltech.edu
   `* Re: shared_ptr array range loop doesn't workMuttley
    `* Re: shared_ptr array range loop doesn't workjames...@alumni.caltech.edu
     `* Re: shared_ptr array range loop doesn't workMuttley
      `* Re: shared_ptr array range loop doesn't workBonita Montero
       `* Re: shared_ptr array range loop doesn't workÖö Tiib
        `* Re: shared_ptr array range loop doesn't workMuttley
         `* Re: shared_ptr array range loop doesn't workBonita Montero
          `- Re: shared_ptr array range loop doesn't workMuttley

Pages:12
Re: shared_ptr array range loop doesn't work

<u4hhtm$2f71h$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=193&group=comp.lang.c%2B%2B#193

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: alf.p.steinbach@gmail.com (Alf P. Steinbach)
Newsgroups: comp.lang.c++
Subject: Re: shared_ptr array range loop doesn't work
Date: Tue, 23 May 2023 07:11:17 +0200
Organization: A noiseless patient Spider
Lines: 72
Message-ID: <u4hhtm$2f71h$1@dont-email.me>
References: <u44q2h$7ps9$1@dont-email.me>
<bfe02770-89c2-5a3e-860e-1676fadd132d@removeyourself.dontspam.yahoo>
<u4bek2$169ir$1@dont-email.me> <WAgaM.571516$mmyc.42481@fx37.iad>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 23 May 2023 05:11:18 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="6e34c64618a2b2008d6e34ec239ba33e";
logging-data="2595889"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+Qi28D4bqKMYGhL2gXQ6xd"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.11.0
Cancel-Lock: sha1:J2w4tL1rut3C1WHMmOUiv7hgmA4=
In-Reply-To: <WAgaM.571516$mmyc.42481@fx37.iad>
Content-Language: en-US
 by: Alf P. Steinbach - Tue, 23 May 2023 05:11 UTC

On 2023-05-21 5:53 AM, Pavel wrote:
> Alf P. Steinbach wrote:
>> On 2023-05-20 5:19 AM, Pavel wrote:
>>> Muttley@dastardlyhq.com wrote:
>>>> Is there a way to get range loops to work with arrays stored in
>>>> shared pointers?
>>> These shared pointers do not store arrays. They store pointers to
>>> memory object allocated with operator new[].
>>>
>>> In other words, the type shared_ptr<mystruct[3]>::element_type is
>>> same as shared_ptr<mystruct>::element_type i.e. mystruct.
>>>
>>> To get a feeling of why it's natural, note that the type of the
>>> expression "new mystruct[3]" that you use to initalize sp is
>>> mystruct*, not mystruct (*)[3].
>>>
>>> Therefore, it is not possible to iterate the way you want: there is
>>> no either constexpr 3 anywhere in the type of shared_ptr<mystruct[3]>
>>> or non-constexpr 3 that could be extracted from the object in memory
>>> in any implementation-independent way. Thus, there is no way for C++
>>> compiler to generate the code that would compute the end of the range.
>>
>> Oh, there is such a way.
> Not without changing the Standard. My understanding is that OP tried to
> make his code iterate with the shared pointers *as they are currently
> defined* in the Standard.
>
>>
>> `shared_ptr` currently makes available an indexing operator if the
>> item type is array: <url:
>> https://en.cppreference.com/w/cpp/memory/shared_ptr/operator_at>.
>>
>> It could just as easily make available `begin` and `end` operations
>> for array item type, and then a range based loop would Just Work. My
>> earlier answer in this thread showed how to do that oneself. And what
>> I can do (it was trivial enough that a dino could manage) the
>> committee could do.
> They could, for the template parameter of an array type U[N]. It is
> unclear what is supposed to be done for the parameter of an array type U[].
>
> But, with the current Standard, the N is lost. I am ok with this though
> as adding this "feature" would open the whole new can of warms for
> unclear benefit.
>
> E.g. assume that, in line with your example, N becomes part of
> shared_ptr instatiation *type*

It is.

For example, otherwise my example of how to do this would not work.

> and consider this definition:
>
> shared_ptr<mystruct[3]> sp(new mystruct[2]);
>
> or, even better:
>
> shared_ptr<mystruct[3]> sp(new mystruct[getNOfMyStructs()]);
>
> What can possibly go wrong? (TM)

You shot your leg off.

C++ allows that, in general.

shared_ptr provides support for arrays, including I believe restrictions
on conversions, but not total type safety enforcement.

- Alf

Re: shared_ptr array range loop doesn't work

<b30c545f-51b5-49ac-b790-dfbbdce9673en@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=194&group=comp.lang.c%2B%2B#194

  copy link   Newsgroups: comp.lang.c++
X-Received: by 2002:a05:620a:44c8:b0:759:44c0:448c with SMTP id y8-20020a05620a44c800b0075944c0448cmr3738091qkp.5.1684826084661;
Tue, 23 May 2023 00:14:44 -0700 (PDT)
X-Received: by 2002:a05:620a:2808:b0:759:1e4d:7a35 with SMTP id
f8-20020a05620a280800b007591e4d7a35mr3710928qkp.2.1684826084525; Tue, 23 May
2023 00:14:44 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!feeder1.feed.usenet.farm!feed.usenet.farm!peer02.ams4!peer.am4.highwinds-media.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.c++
Date: Tue, 23 May 2023 00:14:44 -0700 (PDT)
In-Reply-To: <riWaM.2057692$MVg8.1935284@fx12.iad>
Injection-Info: google-groups.googlegroups.com; posting-host=84.50.190.130; posting-account=pysjKgkAAACLegAdYDFznkqjgx_7vlUK
NNTP-Posting-Host: 84.50.190.130
References: <u44q2h$7ps9$1@dont-email.me> <bfe02770-89c2-5a3e-860e-1676fadd132d@removeyourself.dontspam.yahoo>
<u4bek2$169ir$1@dont-email.me> <WAgaM.571516$mmyc.42481@fx37.iad>
<u4f8s7$249jm$1@dont-email.me> <riWaM.2057692$MVg8.1935284@fx12.iad>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <b30c545f-51b5-49ac-b790-dfbbdce9673en@googlegroups.com>
Subject: Re: shared_ptr array range loop doesn't work
From: ootiib@hot.ee (Öö Tiib)
Injection-Date: Tue, 23 May 2023 07:14:44 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 2037
 by: Öö Tiib - Tue, 23 May 2023 07:14 UTC

On Tuesday, 23 May 2023 at 06:22:18 UTC+3, Pavel wrote:
>
> (I personally think it is a shame that we don't have an exact-size
> vector (i.e. a vector sized like valarray, with no capacities) but still
> it is not a good excuse to abuse poor little smart pointers. For the
> exact-size vector, using new[]- allocated memory and compiler trickery
> for N could be justified).
>
IOW it is shame that the implementation-dependent way of figuring
how many destructors to call with delete[] to pointer allocated with
new[] is not exposed to programmers for to write such a class
themselves if the standard library does not bother.

Re: shared_ptr array range loop doesn't work

<u4hsq3$2g82o$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=195&group=comp.lang.c%2B%2B#195

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Muttley@dastardlyhq.com
Newsgroups: comp.lang.c++
Subject: Re: shared_ptr array range loop doesn't work
Date: Tue, 23 May 2023 08:17:07 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 18
Message-ID: <u4hsq3$2g82o$1@dont-email.me>
References: <u44q2h$7ps9$1@dont-email.me>
<bfe02770-89c2-5a3e-860e-1676fadd132d@removeyourself.dontspam.yahoo>
<u4bek2$169ir$1@dont-email.me> <WAgaM.571516$mmyc.42481@fx37.iad>
<u4f8s7$249jm$1@dont-email.me> <u4fa6g$24edb$1@dont-email.me>
<u4fc9e$24mpi$1@dont-email.me> <u4g2sb$27344$1@dont-email.me>
<u4g3ti$276ke$1@dont-email.me>
<u4g467$2773m$1@dont-email.me>
Injection-Date: Tue, 23 May 2023 08:17:07 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="ac7246579a84861d32da9608fdcf6404";
logging-data="2629720"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19DUuoZzhbDodF3lfRsxP1Q"
Cancel-Lock: sha1:yPpxvUIDK7MS28vkOAO76FFfFks=
 by: Muttley@dastardlyhq.com - Tue, 23 May 2023 08:17 UTC

On Mon, 22 May 2023 18:10:54 +0200
Bonita Montero <Bonita.Montero@gmail.com> wrote:
>Am 22.05.2023 um 18:06 schrieb Muttley@dastardlyhq.com:
>
>> They could easily be implemented implicitly just like here:
>>
>> char s[] = "hello";
>> for(auto c: s) cout << c;
>>
>> But yet again you missed the point.
>
>No, if the shared_ptr should behave like a container you'd need
>an iterator-type with * and ++ and a begin and end-method on the
>shared_ptr. I think the C++ designers thought this isn't necessary.

Well they thought it necessary to be able to store arrays and index them
inside a shared pointer, so why didn't they complete the job?

Re: shared_ptr array range loop doesn't work

<u4hsvh$2g8j5$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=196&group=comp.lang.c%2B%2B#196

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Bonita.Montero@gmail.com (Bonita Montero)
Newsgroups: comp.lang.c++
Subject: Re: shared_ptr array range loop doesn't work
Date: Tue, 23 May 2023 10:20:08 +0200
Organization: A noiseless patient Spider
Lines: 8
Message-ID: <u4hsvh$2g8j5$1@dont-email.me>
References: <u44q2h$7ps9$1@dont-email.me>
<bfe02770-89c2-5a3e-860e-1676fadd132d@removeyourself.dontspam.yahoo>
<u4bek2$169ir$1@dont-email.me> <WAgaM.571516$mmyc.42481@fx37.iad>
<u4f8s7$249jm$1@dont-email.me> <u4fa6g$24edb$1@dont-email.me>
<u4fc9e$24mpi$1@dont-email.me> <u4g2sb$27344$1@dont-email.me>
<u4g3ti$276ke$1@dont-email.me> <u4g467$2773m$1@dont-email.me>
<u4hsq3$2g82o$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 23 May 2023 08:20:01 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="41aac8370f29e02bee77e487c7b941a3";
logging-data="2630245"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18uZo4rX+QKswNlKRvCWUeapOD7k/IQcrA="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.11.0
Cancel-Lock: sha1:5KHuyQds6q5kmRvY+h+Q277vP44=
Content-Language: de-DE
In-Reply-To: <u4hsq3$2g82o$1@dont-email.me>
 by: Bonita Montero - Tue, 23 May 2023 08:20 UTC

Am 23.05.2023 um 10:17 schrieb Muttley@dastardlyhq.com:

> Well they thought it necessary to be able to store arrays and index
> them inside a shared pointer, so why didn't they complete the job?

No need to worry about that because there is a workaround that has
other benefits as well.

Re: shared_ptr array range loop doesn't work

<u4ht84$2g9gv$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=197&group=comp.lang.c%2B%2B#197

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Muttley@dastardlyhq.com
Newsgroups: comp.lang.c++
Subject: Re: shared_ptr array range loop doesn't work
Date: Tue, 23 May 2023 08:24:36 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 13
Message-ID: <u4ht84$2g9gv$1@dont-email.me>
References: <u44q2h$7ps9$1@dont-email.me>
<bfe02770-89c2-5a3e-860e-1676fadd132d@removeyourself.dontspam.yahoo>
<u4bek2$169ir$1@dont-email.me> <WAgaM.571516$mmyc.42481@fx37.iad>
<u4f8s7$249jm$1@dont-email.me> <u4fa6g$24edb$1@dont-email.me>
<u4fc9e$24mpi$1@dont-email.me> <u4g2sb$27344$1@dont-email.me>
<u4g3ti$276ke$1@dont-email.me> <u4g467$2773m$1@dont-email.me>
<u4hsq3$2g82o$1@dont-email.me>
<u4hsvh$2g8j5$1@dont-email.me>
Injection-Date: Tue, 23 May 2023 08:24:36 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="ac7246579a84861d32da9608fdcf6404";
logging-data="2631199"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/Movoz8Qb/8iTYCzkS5HRT"
Cancel-Lock: sha1:qgtHic4sxDG/tLIrILM2RwvJIEM=
 by: Muttley@dastardlyhq.com - Tue, 23 May 2023 08:24 UTC

On Tue, 23 May 2023 10:20:08 +0200
Bonita Montero <Bonita.Montero@gmail.com> wrote:
>Am 23.05.2023 um 10:17 schrieb Muttley@dastardlyhq.com:
>
>> Well they thought it necessary to be able to store arrays and index
>> them inside a shared pointer, so why didn't they complete the job?
>
>No need to worry about that because there is a workaround that has
>other benefits as well.

Yes I know, but thats not the point. If they going to add features to the
language why don't they do it properly instead of some half assed job?

Re: shared_ptr array range loop doesn't work

<u4ig0d$2j1q4$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=200&group=comp.lang.c%2B%2B#200

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Bonita.Montero@gmail.com (Bonita Montero)
Newsgroups: comp.lang.c++
Subject: Re: shared_ptr array range loop doesn't work
Date: Tue, 23 May 2023 15:44:51 +0200
Organization: A noiseless patient Spider
Lines: 9
Message-ID: <u4ig0d$2j1q4$1@dont-email.me>
References: <u44q2h$7ps9$1@dont-email.me>
<bfe02770-89c2-5a3e-860e-1676fadd132d@removeyourself.dontspam.yahoo>
<u4bek2$169ir$1@dont-email.me> <WAgaM.571516$mmyc.42481@fx37.iad>
<u4f8s7$249jm$1@dont-email.me> <u4fa6g$24edb$1@dont-email.me>
<u4fc9e$24mpi$1@dont-email.me> <u4g2sb$27344$1@dont-email.me>
<u4g3ti$276ke$1@dont-email.me> <u4g467$2773m$1@dont-email.me>
<u4hsq3$2g82o$1@dont-email.me> <u4hsvh$2g8j5$1@dont-email.me>
<u4ht84$2g9gv$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 23 May 2023 13:44:45 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="41aac8370f29e02bee77e487c7b941a3";
logging-data="2721604"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19vX/C7VBs0eyDkyo7WhVaGpGJhokZgZ9A="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.11.0
Cancel-Lock: sha1:H7g3BiB4HFfx/98aHE3AQl6pJ9s=
In-Reply-To: <u4ht84$2g9gv$1@dont-email.me>
Content-Language: de-DE
 by: Bonita Montero - Tue, 23 May 2023 13:44 UTC

Am 23.05.2023 um 10:24 schrieb Muttley@dastardlyhq.com:

> Yes I know, but thats not the point. If they going to add features to the
> language why don't they do it properly instead of some half assed job?

For me the current solution is proper enough.
C-style arrays aren't very common in C++.

Re: shared_ptr array range loop doesn't work

<fb5d23b8-066c-4840-b207-ca8e8443f605n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=225&group=comp.lang.c%2B%2B#225

  copy link   Newsgroups: comp.lang.c++
X-Received: by 2002:a05:620a:f0f:b0:74d:dcc:c9b7 with SMTP id v15-20020a05620a0f0f00b0074d0dccc9b7mr4621725qkl.0.1684903186613;
Tue, 23 May 2023 21:39:46 -0700 (PDT)
X-Received: by 2002:a05:622a:1a25:b0:3f3:7869:d2cf with SMTP id
f37-20020a05622a1a2500b003f37869d2cfmr5626204qtb.8.1684903186439; Tue, 23 May
2023 21:39:46 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.c++
Date: Tue, 23 May 2023 21:39:46 -0700 (PDT)
In-Reply-To: <u44q2h$7ps9$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=108.45.179.220; posting-account=Ix1u_AoAAAAILVQeRkP2ENwli-Uv6vO8
NNTP-Posting-Host: 108.45.179.220
References: <u44q2h$7ps9$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <fb5d23b8-066c-4840-b207-ca8e8443f605n@googlegroups.com>
Subject: Re: shared_ptr array range loop doesn't work
From: jameskuyper@alumni.caltech.edu (james...@alumni.caltech.edu)
Injection-Date: Wed, 24 May 2023 04:39:46 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 2517
 by: james...@alumni.calt - Wed, 24 May 2023 04:39 UTC

On Thursday, May 18, 2023 at 5:10:57 AM UTC-4, Mut...@dastardlyhq.com wrote:
> Is there a way to get range loops to work with arrays stored in
> shared pointers?
>
> eg:
>
> #include <iostream>
> #include <memory>
>
> using namespace std;
>
> struct mystruct
> {
> mystruct() { cout << "Con " << this << endl; };
> ~mystruct() { cout << "Dest " << this << endl; }
> void func() { cout << "Func " << this << endl; }
> };
>
>
> int main()
> {
> shared_ptr<mystruct[3]> sp(new mystruct[3]);
> sp[0].func();
> sp[1].func();
> sp[2].func();
> for(auto &ms: sp.get()) ms.func(); <--- Doesn't compile
> return 0;
> }
>
> I've tried other combinations too, nothing works.

Would this be an acceptable alternative? It compiles and executes as I expected it to:

#include <iostream>
#include <memory>

using namespace std;

struct mystruct
{ mystruct() { cout << "Con " << this << endl; };
~mystruct() { cout << "Dest " << this << endl; }
void func() { cout << "Func " << this << endl; }
};

int main()
{ shared_ptr<mystruct[1][3]> sp(new mystruct[1][3]);
sp[0][0].func();
sp[0][1].func();
sp[0][2].func();
for(auto &ms: sp.get()[0]) ms.func(); // <--- Doesn't compile
return 0;
}

Re: shared_ptr array range loop doesn't work

<u4kj5a$2u293$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=226&group=comp.lang.c%2B%2B#226

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Muttley@dastardlyhq.com
Newsgroups: comp.lang.c++
Subject: Re: shared_ptr array range loop doesn't work
Date: Wed, 24 May 2023 08:50:50 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 16
Message-ID: <u4kj5a$2u293$1@dont-email.me>
References: <u44q2h$7ps9$1@dont-email.me> <fb5d23b8-066c-4840-b207-ca8e8443f605n@googlegroups.com>
Injection-Date: Wed, 24 May 2023 08:50:50 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="500cd210eda5c16c78345f97d280af3e";
logging-data="3082531"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18BlhP3N0nhTfoKQR+eud+D"
Cancel-Lock: sha1:sgaJDPLSJjPHpc3xF1n7LbzQnXU=
 by: Muttley@dastardlyhq.com - Wed, 24 May 2023 08:50 UTC

On Tue, 23 May 2023 21:39:46 -0700 (PDT)
"james...@alumni.caltech.edu" <jameskuyper@alumni.caltech.edu> wrote:
>On Thursday, May 18, 2023 at 5:10:57=E2=80=AFAM UTC-4, Mut...@dastardlyhq.c=
>om wrote:
>> I've tried other combinations too, nothing works.
>
>Would this be an acceptable alternative? It compiles and executes as I expe=
>cted it to:

Clang doesn't like it I'm afraid:

fenris$ c++ -std=c++17 t.cc
t.cc:16:32: error: no matching constructor for initialization of 'shared_ptr<mys
truct[1][3]>'
shared_ptr<mystruct[1][3]> sp(new mystruct[1][3]);

Re: shared_ptr array range loop doesn't work

<u4l1m8$2vhmb$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=227&group=comp.lang.c%2B%2B#227

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Bonita.Montero@gmail.com (Bonita Montero)
Newsgroups: comp.lang.c++
Subject: Re: shared_ptr array range loop doesn't work
Date: Wed, 24 May 2023 14:58:55 +0200
Organization: A noiseless patient Spider
Lines: 20
Message-ID: <u4l1m8$2vhmb$1@dont-email.me>
References: <u44q2h$7ps9$1@dont-email.me>
<fb5d23b8-066c-4840-b207-ca8e8443f605n@googlegroups.com>
<u4kj5a$2u293$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 24 May 2023 12:58:48 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="64b01f669dd1df93d3afbde41ad5771c";
logging-data="3131083"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+BpllulXMo0TM5WFHyFty9+BTDDzrVnwQ="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.11.0
Cancel-Lock: sha1:cO2GkEK5BfgoKkLgMc56rjk3FVQ=
In-Reply-To: <u4kj5a$2u293$1@dont-email.me>
Content-Language: de-DE
 by: Bonita Montero - Wed, 24 May 2023 12:58 UTC

Am 24.05.2023 um 10:50 schrieb Muttley@dastardlyhq.com:
> On Tue, 23 May 2023 21:39:46 -0700 (PDT)
> "james...@alumni.caltech.edu" <jameskuyper@alumni.caltech.edu> wrote:
>> On Thursday, May 18, 2023 at 5:10:57=E2=80=AFAM UTC-4, Mut...@dastardlyhq.c=
>> om wrote:
>>> I've tried other combinations too, nothing works.
>>
>> Would this be an acceptable alternative? It compiles and executes as I expe=
>> cted it to:
>
> Clang doesn't like it I'm afraid:
>
> fenris$ c++ -std=c++17 t.cc
> t.cc:16:32: error: no matching constructor for initialization of 'shared_ptr<mys
> truct[1][3]>'
> shared_ptr<mystruct[1][3]> sp(new mystruct[1][3]);
>

It compiled for me with clang++ 14.

Re: shared_ptr array range loop doesn't work

<bcf1d865-28dd-4562-ba40-e286037a370an@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=229&group=comp.lang.c%2B%2B#229

  copy link   Newsgroups: comp.lang.c++
X-Received: by 2002:a05:620a:4721:b0:748:59c2:c071 with SMTP id bs33-20020a05620a472100b0074859c2c071mr4995921qkb.4.1684946885647;
Wed, 24 May 2023 09:48:05 -0700 (PDT)
X-Received: by 2002:ac8:5c09:0:b0:3f6:c5c5:a6de with SMTP id
i9-20020ac85c09000000b003f6c5c5a6demr638892qti.5.1684946885434; Wed, 24 May
2023 09:48:05 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.c++
Date: Wed, 24 May 2023 09:48:05 -0700 (PDT)
In-Reply-To: <u4kj5a$2u293$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=108.45.179.220; posting-account=Ix1u_AoAAAAILVQeRkP2ENwli-Uv6vO8
NNTP-Posting-Host: 108.45.179.220
References: <u44q2h$7ps9$1@dont-email.me> <fb5d23b8-066c-4840-b207-ca8e8443f605n@googlegroups.com>
<u4kj5a$2u293$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <bcf1d865-28dd-4562-ba40-e286037a370an@googlegroups.com>
Subject: Re: shared_ptr array range loop doesn't work
From: jameskuyper@alumni.caltech.edu (james...@alumni.caltech.edu)
Injection-Date: Wed, 24 May 2023 16:48:05 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 2203
 by: james...@alumni.calt - Wed, 24 May 2023 16:48 UTC

On Wednesday, May 24, 2023 at 4:51:07 AM UTC-4, Mut...@dastardlyhq.com wrote:
> On Tue, 23 May 2023 21:39:46 -0700 (PDT)
> "james...@alumni.caltech.edu" <james...@alumni.caltech.edu> wrote:
> >On Thursday, May 18, 2023 at 5:10:57=E2=80=AFAM UTC-4, Mut...@dastardlyhq.c> >om wrote:
> >> I've tried other combinations too, nothing works.
> >
> >Would this be an acceptable alternative? It compiles and executes as I expe=
> >cted it to:
>
> Clang doesn't like it I'm afraid:
>
> fenris$ c++ -std=c++17 t.cc
> t.cc:16:32: error: no matching constructor for initialization of 'shared_ptr<mys
> truct[1][3]>'
> shared_ptr<mystruct[1][3]> sp(new mystruct[1][3]);

On my machine, it works:

clang++-14 -std=c++17 shared_pointer.cpp -o shared_pointer

clang++-14 --version
Ubuntu clang version 14.0.6
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin

Re: shared_ptr array range loop doesn't work

<92c10ec9-4971-ed07-4f82-72fb6b5bcb36@removeyourself.dontspam.yahoo>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=230&group=comp.lang.c%2B%2B#230

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx11.iad.POSTED!not-for-mail
Subject: Re: shared_ptr array range loop doesn't work
Newsgroups: comp.lang.c++
References: <u44q2h$7ps9$1@dont-email.me>
<bfe02770-89c2-5a3e-860e-1676fadd132d@removeyourself.dontspam.yahoo>
<u4bek2$169ir$1@dont-email.me> <WAgaM.571516$mmyc.42481@fx37.iad>
<u4f8s7$249jm$1@dont-email.me> <riWaM.2057692$MVg8.1935284@fx12.iad>
<b30c545f-51b5-49ac-b790-dfbbdce9673en@googlegroups.com>
From: pauldontspamtolk@removeyourself.dontspam.yahoo (Pavel)
Message-ID: <92c10ec9-4971-ed07-4f82-72fb6b5bcb36@removeyourself.dontspam.yahoo>
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101
Firefox/91.0 SeaMonkey/2.53.15
MIME-Version: 1.0
In-Reply-To: <b30c545f-51b5-49ac-b790-dfbbdce9673en@googlegroups.com>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Lines: 59
X-Complaints-To: https://www.astraweb.com/aup
NNTP-Posting-Date: Thu, 25 May 2023 01:13:15 UTC
Date: Wed, 24 May 2023 21:13:05 -0400
X-Received-Bytes: 3516
 by: Pavel - Thu, 25 May 2023 01:13 UTC

Öö Tiib wrote:
> On Tuesday, 23 May 2023 at 06:22:18 UTC+3, Pavel wrote:
>>
>> (I personally think it is a shame that we don't have an exact-size
>> vector (i.e. a vector sized like valarray, with no capacities) but still
>> it is not a good excuse to abuse poor little smart pointers. For the
>> exact-size vector, using new[]- allocated memory and compiler trickery
>> for N could be justified).
>>
> IOW it is shame that the implementation-dependent way of figuring
> how many destructors to call with delete[] to pointer allocated with
> new[] is not exposed to programmers for to write such a class
> themselves if the standard library does not bother.
>
Actually, I meant someone slightly different. The shame is that the
vector class is not factored onto an exact-size array (let's call it
"block") and the rest of vector functionality.

vector has the design flaw that it is too many things: it is the owner
of several contiguous objects in memory but also the growth strategy.

The block is useful independently of vector if:

a) a custom growth strategy is needed; or
b) no growth is needed at all (a very often case in my practice).

For small vectors, replacing them with blocks could provide significant
space savings (not limited by only capacity even when compiler trickery
is not used; e.g. block<size_t> could be specialized so that the
underlying storage layout is implemented like this:

struct { const size_t N; size_t data[]; }; // or like this
struct { const size_t *end; size_t data[]; };

This way, 2 words of memory are saved (capacity and begin pointer) and
one indirection is also saved when one needs to access elements in a
block passed by reference or pointer so this brings both performance and
space savings.

Then, as I said, for the purpose of implementing the block (again, maybe
of only some specializations), using compiler trickery for computing N
*could* be justified. *could* is a keyword here. It *could* also be
useless or even detrimental performance-wise. It is feasible that the

operator new[]

would actually take more memory from the OS for N elements than
(non-array) allocation function

void* operator new(size[, align_val_t]...)

would for the same N elements. In this case, no gain is achieved from
using operator new[] and compiler trickery over using the single-object
form of allocation function "operator new" and system-independent
implementation.

-Pavel

Re: shared_ptr array range loop doesn't work

<MFybM.2165370$gGD7.1885488@fx11.iad>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=231&group=comp.lang.c%2B%2B#231

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!panix!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx11.iad.POSTED!not-for-mail
Subject: Re: shared_ptr array range loop doesn't work
Newsgroups: comp.lang.c++
References: <u44q2h$7ps9$1@dont-email.me>
<bfe02770-89c2-5a3e-860e-1676fadd132d@removeyourself.dontspam.yahoo>
<u4bek2$169ir$1@dont-email.me> <WAgaM.571516$mmyc.42481@fx37.iad>
<u4f8s7$249jm$1@dont-email.me> <u4fa6g$24edb$1@dont-email.me>
<u4fc9e$24mpi$1@dont-email.me> <u4g2sb$27344$1@dont-email.me>
<u4g3ti$276ke$1@dont-email.me> <u4g467$2773m$1@dont-email.me>
<u4hsq3$2g82o$1@dont-email.me>
From: pauldontspamtolk@removeyourself.dontspam.yahoo (Pavel)
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101
Firefox/91.0 SeaMonkey/2.53.15
MIME-Version: 1.0
In-Reply-To: <u4hsq3$2g82o$1@dont-email.me>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Lines: 24
Message-ID: <MFybM.2165370$gGD7.1885488@fx11.iad>
X-Complaints-To: https://www.astraweb.com/aup
NNTP-Posting-Date: Thu, 25 May 2023 01:16:28 UTC
Date: Wed, 24 May 2023 21:16:28 -0400
X-Received-Bytes: 1957
 by: Pavel - Thu, 25 May 2023 01:16 UTC

Muttley@dastardlyhq.com wrote:
> On Mon, 22 May 2023 18:10:54 +0200
> Bonita Montero <Bonita.Montero@gmail.com> wrote:
>> Am 22.05.2023 um 18:06 schrieb Muttley@dastardlyhq.com:
>>
>>> They could easily be implemented implicitly just like here:
>>>
>>> char s[] = "hello";
>>> for(auto c: s) cout << c;
>>>
>>> But yet again you missed the point.
>>
>> No, if the shared_ptr should behave like a container you'd need
>> an iterator-type with * and ++ and a begin and end-method on the
>> shared_ptr. I think the C++ designers thought this isn't necessary.
>
> Well they thought it necessary to be able to store arrays and index them
> inside a shared pointer, so why didn't they complete the job?
>
The support of indexing can be considered to be the support of the
existing functionality of a raw pointer as it also supports indexing,
but not iteration.

-Pavel

Re: shared_ptr array range loop doesn't work

<s0zbM.3873653$GNG9.2219590@fx18.iad>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=232&group=comp.lang.c%2B%2B#232

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx18.iad.POSTED!not-for-mail
Subject: Re: shared_ptr array range loop doesn't work
Newsgroups: comp.lang.c++
References: <u44q2h$7ps9$1@dont-email.me>
<bfe02770-89c2-5a3e-860e-1676fadd132d@removeyourself.dontspam.yahoo>
<u4bek2$169ir$1@dont-email.me> <WAgaM.571516$mmyc.42481@fx37.iad>
<u4hhtm$2f71h$1@dont-email.me>
From: pauldontspamtolk@removeyourself.dontspam.yahoo (Pavel)
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101
Firefox/91.0 SeaMonkey/2.53.15
MIME-Version: 1.0
In-Reply-To: <u4hhtm$2f71h$1@dont-email.me>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Lines: 106
Message-ID: <s0zbM.3873653$GNG9.2219590@fx18.iad>
X-Complaints-To: https://www.astraweb.com/aup
NNTP-Posting-Date: Thu, 25 May 2023 01:40:40 UTC
Date: Wed, 24 May 2023 21:40:39 -0400
X-Received-Bytes: 5170
 by: Pavel - Thu, 25 May 2023 01:40 UTC

Alf P. Steinbach wrote:
> On 2023-05-21 5:53 AM, Pavel wrote:
>> Alf P. Steinbach wrote:
>>> On 2023-05-20 5:19 AM, Pavel wrote:
>>>> Muttley@dastardlyhq.com wrote:
>>>>> Is there a way to get range loops to work with arrays stored in
>>>>> shared pointers?
>>>> These shared pointers do not store arrays. They store pointers to
>>>> memory object allocated with operator new[].
>>>>
>>>> In other words, the type shared_ptr<mystruct[3]>::element_type is
>>>> same as shared_ptr<mystruct>::element_type i.e. mystruct.
>>>>
>>>> To get a feeling of why it's natural, note that the type of the
>>>> expression "new mystruct[3]" that you use to initalize sp is
>>>> mystruct*, not mystruct (*)[3].
>>>>
>>>> Therefore, it is not possible to iterate the way you want: there is
>>>> no either constexpr 3 anywhere in the type of
>>>> shared_ptr<mystruct[3]> or non-constexpr 3 that could be extracted
>>>> from the object in memory in any implementation-independent way.
>>>> Thus, there is no way for C++ compiler to generate the code that
>>>> would compute the end of the range.
>>>
>>> Oh, there is such a way.
>> Not without changing the Standard. My understanding is that OP tried
>> to make his code iterate with the shared pointers *as they are
>> currently defined* in the Standard.
>>
>>>
>>> `shared_ptr` currently makes available an indexing operator if the
>>> item type is array: <url:
>>> https://en.cppreference.com/w/cpp/memory/shared_ptr/operator_at>.
>>>
>>> It could just as easily make available `begin` and `end` operations
>>> for array item type, and then a range based loop would Just Work. My
>>> earlier answer in this thread showed how to do that oneself. And what
>>> I can do (it was trivial enough that a dino could manage) the
>>> committee could do.
>> They could, for the template parameter of an array type U[N]. It is
>> unclear what is supposed to be done for the parameter of an array type
>> U[].
>>
>> But, with the current Standard, the N is lost. I am ok with this
>> though as adding this "feature" would open the whole new can of warms
>> for unclear benefit.
>>
>> E.g. assume that, in line with your example, N becomes part of
>> shared_ptr instatiation *type*
>
> It is.
>
> For example, otherwise my example of how to do this would not work.
Yes, but notice that for Mutley, it seemed more natural that N was the
the run-time size of the array (somewhere up this thread he used the
argument that the compiler is able to get N to destroy every of N
allocated objects when delete[] is called -- on raw pointer -- that does
not have compile-time N). This tells me that different people would feel
differently about which N is "natural" (compile-time or runtime) so
standardizing this would be counter-intuitive either way.

>
>
>> and consider this definition:
>>
>> shared_ptr<mystruct[3]> sp(new mystruct[2]);
>>
>> or, even better:
>>
>> shared_ptr<mystruct[3]> sp(new mystruct[getNOfMyStructs()]);
>>
>> What can possibly go wrong? (TM)
>
> You shot your leg off.
I certainly did. This is exactly why I do not mind if this particular
way to self-inflict harm on myself is not supported :-). smart pointers
were supposed to be safer than the raw ones, after all, and even raw
pointers do not support iteration.

>
> C++ allows that, in general.
Yes, that was one of the design goals. Blow up your whole leg.. Going on
tangent, I am still mad at them they broke this performance-over-safety
promise when they decided that most-derived-class's virtual function
cannot be called from a constructor or destructor of a base class.
"What's safe enough for Java should be safe enough for C++" says I :-).

>
> shared_ptr provides support for arrays,
I disagree. I think what you mean by "support for array" (indexing?) is
actually the support for the raw pointers to memory allocated by
operator new[]. The argument that we pass to the shared_ptr constructor in

shared_ptr<mystruct[3]> sp(new mystruct[3]);

(and that the shared_ptr likely stores underneath) is such a raw
pointer, not an array.

> including I believe restrictions
> on conversions, but not total type safety enforcement.
>
>
> - Alf
>

-Pavel

Re: shared_ptr array range loop doesn't work

<u4mnmp$3b560$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=234&group=comp.lang.c%2B%2B#234

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: chris.m.thomasson.1@gmail.com (Chris M. Thomasson)
Newsgroups: comp.lang.c++
Subject: Re: shared_ptr array range loop doesn't work
Date: Wed, 24 May 2023 21:20:41 -0700
Organization: A noiseless patient Spider
Lines: 25
Message-ID: <u4mnmp$3b560$1@dont-email.me>
References: <u44q2h$7ps9$1@dont-email.me>
<bfe02770-89c2-5a3e-860e-1676fadd132d@removeyourself.dontspam.yahoo>
<u4bek2$169ir$1@dont-email.me> <WAgaM.571516$mmyc.42481@fx37.iad>
<u4hhtm$2f71h$1@dont-email.me> <s0zbM.3873653$GNG9.2219590@fx18.iad>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Thu, 25 May 2023 04:20:42 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="44b61146b6f9d777757441a3872ee3f1";
logging-data="3511488"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19PFGNvDpTNCPz6iRNwcehOS+DbwZOW9GE="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.11.0
Cancel-Lock: sha1:yaAZjEgVsV62eq/mYBGE/jr2Cw8=
Content-Language: en-US
In-Reply-To: <s0zbM.3873653$GNG9.2219590@fx18.iad>
 by: Chris M. Thomasson - Thu, 25 May 2023 04:20 UTC

On 5/24/2023 6:40 PM, Pavel wrote:
> Alf P. Steinbach wrote:
>> On 2023-05-21 5:53 AM, Pavel wrote:
>>> Alf P. Steinbach wrote:
>>>> On 2023-05-20 5:19 AM, Pavel wrote:
>>>>> Muttley@dastardlyhq.com wrote:
>>>>>> Is there a way to get range loops to work with arrays stored in
>>>>>> shared pointers?
>>>>> These shared pointers do not store arrays. They store pointers to
>>>>> memory object allocated with operator new[].
[...]
>> shared_ptr provides support for arrays,
> I disagree. I think what you mean by "support for array" (indexing?) is
> actually the support for the raw pointers to memory allocated by
> operator new[]. The argument that we pass to the shared_ptr constructor in
>
> shared_ptr<mystruct[3]> sp(new mystruct[3]);
>
> (and that the shared_ptr likely stores underneath) is such a raw
> pointer, not an array.
[...]

Almost has to be.

Re: shared_ptr array range loop doesn't work

<u4n7hv$3dj1s$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=236&group=comp.lang.c%2B%2B#236

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Muttley@dastardlyhq.com
Newsgroups: comp.lang.c++
Subject: Re: shared_ptr array range loop doesn't work
Date: Thu, 25 May 2023 08:51:11 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 39
Message-ID: <u4n7hv$3dj1s$1@dont-email.me>
References: <u44q2h$7ps9$1@dont-email.me> <fb5d23b8-066c-4840-b207-ca8e8443f605n@googlegroups.com>
<u4kj5a$2u293$1@dont-email.me>
<bcf1d865-28dd-4562-ba40-e286037a370an@googlegroups.com>
Injection-Date: Thu, 25 May 2023 08:51:11 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="15bdb4579325c98d53d5a43d425f9a3f";
logging-data="3591228"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19h+TqpcnrQ3A3cZNqnMzVa"
Cancel-Lock: sha1:0WFP146U7bQXR6W4iVE5C69T0d0=
 by: Muttley@dastardlyhq.com - Thu, 25 May 2023 08:51 UTC

On Wed, 24 May 2023 09:48:05 -0700 (PDT)
"james...@alumni.caltech.edu" <jameskuyper@alumni.caltech.edu> wrote:
>On Wednesday, May 24, 2023 at 4:51:07=E2=80=AFAM UTC-4, Mut...@dastardlyhq.=
>com wrote:
>> On Tue, 23 May 2023 21:39:46 -0700 (PDT)=20
>> "james...@alumni.caltech.edu" <james...@alumni.caltech.edu> wrote:=20
>> >On Thursday, May 18, 2023 at 5:10:57=3DE2=3D80=3DAFAM UTC-4, Mut...@dast=
>ardlyhq.c=3D
>> >om wrote:=20
>> >> I've tried other combinations too, nothing works.=20
>> >
>> >Would this be an acceptable alternative? It compiles and executes as I e=
>xpe=3D=20
>> >cted it to:=20
>>=20
>> Clang doesn't like it I'm afraid:=20
>>=20
>> fenris$ c++ -std=3Dc++17 t.cc=20
>> t.cc:16:32: error: no matching constructor for initialization of 'shared_=
>ptr<mys=20
>> truct[1][3]>'
>> shared_ptr<mystruct[1][3]> sp(new mystruct[1][3]);
>
>On my machine, it works:
>
>clang++-14 -std=3Dc++17 shared_pointer.cpp -o shared_pointer
>
>clang++-14 --version
>Ubuntu clang version 14.0.6
>Target: x86_64-pc-linux-gnu
>Thread model: posix
>InstalledDir: /usr/bin

Beats me. I'm using clang on a Mac and I tried it again in case I'd not
cut and pasted properly but it still failed.

However this wouldn't be the first time the Apple version of Clang differs
from versions on other platforms.

Re: shared_ptr array range loop doesn't work

<be511d5e-acbf-499a-949c-86c0778e4ab4n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=259&group=comp.lang.c%2B%2B#259

  copy link   Newsgroups: comp.lang.c++
X-Received: by 2002:a05:620a:31a8:b0:759:40d8:b265 with SMTP id bi40-20020a05620a31a800b0075940d8b265mr455630qkb.0.1685087372950;
Fri, 26 May 2023 00:49:32 -0700 (PDT)
X-Received: by 2002:a05:620a:4723:b0:75c:adce:fed8 with SMTP id
bs35-20020a05620a472300b0075cadcefed8mr357925qkb.4.1685087372744; Fri, 26 May
2023 00:49:32 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!3.us.feeder.erje.net!feeder.erje.net!border-1.nntp.ord.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.c++
Date: Fri, 26 May 2023 00:49:32 -0700 (PDT)
In-Reply-To: <u4n7hv$3dj1s$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=108.45.179.220; posting-account=Ix1u_AoAAAAILVQeRkP2ENwli-Uv6vO8
NNTP-Posting-Host: 108.45.179.220
References: <u44q2h$7ps9$1@dont-email.me> <fb5d23b8-066c-4840-b207-ca8e8443f605n@googlegroups.com>
<u4kj5a$2u293$1@dont-email.me> <bcf1d865-28dd-4562-ba40-e286037a370an@googlegroups.com>
<u4n7hv$3dj1s$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <be511d5e-acbf-499a-949c-86c0778e4ab4n@googlegroups.com>
Subject: Re: shared_ptr array range loop doesn't work
From: jameskuyper@alumni.caltech.edu (james...@alumni.caltech.edu)
Injection-Date: Fri, 26 May 2023 07:49:32 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 43
 by: james...@alumni.calt - Fri, 26 May 2023 07:49 UTC

On Thursday, May 25, 2023 at 4:51:30 AM UTC-4, Mut...@dastardlyhq.com wrote:
> On Wed, 24 May 2023 09:48:05 -0700 (PDT)
> "james...@alumni.caltech.edu" <james...@alumni.caltech.edu> wrote:
> >On Wednesday, May 24, 2023 at 4:51:07=E2=80=AFAM UTC-4, Mut...@dastardlyhq.=
> >com wrote:
....
> >> Clang doesn't like it I'm afraid:=20
> >>=20
> >> fenris$ c++ -std=3Dc++17 t.cc=20
> >> t.cc:16:32: error: no matching constructor for initialization of 'shared_=
> >ptr<mys=20
> >> truct[1][3]>'
> >> shared_ptr<mystruct[1][3]> sp(new mystruct[1][3]);
> >
> >On my machine, it works:
> >
> >clang++-14 -std=3Dc++17 shared_pointer.cpp -o shared_pointer
> >
> >clang++-14 --version
> >Ubuntu clang version 14.0.6
> >Target: x86_64-pc-linux-gnu
> >Thread model: posix
> >InstalledDir: /usr/bin
> Beats me. I'm using clang on a Mac and I tried it again in case I'd not
> cut and pasted properly but it still failed.
>
> However this wouldn't be the first time the Apple version of Clang differs
> from versions on other platforms.

Something about that error message makes me suspicious that the
problem may be more fundamental. Does it still complain if you change it
to use a raw pointer, rather than a shared_pointer?:

mystruct(*sp)[3](new mystruct[1][3]);
....
for(auto &ms: sp[0]) ms.func();
....
delete[] sp;

Re: shared_ptr array range loop doesn't work

<u4prgo$3u7pv$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=262&group=comp.lang.c%2B%2B#262

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Muttley@dastardlyhq.com
Newsgroups: comp.lang.c++
Subject: Re: shared_ptr array range loop doesn't work
Date: Fri, 26 May 2023 08:44:08 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 26
Message-ID: <u4prgo$3u7pv$1@dont-email.me>
References: <u44q2h$7ps9$1@dont-email.me> <fb5d23b8-066c-4840-b207-ca8e8443f605n@googlegroups.com>
<u4kj5a$2u293$1@dont-email.me> <bcf1d865-28dd-4562-ba40-e286037a370an@googlegroups.com>
<u4n7hv$3dj1s$1@dont-email.me>
<be511d5e-acbf-499a-949c-86c0778e4ab4n@googlegroups.com>
Injection-Date: Fri, 26 May 2023 08:44:08 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="7dfcfb97b872f0371294f89645770709";
logging-data="4136767"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/ZAoui8IhGWVp9DHlewkRd"
Cancel-Lock: sha1:xNUCa+qkbB52hjgnQ9S6JcicY4Q=
 by: Muttley@dastardlyhq.com - Fri, 26 May 2023 08:44 UTC

On Fri, 26 May 2023 00:49:32 -0700 (PDT)
"james...@alumni.caltech.edu" <jameskuyper@alumni.caltech.edu> wrote:
>On Thursday, May 25, 2023 at 4:51:30=E2=80=AFAM UTC-4, Mut...@dastardlyhq.c=
>om wrote:
>> Beats me. I'm using clang on a Mac and I tried it again in case I'd not=
>=20
>> cut and pasted properly but it still failed.=20
>>=20
>> However this wouldn't be the first time the Apple version of Clang differ=
>s=20
>> from versions on other platforms.
>
>Something about that error message makes me suspicious that the
>problem may be more fundamental. Does it still complain if you change it
>to use a raw pointer, rather than a shared_pointer?:
>
>mystruct(*sp)[3](new mystruct[1][3]);=20
>....
>for(auto &ms: sp[0]) ms.func();
>....
>delete[] sp;

No, that compiles fine. Looks like the current Mac version of Clang does
have a bug but given how infrequently Apple updates their compiler I won't
hold my breath on it being fixed anytime soon.

Re: shared_ptr array range loop doesn't work

<u4q4ah$3v7nm$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=263&group=comp.lang.c%2B%2B#263

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Bonita.Montero@gmail.com (Bonita Montero)
Newsgroups: comp.lang.c++
Subject: Re: shared_ptr array range loop doesn't work
Date: Fri, 26 May 2023 13:14:34 +0200
Organization: A noiseless patient Spider
Lines: 9
Message-ID: <u4q4ah$3v7nm$1@dont-email.me>
References: <u44q2h$7ps9$1@dont-email.me>
<fb5d23b8-066c-4840-b207-ca8e8443f605n@googlegroups.com>
<u4kj5a$2u293$1@dont-email.me>
<bcf1d865-28dd-4562-ba40-e286037a370an@googlegroups.com>
<u4n7hv$3dj1s$1@dont-email.me>
<be511d5e-acbf-499a-949c-86c0778e4ab4n@googlegroups.com>
<u4prgo$3u7pv$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 26 May 2023 11:14:25 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="8a22d72214c2c24cec8613c196c56998";
logging-data="4169462"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/AQdFOFXuqkz2R5zYEC/zY1ZFzfbIPrnc="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.11.1
Cancel-Lock: sha1:5uWn3zUEE+nyr9P7tQ4xUoBEcIc=
In-Reply-To: <u4prgo$3u7pv$1@dont-email.me>
Content-Language: de-DE
 by: Bonita Montero - Fri, 26 May 2023 11:14 UTC

Am 26.05.2023 um 10:44 schrieb Muttley@dastardlyhq.com:

> No, that compiles fine. Looks like the current Mac version of Clang does
> have a bug but given how infrequently Apple updates their compiler I won't
> hold my breath on it being fixed anytime soon.

AFAIK you can replace Apple's clang with LLVM clang somhehow.

Re: shared_ptr array range loop doesn't work

<a04d0e1a-09ca-45d1-b231-7a7b5fc85b6dn@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=265&group=comp.lang.c%2B%2B#265

  copy link   Newsgroups: comp.lang.c++
X-Received: by 2002:a05:622a:1815:b0:3f6:c2a9:5fb1 with SMTP id t21-20020a05622a181500b003f6c2a95fb1mr413872qtc.2.1685105942488;
Fri, 26 May 2023 05:59:02 -0700 (PDT)
X-Received: by 2002:a05:620a:28c2:b0:746:9411:4c18 with SMTP id
l2-20020a05620a28c200b0074694114c18mr708494qkp.5.1685105942291; Fri, 26 May
2023 05:59:02 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.c++
Date: Fri, 26 May 2023 05:59:02 -0700 (PDT)
In-Reply-To: <u4q4ah$3v7nm$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=84.50.190.130; posting-account=pysjKgkAAACLegAdYDFznkqjgx_7vlUK
NNTP-Posting-Host: 84.50.190.130
References: <u44q2h$7ps9$1@dont-email.me> <fb5d23b8-066c-4840-b207-ca8e8443f605n@googlegroups.com>
<u4kj5a$2u293$1@dont-email.me> <bcf1d865-28dd-4562-ba40-e286037a370an@googlegroups.com>
<u4n7hv$3dj1s$1@dont-email.me> <be511d5e-acbf-499a-949c-86c0778e4ab4n@googlegroups.com>
<u4prgo$3u7pv$1@dont-email.me> <u4q4ah$3v7nm$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <a04d0e1a-09ca-45d1-b231-7a7b5fc85b6dn@googlegroups.com>
Subject: Re: shared_ptr array range loop doesn't work
From: ootiib@hot.ee (Öö Tiib)
Injection-Date: Fri, 26 May 2023 12:59:02 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 1869
 by: Öö Tiib - Fri, 26 May 2023 12:59 UTC

On Friday, 26 May 2023 at 14:16:10 UTC+3, Bonita Montero wrote:
> Am 26.05.2023 um 10:44 schrieb Mut...@dastardlyhq.com:
>
> > No, that compiles fine. Looks like the current Mac version of Clang does
> > have a bug but given how infrequently Apple updates their compiler I won't
> > hold my breath on it being fixed anytime soon.
> AFAIK you can replace Apple's clang with LLVM clang somhehow.

Yes, <https://releases.llvm.org/> can download distributions for Apple too.

Re: shared_ptr array range loop doesn't work

<u4qhi8$o5b$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=267&group=comp.lang.c%2B%2B#267

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Muttley@dastardlyhq.com
Newsgroups: comp.lang.c++
Subject: Re: shared_ptr array range loop doesn't work
Date: Fri, 26 May 2023 15:00:25 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 18
Message-ID: <u4qhi8$o5b$1@dont-email.me>
References: <u44q2h$7ps9$1@dont-email.me> <fb5d23b8-066c-4840-b207-ca8e8443f605n@googlegroups.com>
<u4kj5a$2u293$1@dont-email.me> <bcf1d865-28dd-4562-ba40-e286037a370an@googlegroups.com>
<u4n7hv$3dj1s$1@dont-email.me> <be511d5e-acbf-499a-949c-86c0778e4ab4n@googlegroups.com>
<u4prgo$3u7pv$1@dont-email.me> <u4q4ah$3v7nm$1@dont-email.me>
<a04d0e1a-09ca-45d1-b231-7a7b5fc85b6dn@googlegroups.com>
Injection-Date: Fri, 26 May 2023 15:00:25 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="7dfcfb97b872f0371294f89645770709";
logging-data="24747"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18rpfY+bd3uVBXttx7VC1vK"
Cancel-Lock: sha1:NVFq6J7NFdI9MGFeQacYG5Z5O5w=
 by: Muttley@dastardlyhq.com - Fri, 26 May 2023 15:00 UTC

On Fri, 26 May 2023 05:59:02 -0700 (PDT)
=?UTF-8?B?w5bDtiBUaWli?= <ootiib@hot.ee> wrote:
>On Friday, 26 May 2023 at 14:16:10 UTC+3, Bonita Montero wrote:
>> Am 26.05.2023 um 10:44 schrieb Mut...@dastardlyhq.com:
>>
>> > No, that compiles fine. Looks like the current Mac version of Clang does
>> > have a bug but given how infrequently Apple updates their compiler I won't
>
>> > hold my breath on it being fixed anytime soon.
>> AFAIK you can replace Apple's clang with LLVM clang somhehow.
>
>Yes, <https://releases.llvm.org/> can download distributions for Apple too.

Every new release of MacOS locks things down more and more. I'm a bit
paranoid about updating something as fundamental as the compiler and all
the libraries as I have a nasty feeling things might die halfway through with
some system integrity or unsigned code error or similar.

Re: shared_ptr array range loop doesn't work

<u4qpns$1pbc$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=269&group=comp.lang.c%2B%2B#269

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Bonita.Montero@gmail.com (Bonita Montero)
Newsgroups: comp.lang.c++
Subject: Re: shared_ptr array range loop doesn't work
Date: Fri, 26 May 2023 19:20:05 +0200
Organization: A noiseless patient Spider
Lines: 22
Message-ID: <u4qpns$1pbc$1@dont-email.me>
References: <u44q2h$7ps9$1@dont-email.me>
<fb5d23b8-066c-4840-b207-ca8e8443f605n@googlegroups.com>
<u4kj5a$2u293$1@dont-email.me>
<bcf1d865-28dd-4562-ba40-e286037a370an@googlegroups.com>
<u4n7hv$3dj1s$1@dont-email.me>
<be511d5e-acbf-499a-949c-86c0778e4ab4n@googlegroups.com>
<u4prgo$3u7pv$1@dont-email.me> <u4q4ah$3v7nm$1@dont-email.me>
<a04d0e1a-09ca-45d1-b231-7a7b5fc85b6dn@googlegroups.com>
<u4qhi8$o5b$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 26 May 2023 17:19:56 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="8a22d72214c2c24cec8613c196c56998";
logging-data="58732"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19fkXsQIFIx4fM3dZ2A8rjNw5+EVA2bIow="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.11.1
Cancel-Lock: sha1:82yCzvsSQZO6FU6hg+SEBVzVLro=
Content-Language: de-DE
In-Reply-To: <u4qhi8$o5b$1@dont-email.me>
 by: Bonita Montero - Fri, 26 May 2023 17:20 UTC

Am 26.05.2023 um 17:00 schrieb Muttley@dastardlyhq.com:
> On Fri, 26 May 2023 05:59:02 -0700 (PDT)
> =?UTF-8?B?w5bDtiBUaWli?= <ootiib@hot.ee> wrote:
>> On Friday, 26 May 2023 at 14:16:10 UTC+3, Bonita Montero wrote:
>>> Am 26.05.2023 um 10:44 schrieb Mut...@dastardlyhq.com:
>>>
>>>> No, that compiles fine. Looks like the current Mac version of Clang does
>>>> have a bug but given how infrequently Apple updates their compiler I won't
>>
>>>> hold my breath on it being fixed anytime soon.
>>> AFAIK you can replace Apple's clang with LLVM clang somhehow.
>>
>> Yes, <https://releases.llvm.org/> can download distributions for Apple too.
>
> Every new release of MacOS locks things down more and more. I'm a bit
> paranoid about updating something as fundamental as the compiler and
> all the libraries as I have a nasty feeling things might die halfway
> through with some system integrity or unsigned code error or similar.

I think a compiler is much more fundamental for Linux than for macOS.

Re: shared_ptr array range loop doesn't work

<u4sift$c9rd$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=275&group=comp.lang.c%2B%2B#275

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Muttley@dastardlyhq.com
Newsgroups: comp.lang.c++
Subject: Re: shared_ptr array range loop doesn't work
Date: Sat, 27 May 2023 09:28:29 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 28
Message-ID: <u4sift$c9rd$1@dont-email.me>
References: <u44q2h$7ps9$1@dont-email.me>
<fb5d23b8-066c-4840-b207-ca8e8443f605n@googlegroups.com>
<u4kj5a$2u293$1@dont-email.me>
<bcf1d865-28dd-4562-ba40-e286037a370an@googlegroups.com>
<u4n7hv$3dj1s$1@dont-email.me>
<be511d5e-acbf-499a-949c-86c0778e4ab4n@googlegroups.com>
<u4prgo$3u7pv$1@dont-email.me> <u4q4ah$3v7nm$1@dont-email.me>
<a04d0e1a-09ca-45d1-b231-7a7b5fc85b6dn@googlegroups.com>
<u4qhi8$o5b$1@dont-email.me>
<u4qpns$1pbc$1@dont-email.me>
Injection-Date: Sat, 27 May 2023 09:28:29 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="6bd88b15f26d71484baf4ef07582e063";
logging-data="403309"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+837SIxzvjohRf6flto8v0"
Cancel-Lock: sha1:OX5r6fxvT4yfiZFDuMBAcmKz6fE=
 by: Muttley@dastardlyhq.com - Sat, 27 May 2023 09:28 UTC

On Fri, 26 May 2023 19:20:05 +0200
Bonita Montero <Bonita.Montero@gmail.com> wrote:
>Am 26.05.2023 um 17:00 schrieb Muttley@dastardlyhq.com:
>> On Fri, 26 May 2023 05:59:02 -0700 (PDT)
>> =?UTF-8?B?w5bDtiBUaWli?= <ootiib@hot.ee> wrote:
>>> On Friday, 26 May 2023 at 14:16:10 UTC+3, Bonita Montero wrote:
>>>> Am 26.05.2023 um 10:44 schrieb Mut...@dastardlyhq.com:
>>>>
>>>>> No, that compiles fine. Looks like the current Mac version of Clang does
>>>>> have a bug but given how infrequently Apple updates their compiler I won't
>
>>>
>>>>> hold my breath on it being fixed anytime soon.
>>>> AFAIK you can replace Apple's clang with LLVM clang somhehow.
>>>
>>> Yes, <https://releases.llvm.org/> can download distributions for Apple too.
>>
>> Every new release of MacOS locks things down more and more. I'm a bit
>> paranoid about updating something as fundamental as the compiler and
>> all the libraries as I have a nasty feeling things might die halfway
>> through with some system integrity or unsigned code error or similar.
>
>I think a compiler is much more fundamental for Linux than for macOS.

MacOS internals are somewhat opaque. I'd rather not take the risk as I use my
Mac for far more than just writing C++ and if it died I'd be screwed even
with data backups.

Pages:12
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor