Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

Hackers of the world, unite!


devel / comp.lang.c++ / "cppfront: Spring update" by Herb Sutter

SubjectAuthor
* "cppfront: Spring update" by Herb SutterLynn McGuire
`* Re: "cppfront: Spring update" by Herb SutterRichard
 `* Re: "cppfront: Spring update" by Herb SutterLynn McGuire
  `* Re: "cppfront: Spring update" by Herb Sutterjames...@alumni.caltech.edu
   `* Re: "cppfront: Spring update" by Herb SutterBonita Montero
    +* Re: "cppfront: Spring update" by Herb SutterBo Persson
    |`- Re: "cppfront: Spring update" by Herb SutterÖö Tiib
    `* Re: "cppfront: Spring update" by Herb Sutterjames...@alumni.caltech.edu
     `* Re: "cppfront: Spring update" by Herb SutterDavid Brown
      `- Re: "cppfront: Spring update" by Herb SutterV

1
"cppfront: Spring update" by Herb Sutter

<u2p9iv$bk4v$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: lynnmcguire5@gmail.com (Lynn McGuire)
Newsgroups: comp.lang.c++
Subject: "cppfront: Spring update" by Herb Sutter
Date: Mon, 1 May 2023 16:05:35 -0500
Organization: A noiseless patient Spider
Lines: 24
Message-ID: <u2p9iv$bk4v$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 1 May 2023 21:05:35 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="2ed6fc70e13a1426011f1942d8617b32";
logging-data="381087"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/2ggsIeaNEQVXhUc1D9SJX+DrTuBPEbkc="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.10.0
Cancel-Lock: sha1:ctTbMCM0sAICyq6hSn9GnQpTiWs=
Content-Language: en-US
 by: Lynn McGuire - Mon, 1 May 2023 21:05 UTC

"cppfront: Spring update" by Herb Sutter
https://herbsutter.com/2023/04/30/cppfront-spring-update/

"Since the year-end mini-update, progress has continued on cppfront. (If
you don’t know what this personal project is, please see the CppCon 2022
talk on YouTube.)"
https://herbsutter.com/2022/12/31/cpp2-and-cppfront-year-end-mini-update/
https://github.com/hsutter/cppfront
https://www.youtube.com/watch?v=ELeZAKCN4tY

"This update covers Acknowledgments, and highlights of what’s new in the
compiler and language since last time, including:"
* simple, mathematically safe, and efficient chained comparisons
* named break and continue
* “simple and safe” starts with . . . main
* user-defined type, including unifying all special member functions
as operator=
* type/namespace/function/object aliases
* header reflect.h with the start of the reflection API and the
first 10 working compile-time metafunctions from P0707 unifying
functions and blocks, including removing : and = from the for loop syntax"

Lynn

Re: "cppfront: Spring update" by Herb Sutter

<u2s27p$35j56$1@news.xmission.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!xmission!nnrp.xmission!.POSTED.shell.xmission.com!not-for-mail
From: legalize+jeeves@mail.xmission.com (Richard)
Newsgroups: comp.lang.c++
Subject: Re: "cppfront: Spring update" by Herb Sutter
Date: Tue, 2 May 2023 22:18:33 -0000 (UTC)
Organization: multi-cellular, biological
Sender: legalize+jeeves@mail.xmission.com
Message-ID: <u2s27p$35j56$1@news.xmission.com>
References: <u2p9iv$bk4v$1@dont-email.me>
Reply-To: (Richard) legalize+jeeves@mail.xmission.com
Injection-Date: Tue, 2 May 2023 22:18:33 -0000 (UTC)
Injection-Info: news.xmission.com; posting-host="shell.xmission.com:2607:fa18:0:beef::4";
logging-data="3329190"; mail-complaints-to="abuse@xmission.com"
X-Reply-Etiquette: No copy by email, please
Mail-Copies-To: never
X-Newsreader: trn 4.0-test77 (Sep 1, 2010)
Originator: legalize@shell.xmission.com (Richard)
 by: Richard - Tue, 2 May 2023 22:18 UTC

[Please do not mail me a copy of your followup]

Lynn McGuire <lynnmcguire5@gmail.com> spake the secret code
<u2p9iv$bk4v$1@dont-email.me> thusly:

