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=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,672b169dc220673a,start X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.205.122.65 with SMTP id gf1mr1131442bkc.2.1337286032161; Thu, 17 May 2012 13:20:32 -0700 (PDT) Path: e27ni4608bkw.0!nntp.google.com!news2.google.com!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail From: Marius Amado-Alves Newsgroups: comp.lang.ada Subject: Vector (container) initialization: the schizophrenic ampersand Date: Thu, 17 May 2012 13:20:31 -0700 (PDT) Organization: http://groups.google.com Message-ID: <10616734.43.1337286031745.JavaMail.geo-discussion-forums@vbjy7> NNTP-Posting-Host: 188.80.82.138 Mime-Version: 1.0 X-Trace: posting.google.com 1337286031 19154 127.0.0.1 (17 May 2012 20:20:31 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 17 May 2012 20:20:31 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=188.80.82.138; posting-account=3cDqWgoAAAAZXc8D3pDqwa77IryJ2nnY User-Agent: G2/1.0 Content-Type: text/plain; charset=ISO-8859-1 Date: 2012-05-17T13:20:31-07:00 List-Id: Shouldn't this be the right idiom to initialize a vector (container) with literals: use My_Vectors; V : My_Vectors.Vector := Element1 & Element2 & Element3; Looks nice, but does not compile (with GNAT), because the compiler cannot make a decision on which "&" function to use where. Is there a way to give precedence to one of the "&" functions? Or some other nice solution? Thanks. /* My current solution is to rename one of the functions: use My_Vectors; function "+" (L : My_Vectors.Vector; R : My_Element_Type) renames My_Vectors."&"; V : My_Vectors.Vector := Element1 & Element2 + Element3; Not elegant at all. */