220 7462 <CAPBZbvxHA1WBRWwO=a_jtopVg_SsukvihJ_d9n8-oEbPwGSUCg@mail.gmail.com> article
Path: news.gmane.org!not-for-mail
From: "Billy O'Neal" <billy.oneal@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Re: To add the method append for all sequential
 containers that have method push_back
Date: Wed, 23 Oct 2013 17:10:55 -0700
Lines: 478
Approved: news@gmane.org
Message-ID: <CAPBZbvxHA1WBRWwO=a_jtopVg_SsukvihJ_d9n8-oEbPwGSUCg@mail.gmail.com>
References: <4167b82e-a3cc-44ce-9825-b52514bc1531@isocpp.org>
 <357325b0-cec5-4d22-ad56-9bb66f76b458@isocpp.org> <c98342aa-14d6-4fc6-8499-234c5e44e894@isocpp.org>
 <983ff074-5d8c-488a-b06c-49d53d5b7a5b@isocpp.org> <f47679d2-be05-4fdf-aea6-c617eb291aad@isocpp.org>
 <369298d9-3f8b-405a-8bfe-ae209372a26f@isocpp.org> <CAPBZbvzVuUKHsNSWz+KQPBzB1KJh0KgaY_cv6XuCwuhbZRhgHw@mail.gmail.com>
 <f844b34d-f64b-430d-9328-e44246a89238@isocpp.org> <f651b25b-213e-4c22-bd6e-17c96fde46a7@isocpp.org>
 <e826236a-84aa-4623-9510-014881b55004@isocpp.org> <5266DEEC.7090805@gmail.com>
 <eec4b9ca-711c-4b64-bac5-3c08bd3361a8@isocpp.org> <7c9a2637-65d8-4d54-bd3c-b46c0c22b34f@isocpp.org>
 <70a718dd-eca7-4845-8e9c-0313581ed453@isocpp.org> <6b9f62b2-21b1-4c62-a815-217d77a59a23@isocpp.org>
 <df68e700-1cb4-4af5-ba94-e4b589f33e0e@isocpp.org> <0e98fae6-2dc5-4e50-8659-5334012c4dd4@isocpp.org>
 <0d945506-2a09-4645-a68e-ada2b9898aa9@isocpp.org> <69dd52d3-c35e-4391-b998-d1a35c4599d6@isocpp.org>
 <e853f305-0999-437a-840c-3d829a24566d@isocpp.org> <CAGg_6+OvEyyLFZcGqo2xc0aDu4MeYiCmWMymW1YVNPJqJ1+S7A@mail.gmail.com>
 <CAFk2RUYQ1LkfCO5yXWPeStcadYuz7AO4V5bH=mfQMFNm45GM0Q@mail.gmail.com>
 <CAGsORuAyVwKGwdGMyAc3rg1KbOA3AXuYWwgubkXgt-oQRH9AiQ@mail.gmail.com>
 <fcf8d15e-af56-4351-bc4b-2e5984399240@isocpp.org> <CAGg_6+Ph8FRc+939QVuJbzYtbo-ef3zGqPsPFjXCY9AUDLPAFQ@mail.gmail.com>
 <CAGsORuAcTDjMcXVoAQ+MEUZ6DL0PEDW32RWDQSf4EyxS+Ln=tw@mail.gmail.com>
 <CAGsORuC0hbic60tY3sVng8K+-qMmekp83kq4Jed36O2+BQ5=UQ@mail.gmail.com>
 <0001b7d6-42ab-4f47-8104-1c5e93ecfbc4@isocpp.org> <CAPBZbvx-rmW3HcG+3WQrNbQ1gzr8UDj=2Xx+gRNOyhj5au61Xg@mail.gmail.com>
 <03ecdc90-1973-4e34-82c9-ab0043241a2b@isocpp.org> <CAPBZbvz+6=0bZsKAkrz=wn3whEr3_fnJ4dRaS8p-vTaVpEeB0w@mail.gmail.com>
 <94c6cdf1-e640-4cc9-9c4b-e2605610a715@isocpp.org> <8e3f0b94-b0a3-43e2-9a2c-853734b9d6c3@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary=089e0160c2440d4cc704e9717a7d
