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,WEIRD_PORT autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,195bd8ec4227e968,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2004-02-08 14:26:01 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!news-fra1.dfn.de!npeer.de.kpn-eurorings.net!newsfeed.arcor-online.net!newsread.arcor-online.net!news.arcor.de!not-for-mail Sender: georg@sonnenregen.at.home Newsgroups: comp.lang.ada Subject: [Q] non-limited record and "self-pointer" From: Georg Bauhaus User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Date: 08 Feb 2004 22:26:55 +0100 Message-ID: <86d68pl0tc.fsf@sonnenregen.at.home> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Organization: Arcor NNTP-Posting-Date: 08 Feb 2004 23:25:41 MET NNTP-Posting-Host: 82.82.120.15 X-Trace: DXC=6OoQZfHP[6D^a1SS:=Ik]JQ5U85hF6f;DjW\KbG]kaMHDAHcn;Zl5eHml162iXnh7L:n9G[MMWD:D3ZVh@Tc Is there any circumstance which might allow the following type (Read_Only_Set) to be o.K.? The record isn't limited, the compiler does not complain unless I remove the "container" component. It says then that for correct instantiation the current instance must be a limited type. Which has some words that I had thought it could say. (Though, is there an instance that can be a type?) type Read_Only_Set is tagged private; type Set_Ptr is access constant Read_Only_Set; private package Implementation is new Charles.Sets.Sorted.Unbounded(Element); -- (Element is generic formal private) type Read_Only_Set is tagged <-- not limited record container: Implementation.Container_Type; -- line 102: self: Set_Ptr := Read_Only_Set'unchecked_access; <-- no complaints -- used in value_in_place end record; with "container: ..." removed: Compiling: sets_test.adb (source file time stamp: 2004-02-08 20:45:06) ==============Error messages for source file: ../tests/test-containers.ads 22. package T_sets is new sets(T); | >>> instantiation error at sets.ads:102 >>> current instance must be a limited type (T is not limited) TIA, georg