>"cppfront: Spring update" by Herb Sutter
> https://herbsutter.com/2023/04/30/cppfront-spring-update/

I like the direction this is headed, but sometimes they just get a
little goofy:

> auto interface(meta::type_declaration& t)
> -> void

The obsession with trailing return type here is pointless.
--
"The Direct3D Graphics Pipeline" free book <http://tinyurl.com/d3d-pipeline>
The Terminals Wiki <http://terminals-wiki.org>
The Computer Graphics Museum <http://computergraphicsmuseum.org>
Legalize Adulthood! (my blog) <http://legalizeadulthood.wordpress.com>

Re: "cppfront: Spring update" by Herb Sutter

<u3696n$2vimk$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: lynnmcguire5@gmail.com (Lynn McGuire)
Newsgroups: comp.lang.c++
Subject: Re: "cppfront: Spring update" by Herb Sutter
Date: Sat, 6 May 2023 14:18:47 -0500
Organization: A noiseless patient Spider
Lines: 22
Message-ID: <u3696n$2vimk$1@dont-email.me>
References: <u2p9iv$bk4v$1@dont-email.me> <u2s27p$35j56$1@news.xmission.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sat, 6 May 2023 19:18:47 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="1fe5473db25552b8f877d488069cf990";
logging-data="3132116"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19CHpsNUUFDZ7aeU9Jd++Ig9mrqC/GqAew="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.10.1
Cancel-Lock: sha1:dcWIwztnhijYDzmMbb0pvIibmy0=
Content-Language: en-US
In-Reply-To: <u2s27p$35j56$1@news.xmission.com>
 by: Lynn McGuire - Sat, 6 May 2023 19:18 UTC

On 5/2/2023 5:18 PM, Richard wrote:
> [Please do not mail me a copy of your followup]
>
> Lynn McGuire <lynnmcguire5@gmail.com> spake the secret code
> <u2p9iv$bk4v$1@dont-email.me> thusly:
>
>> "cppfront: Spring update" by Herb Sutter
>> https://herbsutter.com/2023/04/30/cppfront-spring-update/
>
> I like the direction this is headed, but sometimes they just get a
> little goofy:
>
>> auto interface(meta::type_declaration& t)
>> -> void
>
> The obsession with trailing return type here is pointless.

You are going to have to explain trailing return type for me, I don't
get it.

Thanks,
Lynn

Re: "cppfront: Spring update" by Herb Sutter

<31e6f15f-0316-481f-bd3f-c661c920b1dan@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.c++
X-Received: by 2002:a05:620a:2490:b0:74e:3a3c:2da3 with SMTP id i16-20020a05620a249000b0074e3a3c2da3mr1926704qkn.1.1683402373488;
Sat, 06 May 2023 12:46:13 -0700 (PDT)
X-Received: by 2002:a05:620a:2916:b0:754:5a3f:bdc3 with SMTP id
m22-20020a05620a291600b007545a3fbdc3mr1523342qkp.11.1683402373246; Sat, 06
May 2023 12:46:13 -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: Sat, 6 May 2023 12:46:12 -0700 (PDT)
In-Reply-To: <u3696n$2vimk$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=205.222.250.208; posting-account=Ix1u_AoAAAAILVQeRkP2ENwli-Uv6vO8
NNTP-Posting-Host: 205.222.250.208
References: <u2p9iv$bk4v$1@dont-email.me> <u2s27p$35j56$1@news.xmission.com> <u3696n$2vimk$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <31e6f15f-0316-481f-bd3f-c661c920b1dan@googlegroups.com>
Subject: Re: "cppfront: Spring update" by Herb Sutter
From: jameskuyper@alumni.caltech.edu (james...@alumni.caltech.edu)
Injection-Date: Sat, 06 May 2023 19:46:13 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 2025
 by: james...@alumni.calt - Sat, 6 May 2023 19:46 UTC

On Saturday, May 6, 2023 at 3:19:01 PM UTC-4, Lynn McGuire wrote:
> On 5/2/2023 5:18 PM, Richard wrote:
> > [Please do not mail me a copy of your followup]
> >
> > Lynn McGuire <lynnmcnmc..@gmail.com> spake the secret code
....
> >> auto interface(meta::type_declaration& t)
> >> -> void
> >
> > The obsession with trailing return type here is pointless.
> You are going to have to explain trailing return type for me, I don't
> get it.