X-Trace: ger.gmane.org 1382573494 18441 80.91.229.3 (24 Oct 2013 00:11:34 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Thu, 24 Oct 2013 00:11:34 +0000 (UTC)
To: std-proposals <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBDKLBLVE6ADBBN6LUGJQKGQETVCAGOY@isocpp.org Thu Oct 24 02:11:40 2013
Return-path: <std-proposals+bncBDKLBLVE6ADBBN6LUGJQKGQETVCAGOY@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-pa0-f71.google.com ([209.85.220.71])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBDKLBLVE6ADBBN6LUGJQKGQETVCAGOY@isocpp.org>)
	id 1VZ8WX-0003qZ-Co
	for gclcip-std-proposals@m.gmane.org; Thu, 24 Oct 2013 02:11:37 +0200
Original-Received: by mail-pa0-f71.google.com with SMTP id kx10sf3235983pab.2
        for <gclcip-std-proposals@m.gmane.org>; Wed, 23 Oct 2013 17:11:36 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=mime-version:in-reply-to:references:from:date:message-id:subject:to
         :x-original-sender:x-original-authentication-results:reply-to
         :precedence:mailing-list:list-id:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe:content-type;
        bh=dY/146MwrV7f+E/SC5skNqDKzUjpKdVPvCS1b+7rwWI=;
        b=jReV9GyScQRKCzRglCo015MAYDMdTtURX7N0GG75MxJMJGuSEbG3RZoAHRbgCsi7dJ
         bi6DgHlCSRUund6dfWRrUv++4hfrOlrj+4zj1X/Ej90/VyTzun6W5BhlXHG/jxgG/0Tr
         3fI0IIMru6oOAGkf92PTC8DRtxNY52jwiFA1acP8oOPOfm/kCgSfx1XpmKCYpSVBbxv5
         mJIjwm1i/+VeTzMY0LWjmDIwrZJtg1V/mjCj5mp3N1sTRsRViEgQQhtBj+Irvb7RvhOf
         Psh3aYjfU8JpGUNa22R7DATyuZ7xyBm9xoeWuWl1X/shvju0vAVkQYlPCFZ+GwtLwaSD
         t8hQ==
X-Received: by 10.66.149.67 with SMTP id ty3mr154599pab.27.1382573496072;
        Wed, 23 Oct 2013 17:11:36 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.182.117.197 with SMTP id kg5ls410153obb.61.gmail; Wed, 23 Oct
 2013 17:11:35 -0700 (PDT)
X-Received: by 10.182.98.162 with SMTP id ej2mr4195274obb.61.1382573495467;
        Wed, 23 Oct 2013 17:11:35 -0700 (PDT)
