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.4 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FORGED_MUA_MOZILLA,FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,66fae8c862b81b17 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,UTF8 Received: by 10.66.73.1 with SMTP id h1mr2548958pav.0.1352353193885; Wed, 07 Nov 2012 21:39:53 -0800 (PST) From: "Zhu, Qun-Ying" Newsgroups: comp.lang.ada Subject: Re: Copy vector in Ada Date: Fri, 02 Nov 2012 17:15:25 -0700 Organization: A noiseless patient Spider Message-ID: References: <1aWdnbcg_8-BzAzNnZ2dnUVZ_j6dnZ2d@giganews.com> <559eb706-9bb1-496d-9034-1984d693531a@googlegroups.com> <5460fdc7-5490-4889-b771-67cc281c10c5@googlegroups.com> Mime-Version: 1.0 Injection-Date: Sat, 3 Nov 2012 00:15:24 +0000 (UTC) Injection-Info: mx04.eternal-september.org; posting-host="0ccb2cfc9ff2c65af7d36050d331d27f"; logging-data="24781"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18HN+sxMOxSBP8IjOqdL/4V" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121030 Firefox/16.0 SeaMonkey/2.13.2 In-Reply-To: Cancel-Lock: sha1:3ZFg/TOVe0azZBo+z6EQvBhFadw= Path: s9ni86873pbb.0!nntp.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!news.mccarragher.com!news.grnet.gr!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!weretis.net!feeder4.news.weretis.net!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Date: 2012-11-02T17:15:25-07:00 List-Id: Yannick Duchêne (Hibou57) wrote: > Le Fri, 02 Nov 2012 23:03:05 +0100, Maciej Sobczak > a écrit: >>> When the assignment operator >>> would not be safe to use and/or would cost too much to the >>> implementation >>> to be made available safely, then Ada has well know way to exclude it >>> from >>> the interface: “limited type”. >> >> Similarly in C++ - if the assignment operator is too costly (or just >> impossible) to implement, there is a way to ban it. > > Really? That's a hot news to me. At least at the time I used it (~ > 2000), there was nothing like that, while Ada already had limited types > since long. And I'm not even sure there was a way to redefine the copy > operation (may be this came in a later C++ definition release, or else I > forgot) or anything like adjustments. > I think it is a C++11 feature. [1] http://www.stroustrup.com/C++11FAQ.html#default [2] http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2346.htm [3] http://gcc.gnu.org/projects/cxx0x.html (seems have the feature since GCC 4.4)