See the Wikipedia article titled "Trailing Return Type" for an explanation. Allowing trailing return types solves a particular problem, but some people have decided to always use a trailing return type, even when (as in this case), The traditional way of declaring the return type would be unproblematic.

Re: "cppfront: Spring update" by Herb Sutter

<u37jeg$39i8r$1@dont-email.me>

  copy mid

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

  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: "cppfront: Spring update" by Herb Sutter
Date: Sun, 7 May 2023 09:19:46 +0200
Organization: A noiseless patient Spider
Lines: 17
Message-ID: <u37jeg$39i8r$1@dont-email.me>
References: <u2p9iv$bk4v$1@dont-email.me> <u2s27p$35j56$1@news.xmission.com>
<u3696n$2vimk$1@dont-email.me>
<31e6f15f-0316-481f-bd3f-c661c920b1dan@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Sun, 7 May 2023 07:19:44 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="ee76d0ade496c09315c724de439fa20a";
logging-data="3459355"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18kODnw9q8LMWLFHDjVjvJVb1UYVUth6OQ="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.10.1
Cancel-Lock: sha1:O7dFr13JE32F4FowKm4XAnskG2c=
Content-Language: de-DE
In-Reply-To: <31e6f15f-0316-481f-bd3f-c661c920b1dan@googlegroups.com>
 by: Bonita Montero - Sun, 7 May 2023 07:19 UTC

Am 06.05.2023 um 21:46 schrieb james...@alumni.caltech.edu:
> On Saturday, May 6, 2023 at 3:19:01 PM UTC-4, Lynn McGuire wrote:
>> On 5/2/2023 5:18 PM, Richard wrote:
>>> [Please do not mail me a copy of your followup]
>>>
>>> Lynn McGuire <lynnmcnmc..@gmail.com> spake the secret code
> ...
>>>> auto interface(meta::type_declaration& t)
>>>> -> void
>>>
>>> The obsession with trailing return type here is pointless.
>> You are going to have to explain trailing return type for me, I don't
>> get it.
>
> See the Wikipedia article titled "Trailing Return Type" for an explanation. Allowing trailing return types solves a particular problem, but some people have decided to always use a trailing return type, even when (as in this case), The traditional way of declaring the return type would be unproblematic.

Where's the problem ?

Re: "cppfront: Spring update" by Herb Sutter

<kbp5v6Fkve2U1@mid.individual.net>

  copy mid

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

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!3.eu.feeder.erje.net!feeder.erje.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: bo@bo-persson.se (Bo Persson)
Newsgroups: comp.lang.c++
Subject: Re: "cppfront: Spring update" by Herb Sutter
Date: Sun, 7 May 2023 10:31:34 +0200
Lines: 30
Message-ID: <kbp5v6Fkve2U1@mid.individual.net>
References: <u2p9iv$bk4v$1@dont-email.me> <u2s27p$35j56$1@news.xmission.com>
<u3696n$2vimk$1@dont-email.me>
<31e6f15f-0316-481f-bd3f-c661c920b1dan@googlegroups.com>
<u37jeg$39i8r$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: individual.net BkOVPej+qRxRh0gIuqtDXwwhEndf7quU5KejiGHpZkKVLfzHL7
Cancel-Lock: sha1:2tfWXRsSKCMn2MRrKVQvKWSfaS4=
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.10.1
Content-Language: sv
In-Reply-To: <u37jeg$39i8r$1@dont-email.me>
 by: Bo Persson - Sun, 7 May 2023 08:31 UTC

On 2023-05-07 at 09:19, Bonita Montero wrote:
> Am 06.05.2023 um 21:46 schrieb james...@alumni.caltech.edu:
>> On Saturday, May 6, 2023 at 3:19:01 PM UTC-4, Lynn McGuire wrote:
>>> On 5/2/2023 5:18 PM, Richard wrote:
>>>> [Please do not mail me a copy of your followup]
>>>>
>>>> Lynn McGuire <lynnmcnmc..@gmail.com> spake the secret code
>> ...
>>>>> auto interface(meta::type_declaration& t)
>>>>> -> void
>>>>
>>>> The obsession with trailing return type here is pointless.
>>> You are going to have to explain trailing return type for me, I don't
>>> get it.
>>
>> See the Wikipedia article titled "Trailing Return Type" for an
>> explanation. Allowing trailing return types solves a particular
>> problem, but some people have decided to always use a trailing return
>> type, even when (as in this case), The traditional way of declaring
>> the return type would be unproblematic.
>
> Where's the problem ?