Original-Received: from mail-ob0-x22e.google.com (mail-ob0-x22e.google.com [2607:f8b0:4003:c01::22e])
        by mx.google.com with ESMTPS id fm3si6406510oeb.100.2013.10.23.17.11.35
        for <std-proposals@isocpp.org>
        (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
        Wed, 23 Oct 2013 17:11:35 -0700 (PDT)
Received-SPF: pass (google.com: domain of billy.oneal@gmail.com designates 2607:f8b0:4003:c01::22e as permitted sender) client-ip=2607:f8b0:4003:c01::22e;
Original-Received: by mail-ob0-f174.google.com with SMTP id vb8so1626983obc.33
        for <std-proposals@isocpp.org>; Wed, 23 Oct 2013 17:11:35 -0700 (PDT)
X-Received: by 10.60.165.5 with SMTP id yu5mr45148oeb.105.1382573495108; Wed,
 23 Oct 2013 17:11:35 -0700 (PDT)
Original-Received: by 10.182.87.37 with HTTP; Wed, 23 Oct 2013 17:10:55 -0700 (PDT)
In-Reply-To: <8e3f0b94-b0a3-43e2-9a2c-853734b9d6c3@isocpp.org>
X-Original-Sender: billy.oneal@gmail.com
X-Original-Authentication-Results: mx.google.com;       spf=pass (google.com:
 domain of billy.oneal@gmail.com designates 2607:f8b0:4003:c01::22e as
 permitted sender) smtp.mail=billy.oneal@gmail.com;       dkim=pass
 header.i=@gmail.com;       dmarc=pass (p=NONE dis=NONE) header.from=gmail.com
Precedence: list
Mailing-list: list std-proposals@isocpp.org; contact std-proposals+owners@isocpp.org
List-ID: <std-proposals.isocpp.org>
X-Google-Group-Id: 399137483710
List-Post: <http://groups.google.com/a/isocpp.org/group/std-proposals/post>, <mailto:std-proposals@isocpp.org>
List-Help: <http://support.google.com/a/isocpp.org/bin/topic.py?topic=25838>, <mailto:std-proposals+help@isocpp.org>
List-Archive: <http://groups.google.com/a/isocpp.org/group/std-proposals/>
List-Subscribe: <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>,
 <mailto:std-proposals+subscribe@isocpp.org>
List-Unsubscribe: <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>,
 <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:7462
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/7462>

--089e0160c2440d4cc704e9717a7d
Content-Type: text/plain; charset=KOI8-R
Content-Transfer-Encoding: quoted-printable

>It is not clear what is the return type of append.
By that standard, the return type of append here isn't clear either:
v2.append( std::next( range.second ), v1.end() );

Member-ness or nonmember-ness doesn't tell the caller *anything* about the
return type.

>can confuse users because they will think that they can use any container
because the function iis a general non-member function

By that metric, any STL algorithm that requires bidirectional iterators
wouldn't be allowed, because they don't work with input iterators. In fact,
advance would be a great *counter example* to your claim, because it isn't
obvious why std::advance(std::istream_iterator( ... ), -2) wouldn't work.

Users are expected to understand the function they are calling before
calling it.

Billy O'Neal
https://github.com/BillyONeal/ <https://bitbucket.org/BillyONeal/>
http://stackoverflow.com/users/82320/billy-oneal
Malware Response Instructor - BleepingComputer.com


On Wed, Oct 23, 2013 at 4:59 PM, Vlad from Moscow <vlad.moscow@mail.ru>wrot=
e:

> They will think so by analogy with other similar general functions as for
> example advance that can be used with any type of iterators (except outpu=
t
> iterators).
>
> =DE=C5=D4=D7=C5=D2=C7, 24 =CF=CB=D4=D1=C2=D2=D1 2013 =C7., 3:57:48 UTC+4 =
=D0=CF=CC=D8=DA=CF=D7=C1=D4=C5=CC=D8 Vlad from Moscow
> =CE=C1=D0=C9=D3=C1=CC:
>
>> In my personal opinion there is two problems. It is not clear what is th=
e
>> return type of append. And such record can confuse users because they wi=
ll
>> think that they can use any container because the function iis a general
>> non-member function.
>>
>> =DE=C5=D4=D7=C5=D2=C7, 24 =CF=CB=D4=D1=C2=D2=D1 2013 =C7., 3:51:46 UTC+4=
 =D0=CF=CC=D8=DA=CF=D7=C1=D4=C5=CC=D8 Billy O'Neal
>> =CE=C1=D0=C9=D3=C1=CC:
>>
>>> And yet, is no less clearly expressed as:
>>> std::vector<int> v2( v1.begin(), range.first );
>>> append( v2, std::next( range.second ), v1.end() );
>>>
>>> which you can already do today without needing a standard modification.
>>>
>>> Billy O'Neal
>>> https://github.com/BillyONeal/ <https://bitbucket.org/BillyONeal/>
>>> http://stackoverflow.com/**users/82320/billy-oneal<http://stackoverflow=
..com/users/82320/billy-oneal>
>>> Malware Response Instructor - BleepingComputer.com
>>>
>>>
>>> On Wed, Oct 23, 2013 at 4:32 PM, Vlad from Moscow <vlad....@mail.ru>wro=
te:
>>>
>>>> Billy, I do not think that append flows out of operator +=3D. It looks
>>>> like that operator +=3D flows out of append.:)
>>>>
>>>> To demonstrate that append looks much better than insert I will show
>>>> the following assignment.
>>>>  Let;s assume that there is a vector v1 and you need to copy  its
>>>> elements in another vector v2 excluding some range that specified by a=
 pair
