From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!nntp-feed.chiark.greenend.org.uk!ewrotcd!newsfeed.xs3.de!io.xs3.de!news.jacob-sparre.dk!franka.jacob-sparre.dk!pnx.dk!.POSTED.rrsoftware.com!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: limited agregate and limited components default initialization Date: Sun, 1 Apr 2018 22:44:48 -0500 Organization: JSA Research & Innovation Message-ID: References: <29943b13-00d1-443a-82f2-f55272770109@googlegroups.com> <12766e64-7641-45a0-8e76-8330a3b3c101@googlegroups.com> Injection-Date: Mon, 2 Apr 2018 03:44:49 -0000 (UTC) Injection-Info: franka.jacob-sparre.dk; posting-host="rrsoftware.com:24.196.82.226"; logging-data="23543"; mail-complaints-to="news@jacob-sparre.dk" X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Response X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.7246 Xref: reader02.eternal-september.org comp.lang.ada:51290 Date: 2018-04-01T22:44:48-05:00 List-Id: "Dmitry A. Kazakov" wrote in message news:p9rj2t$td5$1@gioia.aioe.org... > On 2018-04-01 17:53, Jean-Claude Rostaing wrote: >> My real problem is that the implicit dereference aspect NEEDS an access >> discriminant, and can't take a named access type. >> ... or anonymous access type shall be allowed to be GENERAL, which I >> surely don't advocate for. > > Well, implicit dereference will never work with smart pointers because it > uses access discriminant (instead of a component). There is nothing you > could do about it. It simply was not designed for user-defined access > types. It won't always work directly. The implicit dereference usually needs to be a separate (helper) object from the smart pointer. I believe Christophe Grein has a working implementation (but I forget the link). Randy.