It's not a problem, it is just a bit silly.

Instead of trying a one-size-fits-all rule of always using a trailing
return types, you *could* say 'void' up front for functions that doesn't
have a return type. It wouldn't hurt, would it?

Re: "cppfront: Spring update" by Herb Sutter

<48f2d01d-8c8b-427f-9801-a323d9a6a01bn@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.c++
X-Received: by 2002:ac8:5e0a:0:b0:3f1:fb02:8331 with SMTP id h10-20020ac85e0a000000b003f1fb028331mr2443832qtx.9.1683456738764;
Sun, 07 May 2023 03:52:18 -0700 (PDT)
X-Received: by 2002:a05:622a:1ba4:b0:3e6:970e:a405 with SMTP id
bp36-20020a05622a1ba400b003e6970ea405mr2513150qtb.6.1683456738603; Sun, 07
May 2023 03:52:18 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!feeder1.feed.usenet.farm!feed.usenet.farm!peer03.ams4!peer.am4.highwinds-media.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: Sun, 7 May 2023 03:52:18 -0700 (PDT)
In-Reply-To: <kbp5v6Fkve2U1@mid.individual.net>
Injection-Info: google-groups.googlegroups.com; posting-host=145.14.47.111; posting-account=pysjKgkAAACLegAdYDFznkqjgx_7vlUK
NNTP-Posting-Host: 145.14.47.111
References: <u2p9iv$bk4v$1@dont-email.me> <u2s27p$35j56$1@news.xmission.com>
<u3696n$2vimk$1@dont-email.me> <31e6f15f-0316-481f-bd3f-c661c920b1dan@googlegroups.com>
<u37jeg$39i8r$1@dont-email.me> <kbp5v6Fkve2U1@mid.individual.net>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <48f2d01d-8c8b-427f-9801-a323d9a6a01bn@googlegroups.com>
Subject: Re: "cppfront: Spring update" by Herb Sutter
From: ootiib@hot.ee (Öö Tiib)
Injection-Date: Sun, 07 May 2023 10:52:18 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 3444
 by: Öö Tiib - Sun, 7 May 2023 10:52 UTC

On Sunday, 7 May 2023 at 11:33:02 UTC+3, Bo Persson wrote:
> On 2023-05-07 at 09:19, Bonita Montero wrote:
> > Am 06.05.2023 um 21:46 schrieb james...@alumni.caltech.edu:
> >> On Saturday, May 6, 2023 at 3:19:01 PM UTC-4, Lynn McGuire wrote:
> >>> On 5/2/2023 5:18 PM, Richard wrote:
> >>>> [Please do not mail me a copy of your followup]
> >>>>
> >>>> Lynn McGuire <lynnmcnmc..@gmail.com> spake the secret code
> >> ...
> >>>>> auto interface(meta::type_declaration& t)
> >>>>> -> void
> >>>>
> >>>> The obsession with trailing return type here is pointless.
> >>> You are going to have to explain trailing return type for me, I don't
> >>> get it.
> >>
> >> See the Wikipedia article titled "Trailing Return Type" for an
> >> explanation. Allowing trailing return types solves a particular
> >> problem, but some people have decided to always use a trailing return
> >> type, even when (as in this case), The traditional way of declaring
> >> the return type would be unproblematic.
> >
> > Where's the problem ?
> It's not a problem, it is just a bit silly.
>
> Instead of trying a one-size-fits-all rule of always using a trailing
> return types, you *could* say 'void' up front for functions that doesn't
> have a return type. It wouldn't hurt, would it?

It is about equivalent syntax for saying same thing so one could
perhaps configure some mechanical code formatting tool to
round-trip format between ...

void blah(type param) { /* etc. */ }

... and ...

auto blah(type param) -> void { /* etc. */ }