>>>> of iterators. For example one iterator points the first negative value=
 of
>>>> the vector and the second iterator points the last negative value of t=
he
>>>> vector. The simplest way to do the assignment is to write
>>>>
>>>> std::vector<int> v2( v1.begin(), range.first );
>>>> v2.append( std::next( range.second ), v1.end() );
>>>>
>>>> That is at first the part of the original vector before the first
>>>> iterator was copied and then the tail of the original vector  was
>>>> appended.. The code looks very logically and clearly due to using of a=
ppend.
>>>>
>>>>
>>>>
>>>>
>>>> =DE=C5=D4=D7=C5=D2=C7, 24 =CF=CB=D4=D1=C2=D2=D1 2013 =C7., 3:07:04 UTC=
+4 =D0=CF=CC=D8=DA=CF=D7=C1=D4=C5=CC=D8 Billy O'Neal
>>>> =CE=C1=D0=C9=D3=C1=CC:
>>>>
>>>>> Again, append makes sense for basic_string because it corresponds to
>>>>> basic_string's operator+=3D. That operation doesn't necessarily make =
sense
>>>>> for all containers.
>>>>>
>>>>> Billy O'Neal
>>>>> https://github.com/BillyONeal/ <https://bitbucket.org/BillyONeal/>
>>>>> http://stackoverflow.com/**users**/82320/billy-oneal<http://stackover=
flow.com/users/82320/billy-oneal>
>>>>> Malware Response Instructor - BleepingComputer.com
>>>>>
>>>>>
>>>>> On Wed, Oct 23, 2013 at 4:05 PM, Vlad from Moscow <vlad....@mail.ru>w=
rote:
>>>>>
>>>>>>  In fact there is nothing new with the method append because it
>>>>>> already exists for std::basic_string. If somebody has some doubts th=
en I
>>>>>> advise to try do not use append with std::basic string and substitut=
e it
>>>>>> everywhere in code for insert. I am sure that through a month of suc=
h
>>>>>> coding he will quickly understand that method append is necessary.
>>>>>>
>>>>>> Introducing method append just makes the common interface of
>>>>>> sequential containers more consistent.
>>>>>>
>>>>>> =DE=C5=D4=D7=C5=D2=C7, 24 =CF=CB=D4=D1=C2=D2=D1 2013 =C7., 2:52:13 U=
TC+4 =D0=CF=CC=D8=DA=CF=D7=C1=D4=C5=CC=D8 Zhihao Yuan
>>>>>> =CE=C1=D0=C9=D3=C1=CC:
>>>>>>
>>>>>>> On Oct 23, 2013 6:31 PM, "Zhihao Yuan" <z...@miator.net> wrote:
>>>>>>> > I think we'd better not to regard this as merely a syntax sugar.
>>>>>>> I looked at libc++ code and I found that since the position is know=
n to be
>>>>>>> end(), append() can be implemented in a much simpler way compared w=
ith
>>>>>>> insert().  Not sure how beneficial it is though, but so far it look=
s not
>>>>>>> too useless.
>>>>>>>
>>>>>>> PS: If you agree with this rationale, I would suggest to add
>>>>>>> prepend() method to deque, list, and forward_list as well.
>>>>>>>
>>>>>>  --
>>>>>>
>>>>>> ---
>>>>>> You received this message because you are subscribed to the Google
>>>>>> Groups "ISO C++ Standard - Future Proposals" group.
>>>>>> To unsubscribe from this group and stop receiving emails from it,
>>>>>> send an email to std-proposal...@**isocpp.org.
>>>>>> To post to this group, send email to std-pr...@isocpp.org.
>>>>>>
>>>>>> Visit this group at http://groups.google.com/a/**iso**
>>>>>> cpp.org/group/std-**proposals/<http://groups.google.com/a/isocpp.org=
/group/std-proposals/>
>>>>>> .
>>>>>>
>>>>>
>>>>>  --
>>>>
>>>> ---
>>>> You received this message because you are subscribed to the Google
>>>> Groups "ISO C++ Standard - Future Proposals" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>> an email to std-proposal...@isocpp.org.
>>>> To post to this group, send email to std-pr...@isocpp.org.
>>>> Visit this group at http://groups.google.com/a/**isocpp.org/group/std-=
*
>>>> *proposals/<http://groups.google.com/a/isocpp.org/group/std-proposals/=
>
>>>> .
>>>>
>>>
>>>  --
>
> ---
> You received this message because you are subscribed to the Google Groups
> "ISO C++ Standard - Future Proposals" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to std-proposals+unsubscribe@isocpp.org.
> To post to this group, send email to std-proposals@isocpp.org.
> Visit this group at
> http://groups.google.com/a/isocpp.org/group/std-proposals/.
>

