C++ Logo

std-proposals

Advanced search

Re: [std-proposals] Draft Proposal for elaborate extension points

From: Михаил Найденов <mihailnajdenov_at_[hidden]>
Date: Sat, 9 Sep 2023 11:45:55 +0300
On Sun, Aug 27, 2023 at 6:21 PM Sebastian Wittmeier via Std-Proposals <
std-proposals_at_[hidden]> wrote:

> A small detail question:
>
>
>
> (Also) in the standard context new "names" can be introduced into existing
> classes:
>
>
>
> c.Shape::width()
>
>
>
> What if the class has a member named Shape?
>
> Which has precedence? Or does the double colon / namespace specifier
> uniquely specify whether a class concept or member was meant?
>
>
>
> Especially with generic programming nameclashes could not always be
> avoided.
>


Hello and thanks for the feedback and sorry for the late reply

Can you give me a more concrete example as member access (c.) seems to not
work the way you wrote it for members no matter if Shape is a type or a
value.

That being said, an elaborate static function access
(C::Shape::static_function()) could indeed clash w/ some implementation of
some Shape::static_function for C.
One way around this is to change the elaborate syntax to be Shape::C
instead.




>
>
>
>
> -----Ursprüngliche Nachricht-----
> *Von:* Михаил Найденов via Std-Proposals <std-proposals_at_[hidden]>
> *Gesendet:* So 27.08.2023 15:31
> *Betreff:* [std-proposals] Draft Proposal for elaborate extension points
> *Anlage:* ClassConcept.html
> *An:* sotrdg sotrdg via Std-Proposals <std-proposals_at_[hidden]>;
> *CC:* Михаил Найденов <mihailnajdenov_at_[hidden]>;
> Hello,
> Below is proposal draft for a "interface-like" class which would serve as
> an extension point.
> It is a continuation of the
> https://lists.isocpp.org/std-proposals/2023/06/6894.php discussion.
>
> Thank You
>
>
> <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail> Няма
> вирусиwww.avast.com
> <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
>
> --
> Std-Proposals mailing list
> Std-Proposals_at_[hidden]
> https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals
>
> (A
> --
> Std-Proposals mailing list
> Std-Proposals_at_[hidden]
> https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals
>

Received on 2023-09-09 08:46:07