C++ Logo

STD-PROPOSALS

Advanced search

Subject: Re: [std-proposals] Allow '.' to behave like '->' where it is currently an error.
From: J Decker (d3ck0r_at_[hidden])
Date: 2020-02-27 08:32:26


On Thu, Feb 27, 2020 at 4:00 AM Olaf van der Spek via Std-Proposals <
std-proposals_at_[hidden]> wrote:

> On Fri, Feb 21, 2020 at 9:12 AM Михаил Найденов via Std-Proposals
> <std-proposals_at_[hidden]> wrote:
> > For C++ the value is indeed possibly negative, as this will literally
> promote using raw pointers because their special properties.
> >
> > we try to promote
> >
> > something(const object& o);
> > instead of
> > something(const object* o);
>
> Wouldn't a better solution be for C to adopt references?
>

Not really, because to pass the first one you'd have to have an instance
defined on the stack, and couldn't use a pool of objects; perhaps that
object has a complex construction....
You can't save a reference for later.. struct { int &a; }s;

references project data from 'here' to 'there', I really just want to work
with data where it is; (probably 'there' because the caller didn't directly
create it).

> --
> Std-Proposals mailing list
> Std-Proposals_at_[hidden]
> https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals
>



STD-PROPOSALS list run by herb.sutter at gmail.com

Standard Proposals Archives on Google Groups