--=20

---=20
You received this message because you are subscribed to the Google Groups "=
ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposa=
ls/.

--089e0160c2440d4cc704e9717a7d
Content-Type: text/html; charset=KOI8-R
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>&gt;<span style=3D"font-size:13px;font-family:arial,s=
ans-serif">It is not clear what is the return type of append.<br></span>By =
that standard, the return type of append here isn&#39;t clear either:</div>=
<div>


<span style=3D"font-family:arial,sans-serif;font-size:13px">v2.append( std:=
:next(=9Arange.second ), v1.end()=9A);</span><br></div><div><span style=3D"=
font-family:arial,sans-serif;font-size:13px"><br></span></div><div><font fa=
ce=3D"arial, sans-serif">Member-ness or nonmember-ness doesn&#39;t tell the=
 caller *anything* about the return type.</font></div>


<div><font face=3D"arial, sans-serif"><br></font></div><div><font face=3D"a=
rial, sans-serif">&gt;</font><span style=3D"font-family:arial,sans-serif;fo=
nt-size:13px">can confuse users because they will think that they can use a=
ny container because the function iis a general non-member function</span><=
/div>


<div><span style=3D"font-family:arial,sans-serif;font-size:13px"><br></span=
></div><div><span style=3D"font-family:arial,sans-serif;font-size:13px">By =
that metric, any STL algorithm that requires bidirectional iterators wouldn=
&#39;t be allowed, because they don&#39;t work with input iterators. In fac=
t, advance would be a great *counter example* to your claim, because it isn=
&#39;t obvious why std::advance(std::istream_iterator( ... ), -2) wouldn&#3=
9;t work.</span></div>

<div><span style=3D"font-family:arial,sans-serif;font-size:13px"><br></span=
></div><div><span style=3D"font-family:arial,sans-serif;font-size:13px">Use=
rs are expected to understand the function they are calling before calling =
it.</span></div>


<div class=3D"gmail_extra"><br clear=3D"all"><div><div dir=3D"ltr"><div>Bil=
ly O&#39;Neal</div><div><a href=3D"https://bitbucket.org/BillyONeal/" targe=
t=3D"_blank">https://github.com/BillyONeal/</a></div><div><a href=3D"http:/=
/stackoverflow.com/users/82320/billy-oneal" target=3D"_blank">http://stacko=
verflow.com/users/82320/billy-oneal</a></div>


<div>Malware Response Instructor - BleepingComputer.com</div></div></div>
<br><br><div class=3D"gmail_quote">On Wed, Oct 23, 2013 at 4:59 PM, Vlad fr=
om Moscow <span dir=3D"ltr">&lt;<a href=3D"mailto:vlad.moscow@mail.ru" targ=
et=3D"_blank">vlad.moscow@mail.ru</a>&gt;</span> wrote:<br><blockquote clas=
s=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;pad=
ding-left:1ex">


<div dir=3D"ltr"><div>They will think so by analogy with other similar gene=
ral functions as for example advance that can be used with any type of iter=
ators (except output iterators).</div><div><br>=DE=C5=D4=D7=C5=D2=C7, 24 =
=CF=CB=D4=D1=C2=D2=D1 2013=9A=C7., 3:57:48 UTC+4 =D0=CF=CC=D8=DA=CF=D7=C1=
=D4=C5=CC=D8 Vlad from Moscow =CE=C1=D0=C9=D3=C1=CC:</div>


<div><div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8=
ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1p=
x;border-left-style:solid"><div dir=3D"ltr"><div>In my personal opinion the=
re is two problems. It is not clear what is the return type of append. And =
such record can confuse users because they will think that they can use any=
 container because the function iis a general non-member function.</div>


<div><br>=DE=C5=D4=D7=C5=D2=C7, 24 =CF=CB=D4=D1=C2=D2=D1 2013=9A=C7., 3:51:=
46 UTC+4 =D0=CF=CC=D8=DA=CF=D7=C1=D4=C5=CC=D8 Billy O&#39;Neal =CE=C1=D0=C9=
=D3=C1=CC:</div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0=
px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-wi=
dth:1px;border-left-style:solid">


<div dir=3D"ltr">And yet, is no less clearly expressed as:<div><div style=
=3D"font-family:arial,sans-serif;font-size:13px">std::vector&lt;int&gt; v2(=
 v1.begin(),=9Arange.first );</div><div style=3D"font-family:arial,sans-ser=
if;font-size:13px">




append( v2, std::next(=9Arange.second ), v1.end()=9A);</div></div><div styl=
e=3D"font-family:arial,sans-serif;font-size:13px"><br></div><div style=3D"f=
ont-family:arial,sans-serif;font-size:13px">which you can already do today =
without needing a standard modification.</div>




</div><div><br clear=3D"all"><div><div dir=3D"ltr"><div>Billy O&#39;Neal</d=
iv><div><a href=3D"https://bitbucket.org/BillyONeal/" target=3D"_blank">htt=
ps://github.com/BillyONeal/</a></div><div><a href=3D"http://stackoverflow.c=
om/users/82320/billy-oneal" target=3D"_blank">http://stackoverflow.com/<u><=
/u>users/82320/billy-oneal</a></div>




<div>Malware Response Instructor - BleepingComputer.com</div></div></div>
<br><br><div class=3D"gmail_quote">On Wed, Oct 23, 2013 at 4:32 PM, Vlad fr=
om Moscow <span dir=3D"ltr">&lt;<a>vlad....@mail.ru</a>&gt;</span> wrote:<b=
r><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;paddi=
ng-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border=
-left-style:solid">




<div dir=3D"ltr"><div>Billy, I do not think that append flows out of operat=
or +=3D. It looks like that operator +=3D flows out of append.:)</div><div>=
=9A</div><div>To demonstrate that append looks much better than insert I wi=
ll show the following assignment.</div>




<div>=9ALet;s assume that there is a vector v1 and you need to copy=9A its =
elements in another vector v2 excluding some range that specified by a=9Apa=
ir of=9Aiterators. For example one iterator points=9Athe first negative val=
ue of the vector and the=9Asecond iterator points the last negative value o=
f the vector. The simplest way to do the assignment is to write</div>




<div>=9A</div><div>std::vector&lt;int&gt; v2( v1.begin(),=9Arange.first );<=
/div><div>v2.append( std::next(=9Arange.second ), v1.end()=9A);</div><div>=
=9A</div><div>That is at first the part of the original vector before the f=
irst iterator was copied and then=9Athe tail of the original vector =9Awas =
appended.. The code looks very logically and clearly due to using of append=
..</div>




<div>=9A</div><div>=9A</div><div>=9A</div><div><br>=DE=C5=D4=D7=C5=D2=C7, 2=
4 =CF=CB=D4=D1=C2=D2=D1 2013=9A=C7., 3:07:04 UTC+4 =D0=CF=CC=D8=DA=CF=D7=C1=
=D4=C5=CC=D8 Billy O&#39;Neal =CE=C1=D0=C9=D3=C1=CC:</div><blockquote class=
=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;padding-left:1ex;border-=
left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid">




<div><div dir=3D"ltr">Again, append makes sense for basic_string because it=
 corresponds to basic_string&#39;s operator+=3D. That operation doesn&#39;t=
 necessarily make sense for all containers.</div></div><div><div>

<br clear=3D"all">