.... without any issues.

I personally like trailing type of Go, Rust, Kotlin and Swift but for
C, C++, Java, C#, D etc. that ship has IMHO sailed and trying to mix it
in just results with more to type and to read and more obfuscation.
Especially in language where auto is overused in various meanings
adding it to blather more about lack of return (void) is strange.

Re: "cppfront: Spring update" by Herb Sutter

<d804dd9e-9721-4c2b-8d79-a08d5e3c5d76n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.c++
X-Received: by 2002:a05:620a:454c:b0:746:977f:3aef with SMTP id u12-20020a05620a454c00b00746977f3aefmr3532154qkp.1.1683519063956;
Sun, 07 May 2023 21:11:03 -0700 (PDT)
X-Received: by 2002:ac8:7f0d:0:b0:3e6:2fab:675 with SMTP id
f13-20020ac87f0d000000b003e62fab0675mr3550416qtk.9.1683519063673; Sun, 07 May
2023 21:11:03 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border-2.nntp.ord.giganews.com!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: Sun, 7 May 2023 21:11:03 -0700 (PDT)
In-Reply-To: <u37jeg$39i8r$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: <u2p9iv$bk4v$1@dont-email.me> <u2s27p$35j56$1@news.xmission.com>
<u3696n$2vimk$1@dont-email.me> <31e6f15f-0316-481f-bd3f-c661c920b1dan@googlegroups.com>
<u37jeg$39i8r$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <d804dd9e-9721-4c2b-8d79-a08d5e3c5d76n@googlegroups.com>
Subject: Re: "cppfront: Spring update" by Herb Sutter
From: jameskuyper@alumni.caltech.edu (james...@alumni.caltech.edu)
Injection-Date: Mon, 08 May 2023 04:11:03 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 26
 by: james...@alumni.calt - Mon, 8 May 2023 04:11 UTC

On Sunday, May 7, 2023 at 3:20:02 AM UTC-4, Bonita Montero wrote:
> Am 06.05.2023 um 21:46 schrieb james...@alumni.caltech.edu:
....
> > See the Wikipedia article titled "Trailing Return Type" for an explanation.
> > Allowing trailing return types solves a particular problem, but some
> > people have decided to always use a trailing return type, even when (as
> > in this case), The traditional way of declaring the return type would be
> > unproblematic.
> Where's the problem ?

The problem it solves is descried in that article, but if you can't be bothered
to read it, I can summarize: on occasion, the return type of a function can
be described in terms of the types of it's parameters, but those parameters
are not in scope at the point where a conventional return type is declared.
However, they are in scope in the place where the trailing return type is
declared. The example given in that article is

template<typename TL, typename TR>
auto Add(const TL& lhs, const TR& rhs) -> decltype(lhs + rhs) {
return lhs + rhs;
}

This is not a major problem, or it's solution would not have waited so long
to be included in the language - but it is a convenience.

Re: "cppfront: Spring update" by Herb Sutter

<u3a6en$3qdo3$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: david.brown@hesbynett.no (David Brown)
Newsgroups: comp.lang.c++
Subject: Re: "cppfront: Spring update" by Herb Sutter
Date: Mon, 8 May 2023 08:56:22 +0200
Organization: A noiseless patient Spider
Lines: 64
Message-ID: <u3a6en$3qdo3$1@dont-email.me>
References: <u2p9iv$bk4v$1@dont-email.me> <u2s27p$35j56$1@news.xmission.com>
<u3696n$2vimk$1@dont-email.me>
<31e6f15f-0316-481f-bd3f-c661c920b1dan@googlegroups.com>
<u37jeg$39i8r$1@dont-email.me>
<d804dd9e-9721-4c2b-8d79-a08d5e3c5d76n@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 8 May 2023 06:56:23 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="ea1b752a5c6a068105557345e0c0a2e8";
logging-data="4011779"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19QtawZTq3k5W2WrAxp5m6+hFBgOlx3ZY0="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.9.0
Cancel-Lock: sha1:jUk8SEen8KSU9G8cMuHOD8LMIQ8=
In-Reply-To: <d804dd9e-9721-4c2b-8d79-a08d5e3c5d76n@googlegroups.com>
Content-Language: en-GB
 by: David Brown - Mon, 8 May 2023 06:56 UTC

