C++ Logo

std-proposals

Advanced search

Re: [std-proposals] Allow forward declarations of typedef'ed classes

From: Giuseppe D'Angelo <giuseppe.dangelo_at_[hidden]>
Date: Tue, 20 Feb 2024 11:05:36 +0100
On 20/02/2024 10:49, Frederick Virchanza Gotham via Std-Proposals wrote:
> So I propose that the following be valid C++:
>
> class Monkey;
>
> int Func(Monkey *const p)
> {
> return nullptr == p;
> }
>
> class Donkey {
> int number;
> };
>
> typedef Donkey Monkey;
>
> int main(void)
> {
> Monkey obj;
> }
>
> I propose that we should be able to do a forward declaration of a
> typedef'ed class.

And how, precisely? How do you mangle Func?

As being noted already multiple times by different people: could you
please corroborate your ideas with *substance* -- that is, turning them
into actual proposals?

This it turning to be an extremely disrespectful behavior towards the
other readers of this ML, since you do not even extend the courtesy of
doing _some form of homework_ before saying "I propose this". This isn't
a forum to vent random ideas; there's plenty of others for that kind of
discussions.

Not to mention that, if you want to have any chance to actually see
these ideas materialized, you MUST turn them into actual proposals.

My 2 c,
-- 
Giuseppe D'Angelo

Received on 2024-02-20 10:05:39