<div><div dir=3D"ltr"><div>Billy O&#39;Neal</div><div><a href=3D"https://bi=
tbucket.org/BillyONeal/" target=3D"_blank">https://github.com/BillyONeal/</=
a></div><div><a href=3D"http://stackoverflow.com/users/82320/billy-oneal" t=
arget=3D"_blank">http://stackoverflow.com/<u></u>users<u></u>/82320/billy-o=
neal</a></div>






<div>Malware Response Instructor - BleepingComputer.com</div></div></div>
<br><br></div><div class=3D"gmail_quote"><div>On Wed, Oct 23, 2013 at 4:05 =
PM, Vlad from Moscow <span dir=3D"ltr">&lt;<a>vlad....@mail.ru</a>&gt;</spa=
n> wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0p=
x 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left=
-width:1px;border-left-style:solid">




<div>

<div dir=3D"ltr"><div>In fact there is nothing new with the method append b=
ecause it already exists for std::basic_string.=9AIf somebody has some doub=
ts then I advise to try do not use append with std::basic string and substi=
tute it everywhere in code for insert. I am sure that through a month of su=
ch coding=9Ahe will quickly understand that method append is necessary.</di=
v>






<div>=9A</div><div>Introducing method append=9Ajust makes=9Athe common inte=
rface of sequential containers more consistent.</div><div><br>=DE=C5=D4=D7=
=C5=D2=C7, 24 =CF=CB=D4=D1=C2=D2=D1 2013=9A=C7., 2:52:13 UTC+4 =D0=CF=CC=D8=
=DA=CF=D7=C1=D4=C5=CC=D8 Zhihao Yuan =CE=C1=D0=C9=D3=C1=CC:</div><blockquot=
e class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;padding-left:1ex;=
border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:=
solid">






<p>On Oct 23, 2013 6:31 PM, &quot;Zhihao Yuan&quot; &lt;<a>z...@miator.net<=
/a>&gt; wrote:<br>
&gt; I think we&#39;d better not to regard this as merely a syntax sugar.=
=9A I looked at libc++ code and I found that since the position is known to=
 be end(), append() can be implemented in a much simpler way compared with =
insert().=9A Not sure how beneficial it is though, but so far it looks not =
too useless.</p>








<p>PS: If you agree with this rationale, I would suggest to add prepend() m=
ethod to deque, list, and forward_list as well.</p><span><font color=3D"#88=
8888">
</font></span></blockquote></div></div><span><font color=3D"#888888"><div>

<p></p>

-- <br>
=9A<br>
--- <br>
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br></div>
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a>std-proposal...@<u></u>isocpp.org</a>.<br>
To post to this group, send email to <a>std-pr...@isocpp.org</a>.<div><br>
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/" target=3D"_blank">http://groups.google.com/a/<u></u>iso<u><=
/u>cpp.org/group/std-<u></u>proposals/</a>.<br>
</div></font></span></blockquote></div><br></div>
</blockquote></div><div><div>

<p></p>

-- <br>
=9A<br>
--- <br>
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br>
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a>std-proposal...@isocpp.org</a>.<br>
To post to this group, send email to <a>std-pr...@isocpp.org</a>.<br>
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/" target=3D"_blank">http://groups.google.com/a/<u></u>isocpp.=
org/group/std-<u></u>proposals/</a>.<br>
</div></div></blockquote></div><br></div>
</blockquote></div></blockquote></div></div></div><div><div>

<p></p>

-- <br>
=9A<br>
--- <br>
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br>
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals%2Bunsubscribe@isocpp.org" target=3D=
"_blank">std-proposals+unsubscribe@isocpp.org</a>.<br>
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org" target=3D"_blank">std-proposals@isocpp.org</a>.<br>
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/" target=3D"_blank">http://groups.google.com/a/isocpp.org/gro=
up/std-proposals/</a>.<br>
</div></div></blockquote></div><br></div></div>

<p></p>

-- <br />
&nbsp;<br />
--- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to std-proposals+unsubscribe@isocpp.org.<br />
To post to this group, send email to std-proposals@isocpp.org.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />

--089e0160c2440d4cc704e9717a7d--

.