On 08/05/2023 06:11, james...@alumni.caltech.edu wrote:
> On Sunday, May 7, 2023 at 3:20:02 AM UTC-4, Bonita Montero wrote:
>> Am 06.05.2023 um 21:46 schrieb james...@alumni.caltech.edu:
> ...
>>> See the Wikipedia article titled "Trailing Return Type" for an explanation.
>>> Allowing trailing return types solves a particular problem, but some
>>> people have decided to always use a trailing return type, even when (as
>>> in this case), The traditional way of declaring the return type would be
>>> unproblematic.
>> Where's the problem ?
>
> The problem it solves is descried in that article, but if you can't be bothered
> to read it, I can summarize: on occasion, the return type of a function can
> be described in terms of the types of it's parameters, but those parameters
> are not in scope at the point where a conventional return type is declared.
> However, they are in scope in the place where the trailing return type is
> declared. The example given in that article is
>
> template<typename TL, typename TR>
> auto Add(const TL& lhs, const TR& rhs) -> decltype(lhs + rhs) {
> return lhs + rhs;
> }
>
> This is not a major problem, or it's solution would not have waited so long
> to be included in the language - but it is a convenience.

One option would be to write :

#define function auto

Then people could write :

function foo(int x, int y) -> int;

(No, I do /not/ recommend that!)

A not uncommon complaint about the syntax of C and C++ is that there is
no keyword that says this is the start of a function definition, as
there is in most languages - this would let you pretend there is one.

I sometimes use "auto" for functions, but then I do not have a trailing
return type - return type deduction is simpler and clearer:

template<typename TL, typename TR>
auto Add(const TL& lhs, const TR& rhs) {
return lhs + rhs;
}

I think it is rare that a decltype trailing return type actually makes
anything clearer in the code - it just adds more scope for error. And I
see no purpose at all in putting "auto" at the start of the function
declaration and an explicit type at the end. Putting "auto", or a
concept, as the return type is a clear indication that you do not have
(or want to give) an explicit return type here but want the compiler to
figure it out. That's what "auto" means in C++. It seems
counter-productive to me to say "the compiler will figure this out" at
the start of the declaration, then do the compiler's job at the end of
the declaration.

Re: "cppfront: Spring update" by Herb Sutter

<879e6d71-b63d-400e-ab82-ef8b81ba7472n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.c++
X-Received: by 2002:a05:620a:4410:b0:767:b478:7138 with SMTP id v16-20020a05620a441000b00767b4787138mr13818qkp.9.1688844174965;
Sat, 08 Jul 2023 12:22:54 -0700 (PDT)
X-Received: by 2002:a63:9316:0:b0:553:a9aa:965d with SMTP id
b22-20020a639316000000b00553a9aa965dmr6312481pge.2.1688844174427; Sat, 08 Jul
2023 12:22:54 -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: Sat, 8 Jul 2023 12:22:53 -0700 (PDT)
In-Reply-To: <u3a6en$3qdo3$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=85.253.185.93; posting-account=ykVvQgoAAACp4VEbaWPL3R35slQMB5Au
NNTP-Posting-Host: 85.253.185.93
References: <u2p9iv$bk4v$1@dont-email.me> <u2s27p$35j56$1@news.xmission.com>
<u3696n$2vimk$1@dont-email.me> <31e6f15f-0316-481f-bd3f-c661c920b1dan@googlegroups.com>
<u37jeg$39i8r$1@dont-email.me> <d804dd9e-9721-4c2b-8d79-a08d5e3c5d76n@googlegroups.com>
<u3a6en$3qdo3$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <879e6d71-b63d-400e-ab82-ef8b81ba7472n@googlegroups.com>
Subject: Re: "cppfront: Spring update" by Herb Sutter
From: vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvva@hotmail.com (V)
Injection-Date: Sat, 08 Jul 2023 19:22:54 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 1603
 by: V - Sat, 8 Jul 2023 19:22 UTC

You know, that in the best case each human has one lookaline in the world ?

When You ask me, then I have not seen my lookalike, but my brother saw one day somewhere(Tallinn) my lookalike.

You've seen Rando Tomson somewhere before ?

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor